BIS fnc isInsideArea: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\| *((\[\[[a-zA-Z0-9_ :\\\-\/|()]+\]\],? ?)+) * \}\}" to "|seealso= $1 }}") |
Lou Montana (talk | contribs) m (Text replacement - " +\] +" to "] ") |
||
(14 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{RV|type=function | {{RV|type=function | ||
| arma3 | |game1= arma3 | ||
|version1= 1.00 | |||
| | |gr1= Geometry | ||
| | |descr= Detects whether a position is within a square area of given size about center. | ||
| | |s1= [center, size, position] call [[BIS_fnc_isInsideArea]] | ||
|p1= center: [[Array]] - center [[Position]] of area to check | |||
|p1= center: [[Array]] - | |||
|p2= size: [[Array]] - [x,y] offsets from center | |p2= size: [[Array]] - [x,y] offsets from center | ||
|p3= position: [[Array]] - [[Position]] to check | |p3= position: [[Array]] - [[Position]] to check | ||
| [[Boolean]] - true when position is in area, false otherwise | |r1= [[Boolean]] - true when position is in area, false otherwise | ||
|x1= < | |x1= <sqf>// Check an area, centered on the player that is 10m wide and 10m tall | ||
_size = [5, 5]; | _size = [5, 5]; | ||
_checkPos = | _checkPos = getPos player; | ||
_inArea = [_checkPos, _size, _checkPos] | _inArea = [_checkPos, _size, _checkPos] call BIS_fnc_isInsideArea;</sqf> | ||
|seealso= [[createTrigger]] [[createMarker]] [[setTriggerArea]] [[setMarkerSize]] [[triggerArea]] [[markerSize]] [[BIS_fnc_inAngleSector]] | |seealso= [[createTrigger]] [[createMarker]] [[setTriggerArea]] [[setMarkerSize]] [[triggerArea]] [[markerSize]] [[BIS_fnc_inAngleSector]] | ||
}} | }} |
Latest revision as of 17:49, 8 November 2023
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:
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