Jump to navigation Jump to search
- Adds a user action event handler to the current mission and returns its event handler index.
- Event Handlers
- addUserActionEventHandler [keyName, event, expression]
- keyName: String - action key name - see inputAction/actions
- event: String - event name - see UserAction Event Handlers. Can be one of:
- expression: Code - Expression that will be executed in missionNamespace when event handler fires.
The Event Handler index is available as _thisEventHandler during Event Handler code execution.
- Return Value:
- Number - The index of the currently added UserAction event handler is returned
- Example 1: