Arma 3 Scripting

Command in Positions

formationPosition

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

Description

Return position of unit in the formation.

Syntax

formationPosition unit

Parameters:

Returns: Position

Examples

Example 1

_pos = formationPosition _unit;

Example 2

// Reposition entire group to a new position (ground level)
private _group = group player;
private _leader = leader _group;

// Set the leader to the spawn position
_leader setPosATL markerPos "spawn_position";

// Reposition all units of the group except the leader
{
    private _formationPos = formationPosition _x;
    _formationPos set [2, 0];
    _x setPosATL _formationPos;
} forEach (units _group - [_leader]);

See also

formation