---
name: "action"
type: command
status: ok
groups: ["Interaction"]
arma3_since: "0.50"
locality: {"argument": null, "effect": "global", "server_exec": false}
source: https://community.bistudio.com/wiki/action
revid: 378568
updated: 2026-05-08T21:16:17Z
---

# action

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

Locality: effect **global**

## Description

Make a unit perform an action. See Category:Actions for action names and syntaxes.

> [!NOTE]
> **Arma 3:** Since Arma 3 2.18 it is possible to use [actionNow](../commands/actionNow.md) to perform some actions immediately without any animation.
> However, note that some actions do require animations (for example, opening inventory while on foot), otherwise they will get cancelled.

> [!NOTE]
> - in singleplayer, when user Alt-Tabs the simulation is paused and so the action will also halt until user returns to the game. For example, `player action ["GetInDriver", car];` executed while user is Alt-Tabbed will result in the user seeing the action happening when he returns to the game screen. This does not happen in Multiplayer.
> - the alternative syntax creates a temporary Logic entity in place of *unit*.

## Syntax

### Syntax 1

```sqf
unit action actionArray
```

**Parameters:**

- `unit`: [Object](../topics/Object.md)
- `actionArray`: [Array](../topics/Array.md)

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

### Syntax 2

*since arma3 2.10*

```sqf
action actionArray
```

**Parameters:**

- `actionArray`: [Array](../topics/Array.md)

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

## Examples

### Example 1

```sqf
player action ["SitDown", player];
```

### Example 2

```sqf
_soldier action ["Eject", vehicle _soldier];
```

### Example 3

```sqf
player action ["UseWeapon", player, player, 7]; // plays pick up animation before throwing grenade
action ["UseWeapon", player, player, 7]; // normal grenade throw
```

## Multiplayer

> [!IMPORTANT]
> The argument's [locality](../topics/Multiplayer_Scripting.md#locality) is **usually** local, but some actions can take a global argument (e.g "Eject", "GetOut", "GetInXXXX", "MoveToXXXX").
> See Category:Actions for more details.

## See also

[actionNow](../commands/actionNow.md) · [actionIDs](../commands/actionIDs.md) · [actionParams](../commands/actionParams.md) · [addAction](../commands/addAction.md) · [setUserActionText](../commands/setUserActionText.md) · [inGameUISetEventHandler](../commands/inGameUISetEventHandler.md) · [showHUD](../commands/showHUD.md) · [inputAction](../commands/inputAction.md) · [removeAction](../commands/removeAction.md) · [removeAllActions](../commands/removeAllActions.md) · [weaponsInfo](../commands/weaponsInfo.md) · [shownAction](../commands/shownAction.md)

## Community notes

**Tom_48_97** — 2009-08-28

In Arma 2, you can place a unique unit (for example a boat, far of all combats) and use it for all command lines with action.

---

**DreadedEntity** — 2015-03-27

This command has no effect when a dead unit is used as input.

---

**DrSova** — 2017-06-27

```sqf
player action ["SWITCHWEAPON", player, player, -1]
```

Switching weapon to the back.

---

**Yuval** — 2017-07-20

Some of the actions (such as "DropWeapon") do not always execute, and there should be a set of conditions for them to run.
The unit must be able to perform the dropping animation in order for the action to properly execute.
So, if for example we spawn a unit at [0,0,0] and make it perform a "DropWeapon" action - it won't work if [0,0,0] is water (which it is, if the current map is an island) because the unit will be swimming.

Also, you cannot stack up actions right after the other. If you run a "DropWeapon" action when the current action animation is still going - it will not perform.
There are a few more conditions for an action to perform, but relying on a hundred percent success of the action is not a good practice.

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