BIS fnc isInFrontOf: Difference between revisions
Jump to navigation
Jump to search
m (template:command argument fix) |
m (template:command argument fix) |
||
Line 12: | Line 12: | ||
| [reference, checked, offset] call [[BIS_fnc_isInFrontOf]] |SYNTAX= | | [reference, checked, offset] call [[BIS_fnc_isInFrontOf]] |SYNTAX= | ||
|p1= reference: [[Object]] - the reference object |= | |p1= reference: [[Object]] - the reference object |PARAMETER1= | ||
|p2= checked: [[Object]] - the object that has to be in front of ''reference'' |= | |p2= checked: [[Object]] - the object that has to be in front of ''reference'' |PARAMETER2= | ||
|p3= offset: [[Number]] - (Optional, default 0) allows to check from ''offset'' meters in front of (positive), or behind (negative) ''reference'' |= | |p3= offset: [[Number]] - (Optional, default 0) allows to check from ''offset'' meters in front of (positive), or behind (negative) ''reference'' |PARAMETER3= | ||
| [[Boolean]] |RETURNVALUE= | | [[Boolean]] |RETURNVALUE= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
|x1= <code>_isInstructorInFrontOfPlayer = <nowiki>[</nowiki>[[player]], instructor, 0] [[call]] [[BIS_fnc_isInFrontOf]];</code> |= | |x1= <code>_isInstructorInFrontOfPlayer = <nowiki>[</nowiki>[[player]], instructor, 0] [[call]] [[BIS_fnc_isInFrontOf]];</code> |EXAMPLE1= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
Revision as of 14:30, 7 April 2019
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