2018-09-17 19:19:29 +00:00
|
|
|
#include "script_component.hpp"
|
2015-01-11 16:42:31 +00:00
|
|
|
/*
|
|
|
|
* Author: commy2
|
|
|
|
* Remove a map marker creation event handler.
|
|
|
|
*
|
2015-09-19 17:26:45 +00:00
|
|
|
* Arguments:
|
|
|
|
* 0: ID of the event handler <NUMBER>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
2015-01-11 16:42:31 +00:00
|
|
|
*
|
2017-06-08 13:31:51 +00:00
|
|
|
* Example:
|
|
|
|
* [5] call ace_common_fnc_removeMapMarkerCreatedEventHandler
|
|
|
|
*
|
2015-09-19 17:26:45 +00:00
|
|
|
* Public: Yes
|
2015-01-11 16:42:31 +00:00
|
|
|
*/
|
|
|
|
|
2015-09-19 17:26:45 +00:00
|
|
|
params ["_id"];
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-12-14 12:08:19 +00:00
|
|
|
private _actionsVar = missionNamespace getVariable ["ACE_EventHandler_MapMarker", [-1, [], []]];
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-09-19 17:26:45 +00:00
|
|
|
_actionsVar params ["_currentId", "_actionIDs", "_actions"];
|
2015-01-11 16:42:31 +00:00
|
|
|
|
|
|
|
_id = _actionIDs find _id;
|
|
|
|
|
|
|
|
if (_id == -1) exitWith {};
|
|
|
|
|
|
|
|
_actionIDs set [_id, -1];
|
|
|
|
_actionIDs = _actionIDs - [-1];
|
|
|
|
|
|
|
|
_actions set [_id, []];//{}
|
|
|
|
_actions = _actions - [[]];//[{}]
|
|
|
|
|
2015-01-12 04:02:33 +00:00
|
|
|
missionNamespace setVariable ["ACE_EventHandler_MapMarker", [_currentId, _actionIDs, _actions]];
|