hellstorm77 2 Posted December 7, 2015 Hello i was wondering if someone could help me. I trying to spawn Vehicles on markers. I would like to be able to set how may markers to use. So if i wanted 3 markers there would be 3 hunters on the map _veh = createVehicle ["B_MRAP_01_F", getMarkerPos "car1", ["car2","car3"], 0, "CAN_COLLIDE"]; Share this post Link to post Share on other sites
rowantrek 11 Posted December 8, 2015 EDIT: Wrong Forum Post Woops Share this post Link to post Share on other sites
Guest Posted December 8, 2015 Hello. I'm not really sure you can do this. And i can't check the wiki / function right now but I think you could use a forEach instead. _markerList = ["car_1","car_2"]; { "B_MRAP_01_F" createVehicle (getMarkerPos _x); } forEach _markerList; I will take a look into it later. Share this post Link to post Share on other sites
Larrow 2794 Posted December 8, 2015 Correct you would need to loop through an array of markers and spawn each vehicle. The markers array in the createVehicle command is to have that vehicle spawn at a random marker. Share this post Link to post Share on other sites
Guest Posted December 8, 2015 If the array is in a list you can randomly choose one this way. _index = round(random((count _myArray)-1)); Share this post Link to post Share on other sites
Kingsley1997 39 Posted December 8, 2015 If the array is in a list you can randomly choose one this way. _index = round(random((count _myArray)-1)); Or.... _index = _myArray call BIS_fnc_selectRandom; Share this post Link to post Share on other sites