// This script is run on an Invade & Annex mission server that has be up for several hours.
findObjects = {
_set = _this select 0;
_markMap = _this select 1;
{ if ((markerAlpha _x) == 0.77) then { deleteMarkerLocal _x; }; } forEach allMapMarkers;
{
_t = typeOf _x;
_a = profileNamespace getVariable ["all",[]];
if (!(_t in _a)) then {
_a set [count _a,_t];
profileNamespace setVariable ["all",_a];
profileNamespace setVariable [_t,0];
};
if (_markMap) then {
_id = netId _x;
createMarkerLocal [_id, [0,0,0]];
_id setMarkerShapeLocal "ICON";
_id setMarkerColorLocal "ColorGreen";
_id setMarkerSizeLocal [1,1];
_id setMarkerTypeLocal "mil_dot";
_id setMarkerAlphaLocal 0.77;
_id setMarkerPosLocal position _x;
_id setMarkerDirLocal direction _x;
_id setMarkerTextLocal typeOf _x;
};
_c = profileNamespace getVariable [_t,0];
_c = _c + 1;
profileNamespace setVariable [_t,_c];
} forEach _set;
_a = profileNamespace getVariable ["all",[]];
{ systemChat str [_x,profileNamespace getVariable _x]; } forEach _a;
};
[
(allMissionObjects "") - (allMissionObjects "All"),
true
] spawn findObjects;