2015-01-11 16:42:31 +00:00
|
|
|
/*
|
|
|
|
* Author: commy2
|
|
|
|
*
|
|
|
|
* Remove a map marker creation event handler.
|
|
|
|
*
|
|
|
|
* Argument:
|
|
|
|
* 0: ID of the event handler (Number)
|
|
|
|
*
|
|
|
|
* Return value:
|
|
|
|
* None.
|
|
|
|
*/
|
2015-01-13 19:56:02 +00:00
|
|
|
#include "script_component.hpp"
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-05-14 18:06:06 +00:00
|
|
|
private ["_actionsVar", "_currentId", "_actionIDs", "_actions"];
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-05-14 18:06:06 +00:00
|
|
|
PARAMS_1(_id);
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-01-12 04:02:33 +00:00
|
|
|
_actionsVar = missionNamespace getVariable ["ACE_EventHandler_MapMarker", [-1, [], []]];
|
2015-01-11 16:42:31 +00:00
|
|
|
|
|
|
|
_currentId = _actionsVar select 0;
|
|
|
|
_actionIDs = _actionsVar select 1;
|
|
|
|
_actions = _actionsVar select 2;
|
|
|
|
|
|
|
|
_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]];
|