addMissionEventHandler: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " *\|MP *[Ee]ffects* *= * " to " ") |
Killzone Kid (talk | contribs) No edit summary |
||
Line 9: | Line 9: | ||
|gr1= Event Handlers | |gr1= Event Handlers | ||
| 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 <tt>_this</tt> variable. Since Arma 3 v.1.63.137807 the EH handle is also stored in <tt>_thisEventHandler</tt> variable and is available during EH code execution.<br> | | 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 <tt>_this</tt> variable. For the list of available mission event handlers see: [[Arma_3:_Event_Handlers/addMissionEventHandler]] | ||
{{Feature | informative |Since Arma 3 v.1.63.137807 the EH handle is also stored in <tt>_thisEventHandler</tt> variable and is available during EH code execution.<br> | |||
Since Arma 3 v.2.03.147276 it is possible to pass additional arguments to the EH code via optional param.}} | |||
| '''addMissionEventHandler''' [type, command] | | '''addMissionEventHandler''' [type, command] |
Revision as of 15:26, 15 February 2021
Description
- Description:
- Description needed
- Groups:
- Event Handlers
Syntax
- Syntax:
- Syntax needed
- Parameters:
- [type, command]: Array
- type: String
- command: Code or String - By default executed in missionNamespace
- Return Value:
- Return value needed
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
- See also:
- See also needed
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