---
name: "doFollow"
type: command
status: ok
groups: ["Unit Control"]
arma3_since: "0.50"
locality: {"argument": "local", "effect": "global", "server_exec": false}
source: https://community.bistudio.com/wiki/doFollow
revid: 353189
updated: 2024-03-12T13:35:21Z
---

# doFollow

*Command · Unit Control · Arma 3 v0.50 · introduced in Operation Flashpoint v1.00*

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

## Description

Order the given unit(s) to follow another from his own group as his [formation leader](../commands/formLeader.md) (without radio messages).

It is also used to order the unit to **return to formation** after e.g [doStop](../commands/doStop.md) even if it is the leader himself that should return to formation (see [Example 2](../commands/doFollow.md#example-2)).

## Syntax

```sqf
unit doFollow unitLead
```

**Parameters:**

- `unit`: [Object](../topics/Object.md) or [Array](../topics/Array.md) of [Object](../topics/Object.md)s
- `unitLead`: [Object](../topics/Object.md)

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

## Examples

### Example 1

```sqf
_soldier1 doFollow _soldier2;
```

### Example 2

```sqf
units _group doFollow leader _group; // returns all the units to formation
```

## See also

[doStop](../commands/doStop.md) · [doMove](../commands/doMove.md) · [commandFollow](../commands/commandFollow.md) · [formationLeader](../commands/formationLeader.md) · [formLeader](../commands/formLeader.md) · [isFormationLeader](../commands/isFormationLeader.md) · [leader](../commands/leader.md) · [selectLeader](../commands/selectLeader.md) · [setLeader](../commands/setLeader.md)

## Community notes

**Mojito69** — 2010-10-11

These commands ([doFollow](../commands/doFollow.md) or [commandFollow](../commands/commandFollow.md)) work only if the two units are in the same group.

---

**BaerMitUmlaut** — 2016-08-29

The name of this command is a bit misleading, it is used to make a unit return to the formation of its group or subformation.

---

**Leopard20** — 2022-02-17

[doFollow](../commands/doFollow.md) doesn't work with player-issued commands (those issued via the commanding menus). As a workaround, it is possible to use [joinSilent](../commands/joinSilent.md) instead, and join the unit into its current group:

```sqf
[_unit] joinSilent group _unit; // return to formation
```

Note that the group must have **at least 2 units**, and not all units should be joined at once, otherwise the group will temporarily become empty and all its waypoints **will be lost**!

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