Description
Returns indices of positions that are within the provided area.
Important
Unlike inAreaArray, all positions sent to this command are treated as PositionASL but the center as PositionAGL.
Important
Since Arma 3 v2.20 this command is fully compatible with inAreaArray, i.e by default all positions given as Array or as objects are treated as PositionAGL. There is also an option to force them to PositionWorld format.
Syntax
Syntax 1
positions inAreaArrayIndexes area
Parameters:
Returns: Array: Numbers - indexes of matched positions in positions array
Syntax 2
positions inAreaArrayIndexes [centre, a, b, angle, isRectangle, c, usePosWorld]
Parameters:
positions: Array - Objects and/or Positions to check (see note in description)centre: Array - Position Object or Group (see note in description)a: Number - x axis (x / 2)b: Number - y axis (y / 2)angle: Number - (Optional, default 0) rotation angleisRectangle: Boolean - (Optional, default false) true if rectangle, false if ellipsec: Number - (Optional, default -1: unlimited) z axis (z / 2)usePosWorld: Boolean - (Optional, default false) set to true to treat all positions as PositionWorld (since Arma3 2.20)
Returns: Array: Numbers - indexes of matched positions in positions array
Syntax 3
positions inAreaArrayIndexes [pos1, pos2, pos3,...]
Parameters:
positions: Array - Objects and/or Positions to check.posN: Position - polygon vertices in 2d or 3d format (see inPolygon)
Returns: Array: Numbers - indexes of matched positions in positions array
Examples
Example 1
private _players = call BIS_fnc_listPlayers;
private _indices = _players inAreaArrayIndexes _marker;
{
private _player = _players select _x;
["You are in the marker!"] remoteExec ["hint", _player];
} forEach _indices;