BIS fnc isInFrontOf: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
m (Text replacement - "= <code>([^<{]+)<\/code>" to "= <sqf>$1</sqf>")
 
(27 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Function|Comments=
{{RV|type=function
____________________________________________________________________________________________


| arma2 |Game name=
|game1= arma2
|version1= 1.00


|1.00|Game version=
|game2= arma2oa
|version2= 1.50


|gr1 = Object Manipulation |GROUP1=
|game3= tkoh
|version3= 1.00


|gr2 = Geometry |GROUP2=
|game4= arma3
____________________________________________________________________________________________
|version4= 0.50


| Check if an object is in front of another object (in the front 180°) |DESCRIPTION=
|gr1= Object Manipulation
____________________________________________________________________________________________


| [reference, checked, offset] call [[BIS_fnc_isInFrontOf]] |SYNTAX=
|gr2= Geometry


|p1= reference: [[Object]] - the reference object |PARAMETER1=
|descr= Check if an object is in front of another object (in the front 180°)


|p2= checked: [[Object]] - the object that has to be in front of ''reference'' |PARAMETER2=
|s1= [reference, checked, offset] call [[BIS_fnc_isInFrontOf]]


|p3= offset: [[Number]] - (Optional, default 0) allows to check from ''offset'' meters in front of (positive), or behind (negative) ''reference'' |PARAMETER3=
|p1= reference: [[Object]] - the reference object


| [[Boolean]] |RETURNVALUE=
|p2= checked: [[Object]] - the object that has to be in front of ''reference''
____________________________________________________________________________________________


|x1= <code>_isInstructorInFrontOfPlayer = [<nowiki/>[[player]], instructor, 0] [[call]] [[BIS_fnc_isInFrontOf]];</code> |EXAMPLE1=
|p3= offset: [[Number]] - (Optional, default 0) allows to check from ''offset'' meters in front of (positive), or behind (negative) ''reference''
____________________________________________________________________________________________


| [[getRelDir]] [[BIS_fnc_isInsideArea]] |SEEALSO=
|r1= [[Boolean]]
}}


<h3 style="display:none">Notes</h3>
|x1= <sqf>private _isInstructorInFrontOfPlayer = [player, instructor, 0] call BIS_fnc_isInFrontOf;</sqf>
<dl class="command_description">
<!-- Note Section BEGIN -->


<!-- Note Section END -->
|seealso= [[getRelDir]] [[BIS_fnc_isInsideArea]]
</dl>
}}
 
<h3 style="display:none">Bottom Section</h3>
 
[[Category:Functions|{{uc:isInFrontOf}}]]
[[Category:{{Name|arma2}}: Functions|{{uc:isInFrontOf}}]]
[[Category:{{Name|arma2oa}}: Functions|{{uc:isInFrontOf}}]]
[[Category:{{Name|tkoh}}: Functions|{{uc:isInFrontOf}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:isInFrontOf}}]]

Latest revision as of 17:00, 13 July 2022

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:
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:
private _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