BIS fnc isInsideArea: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " \| *(\[\[[a-zA-Z ]+\]\].+) \|x1=" to " |r1=$1 |x1=")
m (Text replacement - " \| *(\[[a-zA-Z,. ]*\] call ('''|\[\[)?BI(N|S)_fnc_[a-zA-Z]+('''|\]\])?) * \|p1=" to " |s1=$1 |p1=")
Line 9: Line 9:
| Detects whether a position is within a square area of given size about center.
| Detects whether a position is within a square area of given size about center.


| [center, size, position ] call [[BIS_fnc_isInsideArea]]
|s1=[center, size, position ] call [[BIS_fnc_isInsideArea]]


|p1= center: [[Array]] - Center [[Position]] of area to check
|p1= center: [[Array]] - Center [[Position]] of area to check

Revision as of 16:58, 12 June 2021

Hover & click on the images for description

Description

Description:
Description needed
Execution:
call
Groups:
Geometry

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:
// Check an area, centered on the player that is 10m wide and 10m tall _size = [5, 5]; _checkPos = getPos player; _inArea = [_checkPos, _size, _checkPos] call BIS_fnc_isInsideArea;

Additional Information

See also:
createTrigger createMarker setTriggerArea setMarkerSize triggerArea markerSize BIS_fnc_inAngleSector

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