Description
Removes all unit's user added actions.
Note
This command's syntax was
unit removeAllActions numberfrom 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 either in a script variable or using setVariable.
Syntax
removeAllActions obj
Parameters:
obj: Object
Returns: Nothing
Examples
Example 1
removeAllActions player;
Example 2
Do
private _actionId = player addAction ["Heal self", { player setDamage 0; }];
// ...
player removeAction _actionId;
Don't
player addAction ["Heal self", { player setDamage 0; }];
// ...
removeAllActions player;
Example 3
Do
player addAction ["Heal self (once)", {
params ["_target", "", "_actionId"];
_target setDamage 0;
_target removeAction _actionId;
}];
Don't
player addAction ["Heal self (once)", {
player setDamage 0;
removeAllActions player;
}];
See also
actionIDs · actionParams · addAction · setUserActionText · inGameUISetEventHandler · showHUD · inputAction · removeAction · action