Casseburne 127 Posted February 28, 2019 Hi All ! I am pretty bad in script and even less on that of arma! So for a specific mission I have to randomly spawn 1 ammoBox on one of 5 possible positions. I think for example put traffic cones and replace randomly by a ammoBox but I can not do it. Any Ideas? Share this post Link to post Share on other sites
Grumpy Old Man 3549 Posted February 28, 2019 18 minutes ago, Casseburne said: Hi All ! I am pretty bad in script and even less on that of arma! So for a specific mission I have to randomly spawn 1 ammoBox on one of 5 possible positions. I think for example put traffic cones and replace randomly by a ammoBox but I can not do it. Any Ideas? You can simply place traffic cones and name them (cone1,cone2, etc.) then use the following to spawn an ammocrate on a random cones position: //init.sqf for SP _cones = [cone1,cone2,cone3,cone4,cone5]; _pos = getPosATL selectRandom _cones; {deleteVehicle _x} forEach _cones; _crate = "B_CargoNet_01_ammo_F" createVehicle _pos; _crate setPosATL _pos;//just in case createVehicle doesn't place it properly Cheers 2 Share this post Link to post Share on other sites
Casseburne 127 Posted February 28, 2019 Or other script Quote _cache = "Box_East_Wps_F"; _cachePos = (selectRandom [cachePos01, cachePos02, cachePos03]); cacheArme01 = createVehicle [_cache , _cachePos modelToWorld [0, 0, 0], [], 0, "CAN_COLLIDE"]; sleep 0.5; {deleteVehicle _x} forEach [cachePos01, cachePos02, cachePos03]; Thank 🙂 Share this post Link to post Share on other sites