BIS fnc isInFrontOf: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\|( *\[\[[a-zA-Z]+\]\]) * \|x1=" to "\|r1=$1 \|x1=") |
Lou Montana (talk | contribs) m (Text replacement - "= <code>([^<{]+)<\/code>" to "= <sqf>$1</sqf>") |
||
(14 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{RV|type=function | {{RV|type=function | ||
| arma2 | |game1= arma2 | ||
|1.00 | |version1= 1.00 | ||
|game2= arma2oa | |game2= arma2oa | ||
Line 17: | Line 17: | ||
|gr2= Geometry | |gr2= Geometry | ||
| Check if an object is in front of another object (in the front 180°) | |descr= Check if an object is in front of another object (in the front 180°) | ||
| [reference, checked, offset] call [[BIS_fnc_isInFrontOf]] | |s1= [reference, checked, offset] call [[BIS_fnc_isInFrontOf]] | ||
|p1= reference: [[Object]] - the reference object | |p1= reference: [[Object]] - the reference object | ||
Line 27: | Line 27: | ||
|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'' | ||
|r1= [[Boolean]] | |||
|x1= <sqf>private _isInstructorInFrontOfPlayer = [player, instructor, 0] call BIS_fnc_isInFrontOf;</sqf> | |||
|seealso= [[getRelDir]] [[BIS_fnc_isInsideArea]] | |seealso= [[getRelDir]] [[BIS_fnc_isInsideArea]] | ||
}} | }} | ||
Latest revision as of 17:00, 13 July 2022
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:
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