BIS fnc isInFrontOf: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " <h3 style="display:none">Notes</h3> <dl class="command_description"> <!-- Note Section BEGIN --> <!-- Note Section END --> </dl>" to "") |
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments \("local" or "global"\)|Multiplayer Effects \("local" or "global"\)|Multiplayer Execution \("server" o...) |
||
Line 1: | Line 1: | ||
{{Function | {{Function | ||
| arma2 | | arma2 | ||
|1.00 | |1.00 | ||
|gr1 = Object Manipulation | |gr1 = Object Manipulation | ||
|gr2 = Geometry | |gr2 = Geometry | ||
| Check if an object is in front of another object (in the front 180°) | | Check if an object is in front of another object (in the front 180°) | ||
| [reference, checked, offset] call [[BIS_fnc_isInFrontOf]] | | [reference, checked, offset] call [[BIS_fnc_isInFrontOf]] | ||
|p1= reference: [[Object]] - the reference object | |p1= reference: [[Object]] - the reference object | ||
|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'' | ||
|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'' | ||
| [[Boolean]] | | [[Boolean]] | ||
|x1= <code>_isInstructorInFrontOfPlayer = [<nowiki/>[[player]], instructor, 0] [[call]] [[BIS_fnc_isInFrontOf]];</code> | |x1= <code>_isInstructorInFrontOfPlayer = [<nowiki/>[[player]], instructor, 0] [[call]] [[BIS_fnc_isInFrontOf]];</code> | ||
| [[getRelDir]] [[BIS_fnc_isInsideArea]] | | [[getRelDir]] [[BIS_fnc_isInsideArea]] | ||
}} | }} | ||
Revision as of 23:10, 17 January 2021
Description
- Description:
- Check if an object is in front of another object (in the front 180°)
- Execution:
- call
- Groups:
- Object ManipulationGeometry
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 BIS_fnc_isInsideArea
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