---
name: "removeAllActions"
type: command
status: ok
groups: ["Interaction"]
arma3_since: "0.50"
locality: {"argument": "global", "effect": "local", "server_exec": false}
source: https://community.bistudio.com/wiki/removeAllActions
revid: 329338
updated: 2022-07-27T10:37:51Z
---

# removeAllActions

*Command · Interaction · Arma 3 v0.50*

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

## Description

Removes all unit's user added actions.

> [!NOTE]
> This command's syntax was `unit removeAllActions number` from Arma 3 v0.50 to v1.06.

> [!IMPORTANT]
> Usage of this command is usually a bad practice unless justified by the situation; removing all actions in order to remove all actions that *one* added is not a good method as a mod or another script could have added its own actions as well and see them removed. Instead, store the action id returned by [addAction](../commands/addAction.md) either in a script variable or using [setVariable](../commands/setVariable.md).

## Syntax

```sqf
removeAllActions obj
```

**Parameters:**

- `obj`: [Object](../topics/Object.md)

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

## Examples

### Example 1

```sqf
removeAllActions player;
```

### Example 2

Do

```sqf
private _actionId = player addAction ["Heal self", { player setDamage 0; }];
// ...
player removeAction _actionId;
```

Don't

```sqf
player addAction ["Heal self", { player setDamage 0; }];
// ...
removeAllActions player;
```

### Example 3

Do

```sqf
player addAction ["Heal self (once)", {
    params ["_target", "", "_actionId"];
    _target setDamage 0;
    _target removeAction _actionId;
}];
```

Don't

```sqf
player addAction ["Heal self (once)", {
    player setDamage 0;
    removeAllActions player;
}];
```

## See also

[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) · [action](../commands/action.md)

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