Difference between revisions of "inAreaArray"

From Bohemia Interactive Community
Jump to navigation Jump to search
m (template:command argument fix)
m (Text replacement - "|Game Version= (number surrounded by NO SPACES)" to "|Game Version (number surrounded by NO SPACES)=")
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Command|=
+
{{Command|Comments=
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
| arma3 |= Game
+
| arma3 |Game=
  
|1.66|= Game Version (number surrounded by NO SPACES)
+
|1.66|Game Version (number surrounded by NO SPACES)=
  
|arg=  |= Multiplayer Arguments ("local" or "global")
+
|arg=  |Multiplayer Arguments= ("local" or "global")
  
|eff=  |= Multiplayer Effects ("local" or "global")
+
|eff=  |Multiplayer Effects= ("local" or "global")
  
|exec=  |= Multiplayer Execution ("server" or empty)
+
|serverExec=  |= Multiplayer Execution ("server" or empty)
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
Line 24: Line 24:
 
| [[Array]]: [[Object]]s and/or [[Position]]s inside the trigger area|RETURNVALUE=
 
| [[Array]]: [[Object]]s and/or [[Position]]s inside the trigger area|RETURNVALUE=
  
|s2=positions '''inAreaArray''' marker |SYNTAX=
+
|s2=positions '''inAreaArray''' marker |SYNTAX2=
  
|p21= positions: [[Array]] - [[Object]]s and/or [[Position]]s to check|PARAMETER1=
+
|p21= positions: [[Array]] - [[Object]]s and/or [[Position]]s to check|PARAMETER21=
  
 
|p22= marker: [[String]] - marker with given area |PARAMETER2=
 
|p22= marker: [[String]] - marker with given area |PARAMETER2=
Line 32: Line 32:
 
|r2= [[Array]]: [[Object]]s and/or [[Position]]s inside the marker area|RETURNVALUE=
 
|r2= [[Array]]: [[Object]]s and/or [[Position]]s inside the marker area|RETURNVALUE=
  
|s3=positions '''inAreaArray''' location |SYNTAX=
+
|s3=positions '''inAreaArray''' location |SYNTAX3=
  
 
|p41= positions: [[Array]] - [[Object]]s and/or [[Position]]s to check|PARAMETER1=
 
|p41= positions: [[Array]] - [[Object]]s and/or [[Position]]s to check|PARAMETER1=
Line 55: Line 55:
 
|x2= <code>[[allUnits]] [[inAreaArray]] marker_1;</code> |EXAMPLE2=
 
|x2= <code>[[allUnits]] [[inAreaArray]] marker_1;</code> |EXAMPLE2=
 
|x3= <code>[[allPlayers]] [[inAreaArray]] location_1;</code> |EXAMPLE3=
 
|x3= <code>[[allPlayers]] [[inAreaArray]] location_1;</code> |EXAMPLE3=
|x4= <code>[[allDead]] [[inAreaArray]] <nowiki>[</nowiki>[100, 100, 0], 20, 30, 45, [[false]], 10];</code>|=
+
|x4= <code>[[allDead]] [[inAreaArray]] [<nowiki/>[100, 100, 0], 20, 30, 45, [[false]], 10];</code>|=
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
 
|mp= - |= Multiplayer Behaviour
 
  
 
| [[inArea]], [[triggerArea]] |SEEALSO=
 
| [[inArea]], [[triggerArea]] |SEEALSO=

Latest revision as of 13:14, 6 August 2020

Introduced with Arma 3 version 1.661.66
Hover & click on the images for descriptions

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

Syntax

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

Alternative Syntax

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

Alternative Syntax 2

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

Alternative Syntax 3

Syntax:
positions inAreaArray [center, a, b, angle, isRectangle, c]
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 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

i
Only post proven facts here. Report bugs on the Feedback Tracker and discuss on the Arma Discord or on the Forums.

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