addUserActionEventHandler: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) (Page creation) |
Lou Montana (talk | contribs) m (Fix) |
||
Line 10: | Line 10: | ||
|gr1= Event Handlers | |gr1= Event Handlers | ||
|descr= Adds event handler attached to the current mission and returns event handler handle. For | |descr= Adds event handler attached to the current mission and returns event handler handle. For a list of available UserAction event handlers, see: [[Arma 3: Mission Event Handlers]]. | ||
|s1= [[addUserActionEventHandler]] [keyName, event, expression] | |s1= [[addUserActionEventHandler]] [keyName, event, expression] | ||
|p1= | |p1= keyName: [[String]] - action key name - see [[inputAction/actions]] | ||
|p2= event: [[String]] - event name - see [[Arma 3: Event Handlers#UserAction Event Handlers|UserAction Event Handlers]]. Can be one of: | |p2= event: [[String]] - event name - see [[Arma 3: Event Handlers#UserAction Event Handlers|UserAction Event Handlers]]. Can be one of: |
Revision as of 11:02, 16 June 2021
Description
- Description:
- Adds event handler attached to the current mission and returns event handler handle. For a list of available UserAction event handlers, see: Arma 3: Mission Event Handlers.
- 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", "Activated", { 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