Home > Community Toolbox Reference > Array utilities > Basic operations
Removes all items from the array.
Argument | Type | Usage | Description |
---|---|---|---|
array | Array |
Required | The array to clear. |
N/A
The following code clears pending dialogue commands before adding new ones.
function dialogue_jump(_branch) {
array_clear(ctrl_Dialogue.pending_commands);
array_foreach(_branch.commands, function(_command) {
array_push(ctrl_Dialogue.pending_commands, _command);
});
}
- 24.6.0 - Created a function to clear arrays.