BIS fnc isInsideArea: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (1 revision)
(Added basic info)
Line 8: Line 8:
____________________________________________________________________________________________
____________________________________________________________________________________________


| ''N/A'' |= Description
| Detects whether a position is within a square area of given size about center. |= Description
____________________________________________________________________________________________
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_isInsideArea]]; --> |= Syntax
| [center, size, position ] call [[BIS_fnc_isInsideArea]] |= Syntax


|p1= |= Parameter 1
|p1= center: [[Array]] - Center [[Position]] of area to check |=
 
|p2= size: [[Array]] - [x,y] offsets from center |=
| |= Return value
|p3= position: [[Array]] - [[Position]] to check |=
| [[Boolean]] - true when position is in area, false otherwise<br />
____________________________________________________________________________________________
____________________________________________________________________________________________


|x1= <code></code> |=  
|x1= <code>_center = getPos player;
_size = [ 5, 5 ];
_checkPos = getPos player;
//Check an area, centered on the player that is 10m wide and 10m tall
_inArea = [ _center, _size, _checkPos ] call BIS_fnc_isInsideArea;</code> |=  
____________________________________________________________________________________________
____________________________________________________________________________________________


| |= See also
| [[createTrigger]] [[createMarker]] [[setTriggerArea]] [[setMarkerSize]] [[triggerArea]] [[markerSize]] |= See also
 
}}
}}



Revision as of 08:39, 9 October 2015


Hover & click on the images for description

Description

Description:
Detects whether a position is within a square area of given size about center.
Execution:
call
Groups:
Uncategorised

Syntax

Syntax:
[center, size, position ] call BIS_fnc_isInsideArea
Parameters:
center: Array - Center Position of area to check
size: Array - [x,y] offsets from center
position: Array - Position to check
Return Value:
Boolean - true when position is in area, false otherwise
____________________________________________________________________________________________

Examples

Example 1:
_center = getPos player; _size = [ 5, 5 ]; _checkPos = getPos player; //Check an area, centered on the player that is 10m wide and 10m tall _inArea = [ _center, _size, _checkPos ] call BIS_fnc_isInsideArea;

Additional Information

See also:
createTrigger createMarker setTriggerArea setMarkerSize triggerArea markerSize

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