Arma 3 Scripting

Command in Event Handlers

addUserActionEventHandler

Also available as Markdown and JSON, or read the original wiki page.

Description

Adds a user action event handler to the current mission and returns its event handler index.

Syntax

addUserActionEventHandler [keyName, event, expression]

Parameters:

Returns: Number - the index of the currently added UserAction event handler is returned

Examples

Example 1

private _ehId = addUserActionEventHandler ["ReloadMagazine", "Activate", { systemChat "reloading!"; }];

See also

removeUserActionEventHandler · removeAllUserActionEventHandlers · Arma 3: Event Handlers