inAreaArray: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 46: Line 46:
|p32= location: [[Location]] - location with given area |PARAMETER32=
|p32= location: [[Location]] - location with given area |PARAMETER32=


|r3= [[Array]]: [[Object]]s and/or [[Position]]s inside the location area|RETURNVALUE=
|r3= [[Array]]: [[Object]]s and/or [[Position]]s inside the location area|RETURNVALUE3=


|s4= positions '''inAreaArray''' [center, a, b, angle, isRectangle, c]|SYNTAX=
|s4= positions '''inAreaArray''' [center, a, b, angle, isRectangle, c]|SYNTAX=
|p41= positions: [[Array]] - [[Object]]s and/or [[Position]]s to check|PARAMETER41=
|p41= positions: [[Array]] - [[Object]]s and/or [[Position]]s to check|PARAMETER41=
|p42= [center, a, b, angle, isRectangle, c]: [[Array]]|PARAMETER42=
|p42= [center, a, b, angle, isRectangle, c]: [[Array]]|PARAMETER42=
|p43= center: [[Array]] - center of the area in format [[Position3D]], [[Position2D]] |PARAMETER43=
|p43= center: [[Array]] - center of the area in format [[Position3D]], [[Position2D]] |PARAMETER43=
|p44= a: [[Number]] - x axis (x / 2) |PARAMETER44=
|p44= a: [[Number]] - x axis (x / 2) |PARAMETER44=
|p45= b: [[Number]] - y axis (y / 2) |PARAMETER45=
|p45= b: [[Number]] - y axis (y / 2) |PARAMETER45=
|p46= angle (Optional): [[Number]] - rotation angle. Default: 0  |PARAMETER46=
|p46= angle (Optional): [[Number]] - rotation angle. Default: 0  |PARAMETER46=
|p47= isRectangle (Optional): [[Boolean]] - [[true]] if rectangle, [[false]] if ellipse. Default: [[false]]|PARAMETER47=
|p47= isRectangle (Optional): [[Boolean]] - [[true]] if rectangle, [[false]] if ellipse. Default: [[false]]|PARAMETER47=
|p48= c (Optional): [[Number]] - z axis (z / 2). Default: -1 (unlimited)|PARAMETER48=
|p48= c (Optional): [[Number]] - z axis (z / 2). Default: -1 (unlimited)|PARAMETER48=
|r4= [[Array]]: [[Object]]s and/or [[Position]]s inside the area |RETURNVALUE=
 
|r4= [[Array]]: [[Object]]s and/or [[Position]]s inside the area |RETURNVALUE4=
____________________________________________________________________________________________
____________________________________________________________________________________________



Revision as of 21:32, 24 September 2020

Hover & click on the images for description

Description

Description:
Filters given list of Objects and/or Positions in relation to the given area, defined by a trigger, marker, location or array. Returns array of Objects and/or Positions from the list that are inside the area
Groups:
TriggersMarkersLocationsPositions

Syntax 1

Syntax:
positions inAreaArray trigger
Parameters:
positions: Array - Objects and/or Positions to check
trigger: Object - trigger with given area
Return Value:
Array: Objects and/or Positions inside the trigger area

Syntax 2

Syntax:
positions inAreaArray marker
Parameters:
positions: Array - Objects and/or Positions to check
marker: String - marker with given area
positions: Array - Objects and/or Positions to check
location: Location - location with given area
Return Value:
Array: Objects and/or Positions inside the marker area

Syntax 3

Syntax:
positions inAreaArray location
Parameters:
positions: Array - Objects and/or Positions to check
[center, a, b, angle, isRectangle, c]: Array
center: Array - center of the area in format Position3D, Position2D
a: Number - x axis (x / 2)
b: Number - y axis (y / 2)
angle (Optional): Number - rotation angle. Default: 0
isRectangle (Optional): Boolean - true if rectangle, false if ellipse. Default: false
c (Optional): Number - z axis (z / 2). Default: -1 (unlimited)
Return Value:
Array: Objects and/or Positions inside the location area

Syntax 4

Syntax:
positions inAreaArray [center, a, b, angle, isRectangle, c]
Return Value:
Array: Objects and/or Positions inside the area

Examples

Example 1:
vehicles inAreaArray trigger_1;
Example 2:
allUnits inAreaArray marker_1;
Example 3:
allPlayers inAreaArray location_1;
Example 4:
allDead inAreaArray [[100, 100, 0], 20, 30, 45, false, 10];

Additional Information

See also:
inAreatriggerArea

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

Bottom Section

Posted on June 11, 2017 - 21:33 (UTC)
Tankbuster
The array you send the command can be filtered. For example: vehicles inAreaArray "mymarker" select {_x isKindOf "StaticWeapon"} Will return only the statics inside the given marker