---
name: "groupSelectUnit"
type: command
status: ok
groups: ["Interaction"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/groupSelectUnit
revid: 330040
updated: 2022-08-15T15:25:02Z
---

# groupSelectUnit

*Command · Interaction · Arma 3 v0.50 · introduced in Arma 2 v1.00*

## Description

Selects a unit from player's group. If player is the leader, the effect of this command is similar to player pressing <kbd>F1</kbd>, <kbd>F2</kbd>, <kbd>F3</kbd> 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

```sqf
player groupSelectUnit [unit, select]
```

**Parameters:**

- `player`: [Object](../topics/Object.md)
- `unit`: [Object](../topics/Object.md)
- `select`: [Boolean](../topics/Boolean.md)

**Returns:** [Nothing](../topics/Nothing.md)

## Examples

### Example 1

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

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

### Example 2

Select all units when player is the leader:

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

### Example 3

Open communication with group leader:

```sqf
player groupSelectUnit [leader player, true];
```

## See also

[groupSelectedUnits](../commands/groupSelectedUnits.md)

<sub>Source: [BI Community Wiki — groupSelectUnit](https://community.bistudio.com/wiki/groupSelectUnit) (revision 330040).</sub>
