39 lines
994 B
Plaintext
39 lines
994 B
Plaintext
params [
|
|
["_className", "", [""]],
|
|
["_markerType", "hd_dot", [""]],
|
|
["_markerColor", "", [""]],
|
|
["_positions", [], []]
|
|
];
|
|
|
|
if (count _className isEqualTo 0) exitWith {
|
|
["No class name provided!"] call BIS_fnc_error;
|
|
};
|
|
if (count _markerColor isEqualTo 0) exitWith {
|
|
["No marker color provided!"] call BIS_fnc_error;
|
|
};
|
|
if (count _positions isEqualTo 0) exitWith {
|
|
["No positions provided!"] call BIS_fnc_error;
|
|
};
|
|
|
|
private _assetMarkerStore = localNamespace getVariable [
|
|
"milsim_fbcb2_assets_markerStore",
|
|
[]
|
|
];
|
|
|
|
private _start = (count _assetMarkerStore) + 1;
|
|
{
|
|
_position = _x;
|
|
_newMarker = createMarkerLocal [
|
|
format["milsim_fbcb2_assets_marker_%1", _start],
|
|
_position
|
|
];
|
|
_newMarker setMarkerTypeLocal _markerType;
|
|
_newMarker setMarkerColorLocal _markerColor;
|
|
_newMarker setMarkerTextLocal str(_start);
|
|
|
|
_assetMarkerStore pushBack _newMarker;
|
|
_start = _start + 1;
|
|
} forEach _positions;
|
|
|
|
localNamespace setVariable ["milsim_fbcb2_assets_markerStore", _assetMarkerStore];
|