---
name: "doFSM"
type: command
status: ok
groups: ["Unit Control"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/doFSM
revid: 377167
updated: 2026-01-01T10:44:05Z
---

# doFSM

*Command · Unit Control · Arma 3 v0.50 · introduced in Armed Assault v1.00*

## Description

Orders a unit to process command defined by FSM file (silently).

Unlike with execFSM where *_this* is passed to the FSM, the following parameters are passed when using doFSM/commandFSM:

_leader: leader of subgroup with this command
_destination: command destination/position
_target: command target
_units: list of all persons in subgroup

## Syntax

```sqf
unit doFSM [fsmName, position, target]
```

**Parameters:**

- `unit`: [Object](../topics/Object.md) or [Array](../topics/Array.md) of [Object](../topics/Object.md)s
- `fsmName`: [String](../topics/String.md)
- `position`: [Position](../topics/Position.md)
- `target`: [Object](../topics/Object.md)

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

## Examples

### Example 1

```sqf
_soldierOne doFSM ["move.fsm", position player, player];
```

### Example 2

```sqf
units player doFSM ["move.fsm", position player, player];
```

## See also

FSM · FSM Editor Manual · [commandFSM](../commands/commandFSM.md) · [completedFSM](../commands/completedFSM.md) · [execFSM](../commands/execFSM.md) · [getFSMVariable](../commands/getFSMVariable.md) · [setFSMVariable](../commands/setFSMVariable.md) · [unitReady](../commands/unitReady.md)

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