addMissionEventHandler: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 5: | Line 5: | ||
|0.50|Game version= | |0.50|Game version= | ||
|gr2= Event Handlers |GROUP2= | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
Line 44: | Line 46: | ||
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]] | [[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]] | ||
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]] | [[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]] | ||
Revision as of 08:51, 19 September 2020
Description
- Description:
- Adds event handler (EH) attached to the current mission and returns EH handle. If EH has some data to return upon event, it is passed in _this variable. Since Arma 3 v.1.63.137807 the EH handle is also stored in _thisEventHandler variable and is available during EH code execution.
For the list of available mission event handlers see: Arma_3:_Event_Handlers/addMissionEventHandler - Groups:
- Event Handlers
Syntax
- Syntax:
- addMissionEventHandler [type, command]
- Parameters:
- [type, command]: Array
- type: String
- command: Code or String - By default executed in missionNamespace
- Return Value:
- Number - The index of the currently added mission event handler is returned.
Examples
- Example 1:
// A script could be executed to stop custom scripts graciously, or save progress & stats, for example: _id = addMissionEventHandler ["Ended",{ _this execVM "missionEnded.sqf" }];
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