Skip to content

Instantly share code, notes, and snippets.

@jameslkingsley
Last active March 24, 2017 22:41
Show Gist options
  • Save jameslkingsley/476dc6945cd6983451f8726a91a3bd8f to your computer and use it in GitHub Desktop.
Save jameslkingsley/476dc6945cd6983451f8726a91a3bd8f to your computer and use it in GitHub Desktop.
private _bestPlaces = selectBestPlaces [
getArray (configFile >> "CfgWorlds" >> worldName >> "centerPosition"),
worldSize,
"houses",
25,
1
];
private _startCenter = (_bestPlaces param [0, [[0,0,0]]]) param [0];
"Center" setMarkerPos _startCenter;
"Objectives" setMarkerPos getMarkerPos "Center";
{
_x setmarkerpos (["Center", true] call CBA_fnc_randPosArea);
} forEach ["marker_1", "marker_2", "marker_3","marker_4", "marker_5", "marker_6"];
{
_pos = ["Objectives", false] call CBA_fnc_randPosArea;
_x setmarkerpos _pos;
if (!surfaceIsWater _pos) then {
_box = "B_supplyCrate_F" createVehicle _pos;
[{params ["_box", "_marker"]; !alive _box;}, {
params ["_box", "_marker"];
_marker setMarkerColor "ColorGreen";
}, [_box, _x]] call CBA_fnc_waitUntilAndExecute;
};
} forEach ["Cache1", "Cache2", "Cache3"];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment