Arma 3 Scripting

Command in Triggers, Markers, Locations, Positions, Groups

inAreaArrayIndexes

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

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:

Returns: Array: Numbers - indexes of matched positions in positions array

Syntax 3

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

Parameters:

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;

See also

inAreaArray · inArea · triggerArea