removeMissionEventHandler: Difference between revisions
Jump to navigation
Jump to search
SilentSpike (talk | contribs) No edit summary |
m (template:command argument fix) |
||
Line 13: | Line 13: | ||
| '''removeMissionEventHandler''' [type, index] |= Syntax | | '''removeMissionEventHandler''' [type, index] |= Syntax | ||
|p1= type: [[String]] |= | |p1= type: [[String]] |PARAMETER1= | ||
|p2= index: [[Number]] - Index is returned by addMissionEventHandler. |= | |p2= index: [[Number]] - Index is returned by addMissionEventHandler. |PARAMETER2= | ||
| [[Nothing]] |= | | [[Nothing]] |RETURNVALUE= | ||
Line 24: | Line 24: | ||
[[missionNamespace]] [[setVariable]] [ [[format]] ["handler%1",_i],[[addMissionEventHandler]] ["Loaded","hint ""_i"";"]]; | [[missionNamespace]] [[setVariable]] [ [[format]] ["handler%1",_i],[[addMissionEventHandler]] ["Loaded","hint ""_i"";"]]; | ||
}; | }; | ||
[[removeMissionEventHandler]] ["Loaded",handler2]; //Remove the third index under type "Loaded"</code>|= | [[removeMissionEventHandler]] ["Loaded",handler2]; //Remove the third index under type "Loaded"</code>|EXAMPLE1= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| [[addMissionEventHandler]], [[removeAllMissionEventHandlers]] |= | | [[addMissionEventHandler]], [[removeAllMissionEventHandlers]] |SEEALSO= | ||
| |= | | |MPBEHAVIOUR= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
}} | }} |
Revision as of 10:36, 7 April 2019
Description
- Description:
- Removes mission event handler added by addMissionEventHandler. When any handler is removed, all handler indices higher that the deleted one should be decremented.
- Groups:
- Uncategorised
Syntax
- Syntax:
- removeMissionEventHandler [type, index]
- Parameters:
- type: String
- index: Number - Index is returned by addMissionEventHandler.
- Return Value:
- Nothing
Examples
- Example 1:
for "_i" from 0 to 4 do { missionNamespace setVariable [ format ["handler%1",_i],addMissionEventHandler ["Loaded","hint ""_i"";"]]; }; removeMissionEventHandler ["Loaded",handler2]; //Remove the third index under type "Loaded"
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
Notes
Bottom Section
- Posted on August 6, 2015 - 22:02 (UTC)
- SilentSpike
- As of Arma 3 version 1.38 you can safely remove mission event handlers without worrying about decrementing higher indices.