BIS fnc isInsideArea: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "<code>([^<]*)\[\[([a-zA-Z][a-zA-Z0-9_]+)\]\]([^<]*) *<\/code>" to "<code>$1$2$3</code>") |
Lou Montana (talk | contribs) m (Text replacement - "<code>([^<]*)\[\[([a-zA-Z][a-zA-Z0-9_]+)\]\]([^<]*) *<\/code>" to "<code>$1$2$3</code>") |
||
Line 20: | Line 20: | ||
_size = [5, 5]; | _size = [5, 5]; | ||
_checkPos = getPos player; | _checkPos = getPos player; | ||
_inArea = [_checkPos, _size, _checkPos] call | _inArea = [_checkPos, _size, _checkPos] call BIS_fnc_isInsideArea;</code> | ||
|seealso= [[createTrigger]] [[createMarker]] [[setTriggerArea]] [[setMarkerSize]] [[triggerArea]] [[markerSize]] [[BIS_fnc_inAngleSector]] | |seealso= [[createTrigger]] [[createMarker]] [[setTriggerArea]] [[setMarkerSize]] [[triggerArea]] [[markerSize]] [[BIS_fnc_inAngleSector]] | ||
}} | }} |
Revision as of 21:38, 12 July 2022
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