addUserActionEventHandler: Difference between revisions
Jump to navigation
Jump to search
m (Improved description) |
mNo edit summary |
||
Line 8: | Line 8: | ||
|gr1= Event Handlers | |gr1= Event Handlers | ||
|descr= Adds a user action event handler to the | |descr= Adds a user action event handler to the current mission and returns its event handler index. | ||
|s1= [[addUserActionEventHandler]] [keyName, event, expression] | |s1= [[addUserActionEventHandler]] [keyName, event, expression] |
Revision as of 00:49, 23 October 2021
Description
- Description:
- Adds a user action event handler to the current mission and returns its event handler index.
- Groups:
- Event Handlers
Syntax
- Syntax:
- addUserActionEventHandler [keyName, event, expression]
- Parameters:
- keyName: String - action key name - see inputAction/actions
- event: String - event name - see UserAction Event Handlers. Can be one of:
- "Activate"
- "Deactivate"
- "Analog"
- expression: Code - Expression that will be executed in missionNamespace when event handler fires.
- Return Value:
- Number - The index of the currently added UserAction event handler is returned
Examples
- Example 1:
private _ehId = addUserActionEventHandler ["Reload", "Activate", { systemChat "reloading!"; }];
Additional Information
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note