BIS fnc isInsideArea: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[Category\:Function Group\: Geometry(\|\{\{[a-zA-Z0-9_:]+\}\})?\]\]" to "")
m (Text replacement - "_{10,} " to "")
Line 1: Line 1:
{{Function|Comments=
{{Function|Comments=
____________________________________________________________________________________________


| arma3 |Game name=
| arma3 |Game name=
Line 7: Line 6:


|gr1 = Geometry |GROUP1=
|gr1 = Geometry |GROUP1=
____________________________________________________________________________________________


| Detects whether a position is within a square area of given size about center. |DESCRIPTION=
| Detects whether a position is within a square area of given size about center. |DESCRIPTION=
____________________________________________________________________________________________


| [center, size, position ] call [[BIS_fnc_isInsideArea]] |SYNTAX=
| [center, size, position ] call [[BIS_fnc_isInsideArea]] |SYNTAX=
Line 20: Line 17:


| [[Boolean]] - true when position is in area, false otherwise|RETURNVALUE=
| [[Boolean]] - true when position is in area, false otherwise|RETURNVALUE=
____________________________________________________________________________________________


|x1= <code>{{cc|Check an area, centered on the player that is 10m wide and 10m tall}}
|x1= <code>{{cc|Check an area, centered on the player that is 10m wide and 10m tall}}
Line 26: Line 22:
_checkPos = [[getPos]] [[player]];
_checkPos = [[getPos]] [[player]];
_inArea = [_checkPos, _size, _checkPos] [[call]] [[BIS_fnc_isInsideArea]];</code> |EXAMPLE1=  
_inArea = [_checkPos, _size, _checkPos] [[call]] [[BIS_fnc_isInsideArea]];</code> |EXAMPLE1=  
____________________________________________________________________________________________


| [[createTrigger]] [[createMarker]] [[setTriggerArea]] [[setMarkerSize]] [[triggerArea]] [[markerSize]] [[BIS_fnc_inAngleSector]] |SEEALSO=
| [[createTrigger]] [[createMarker]] [[setTriggerArea]] [[setMarkerSize]] [[triggerArea]] [[markerSize]] [[BIS_fnc_inAngleSector]] |SEEALSO=

Revision as of 00:22, 17 January 2021

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

Notes

Bottom Section