1para{god-father} 105 Posted December 17, 2015 Does anyone have a script that will spawn a Ammo crate at all military compounds around the map ? *SOLVED* just grabbed the heli pads for now as done the Job :) if (!isServer) exitWith {}; private ["_marker","_boxes","_town","_newpos","_numb","_boxnum","_box","_townpos","_bases"]; _heliPadClasses = ["Land_HelipadSquare_F","Land_HelipadRescue_F","Land_HelipadCivil_F"]; _bases= nearestObjects[position server,_heliPadClasses,500000]; _boxes = ["Box_NATO_AmmoOrd_F","Box_NATO_AmmoOrd_F","Box_NATO_AmmoOrd_F"]; //random later boxescashe = 30; while {boxescashe > 0} do { _boxestype = _boxes call BIS_fnc_selectRandom; _town = _bases call BIS_fnc_selectRandom; _bases = _bases - [_town]; _townpos = (position _town); _townnewpos = [_townpos, 1, 15, 1, 0, 60, 0] call BIS_fnc_findSafePos; _box = createVehicle [_boxestype,_townnewpos,[], 0, "NONE"]; nul = [_box] execVM "crates\cratefiller.sqf"; boxescashe = boxescashe - 1; _cid = floor(random 100000); _markera = createMarker[format["marker%1",_cid],getPos _box ]; _markera setMarkerShape "ICON"; _markera setMarkerType "mil_dot"; _markera setMarkercolor "ColorBlue"; }; Share this post Link to post Share on other sites
booshisloose 0 Posted December 18, 2015 Cheers, this will be very useful. One question though, Does this work for RHSUSAF and RHSAFRF? Share this post Link to post Share on other sites
R3vo 2654 Posted December 18, 2015 _cid = floor(random 100000); Rounding in this line actually increases the chance of duplication and is obsolete besides. _cid = random 100000; 1 Share this post Link to post Share on other sites