pappagoat 6 Posted November 25, 2018 I have a selection of 4 helicopters already in the map (heli1, heli2, heli3, heli4) I want to create an array to randomly select one of those existing helicopters. Any help? I have not been able to get an array to work yet on object names. Share this post Link to post Share on other sites
davidoss 550 Posted November 25, 2018 _selectedHeli = selectrandom [heli1, heli2, heli3, heli4]; 1 Share this post Link to post Share on other sites
Belbo 461 Posted November 25, 2018 ppg_yourHelis = []; { private _name = str _x; if ( _name select [0,3] == "heli" ) then { ppg_yourHelis pushBack _x; }; nil; } count vehicles; Now ppg_yourHelis contains [hel1, heli2, heli3, heli4] And with this you can select one of these: private _oneHeli = selectRandom ppg_yourHelis; Share this post Link to post Share on other sites
pappagoat 6 Posted November 25, 2018 47 minutes ago, davidoss said: _selectedHeli = selectrandom [heli1, heli2, heli3, heli4]; Wow, thanks, that was simple and works beautifully. Share this post Link to post Share on other sites