Arma 3 Scripting

groupSelectUnit

  • Arma 3 v0.50
  • First in Arma 2 v1.00

Command · Markdown · JSON · original wiki page

Description

Selects a unit from player's group. If player is the leader, the effect of this command is similar to player pressing F1, F2, F3 etc to highlight units in his squad, after which the unit command menu is shown. If leader is AI, player will get usual communication menu to interact with the leader.

Syntax

player groupSelectUnit [unit, select]

Parameters:

Returns: Nothing

Examples

Example 1

After leaving menu, deselect all units (command menu is not opened → no selection)

{
    player groupSelectUnit [_x, false];
} forEach (groupSelectedUnits player);

Example 2

Select all units when player is the leader:

{
    player groupSelectUnit [_x, true];
} forEach units player;

Example 3

Open communication with group leader:

player groupSelectUnit [leader player, true];

See also

groupSelectedUnits