-
Notifications
You must be signed in to change notification settings - Fork 151
Marker Events
commy2 edited this page Dec 12, 2017
·
1 revision
Marker Events are event handlers that are executed when a marker was created or deleted.
Marker Events are added via CBA_fnc_addMarkerEventHandler
. The function returns an ID that can be used to remove the event with CBA_fnc_removeMarkerEventHandler
later.
The events will only be executed if they were added on the local machine, but will execute for markers created or deleted on remote machines.
["created", {
params ["_newMarker"];
systemChat format ["Marker %1 was created", _newMarker];
}] call CBA_fnc_addMarkerEventHandler;
My_MarkerDeletedId = ["deleted", {
params ["_marker"];
if (_marker == "My_ImportantMarker") then {
systemChat "Marker was deleted";
["deleted", My_MarkerDeletedId] call CBA_fnc_removeMarkerEventHandler;
My_MarkerDeletedId = nil;
};
}] call CBA_fnc_removeMarkerEventHandler;