Arma 3 Scripting

Command in Triggers, Markers, Locations, Positions

inAreaArray

Also available as Markdown and JSON, or read the original wiki page.

Description

Returns given list of Objects and/or Positions that are in the given area, area defined by a trigger, marker, location or array.

Important

By default all positions given as Array or as objects are treated as PositionAGL. Since Arma 3 v2.20 there is an option to force them to PositionWorld format.

Syntax

Syntax 1

positions inAreaArray area

Parameters:

Returns: Array of Objects and/or Positions

Syntax 2

positions inAreaArray [centre, a, b, angle, isRectangle, c, usePosWorld]

Parameters:

Returns: Array of Objects and/or Positions

Syntax 3

since arma3 2.20

positions inAreaArray [pos1, pos2, pos3,...]

Parameters:

Returns: Array of Objects and/or Positions

Examples

Example 1

vehicles inAreaArray myTrigger;

Example 2

allUnits inAreaArray "myMarker";

Example 3

allPlayers inAreaArray myLocation;

Example 4

allDead inAreaArray [[100, 100, 0], 20, 30, 45, false, 10];

See also

inAreaArrayIndexes · inArea · triggerArea

Community notes

Tankbuster

The array you send the command can be filtered. For example:

vehicles select { _x isKindOf "StaticWeapon" } inAreaArray "myMarker"

Will return only the statics inside the given marker.