removeMissionEventHandler: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(example)
No edit summary
Line 45: Line 45:
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
<!-- CONTINUE Notes -->
<dl class="command_description">
<dd class="notedate">Posted on August 6, 2015 - 22:02 (UTC)</dd>
<dt class="note">[[User:SilentSpike|SilentSpike]]</dt>
<dd class="note">
As of Arma 3 version 1.38 you can safely remove mission event handlers without worrying about decrementing higher indices.
</dd>
</dl>
<!-- DISCONTINUE Notes -->

Revision as of 00:02, 7 August 2015

Hover & click on the images for description

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

See also:
addMissionEventHandlerremoveAllMissionEventHandlers

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.