BIS fnc isInFrontOf: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (1 revision)
(Page filling)
Line 1: Line 1:
{{Function|= Comments
{{Function|= Comments
____________________________________________________________________________________________
____________________________________________________________________________________________
Line 8: Line 7:
____________________________________________________________________________________________
____________________________________________________________________________________________


| <pre>
| Check if an object is in front of another object (in the front 180°) |= Description
____________________________________________________________________________________________


//------------------
| [reference, checked, offset] call [[BIS_fnc_isInFrontOf]] |= Syntax
// Purpose: This function checks, if a object is in front of another object
// Arguments: [object1, object2, offset (> 0 if position of object1 is not the front of object1)]
// Return: boolean
//
// Revision History:
// 20/11/06 0.1 - First cut
// 24/11/06 0.1 - added offset
//------------------


|p1= reference: [[Object]] - the reference object |= Parameter 1


</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
|p2= checked: [[Object]] - the object that has to be in front of ''reference'' |= Parameter 2
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_isInFrontOf]]; --> |= Syntax
|p3= offset: [[Number]] - (Optional, default 0) allows to check from ''offset'' meters in front of (positive), or behind (negative) ''reference'' |= Parameter 3


|p1= |= Parameter 1
| [[Boolean]] |= Return value
 
| |= Return value
____________________________________________________________________________________________
____________________________________________________________________________________________


|x1= <code></code> |=  
|x1= <code>_isInstructorInFrontOfPlayer = <nowiki>[</nowiki>[[player]], instructor, 0] [[call]] [[BIS_fnc_isInFrontOf]];</code> |= Example 1
____________________________________________________________________________________________
____________________________________________________________________________________________


| |= See also
| [[getRelDir]] |= See also
 
}}
}}



Revision as of 17:10, 27 April 2018

Hover & click on the images for description

Description

Description:
Check if an object is in front of another object (in the front 180°)
Execution:
call
Groups:
Uncategorised

Syntax

Syntax:
[reference, checked, offset] call BIS_fnc_isInFrontOf
Parameters:
reference: Object - the reference object
checked: Object - the object that has to be in front of reference
offset: Number - (Optional, default 0) allows to check from offset meters in front of (positive), or behind (negative) reference
Return Value:
Boolean

Examples

Example 1:
_isInstructorInFrontOfPlayer = [player, instructor, 0] call BIS_fnc_isInFrontOf;

Additional Information

See also:
getRelDir

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

Notes

Bottom Section