---
name: "selectLeader"
type: command
status: ok
groups: ["Groups"]
arma3_since: "0.50"
locality: {"argument": "local", "effect": "global", "server_exec": false}
source: https://community.bistudio.com/wiki/selectLeader
revid: 321115
updated: 2022-05-13T14:14:32Z
---

# selectLeader

*Command · Groups · Arma 3 v0.50 · introduced in Operation Flashpoint: Elite v1.00*

Locality: arguments **local** · effect **global**

## Description

Select the group's leader. Group locality can be checked with [local](../commands/local.md) command and group ownership with [groupOwner](../commands/groupOwner.md) command.

> [!IMPORTANT]
> An invalid combination can be provided to this command, e.g *unitName* **not** being part of *group*. In that case:
> - *unitName* will be [leader](../commands/leader.md) of *group*, but will not be able to command them
> - if *unitName* is deleted or killed, [leader](../commands/leader.md) of *group* will be [objNull](../commands/objNull.md) and will not automatically be reassigned.

## Syntax

```sqf
group selectLeader unitName
```

**Parameters:**

- `group`: [Group](../topics/Group.md)
- `unitName`: [Object](../topics/Object.md)

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

## Examples

### Example 1

```sqf
group player selectLeader player;
```

### Example 2

Make unit a leader from server:

```sqf
[group _unit, _unit] remoteExec ["selectLeader", groupOwner group _unit];
```

## See also

[commandFollow](../commands/commandFollow.md) · [doFollow](../commands/doFollow.md) · [formationLeader](../commands/formationLeader.md) · [formLeader](../commands/formLeader.md) · [isFormationLeader](../commands/isFormationLeader.md) · [leader](../commands/leader.md) · [setLeader](../commands/setLeader.md)

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