Randomize an array of names in gsc for gun game mp
			
			BO2 Modding Support & Discussion
		
3
Posts
2
Posters
177
Views
1
Watching
- 
I am trying to randomize a array of all the gun names to have a random gun game order but gsc doesn't have a 'shuffle' function. Is there another way to do this? The array is below. allgunslist = array("mp7_mp", "pdw57_mp", "vector_mp", "insas_mp", "qcw05_mp", "evoskorpion_mp", "peacekeeper_mp", "tar21_mp", "type95_mp", "sig556_mp", "sa58_mp", "hk416_mp", "scar_mp", "saritch_mp", "xm8_mp", "an94_mp", "870mcs_mp", "saiga12_mp", "ksg_mp", "srm1216_mp", "mk48_mp", "qbb95_mp", "lsat_mp", "hamr_mp", "svu_mp", "dsr50_mp", "ballista_mp", "as50_mp", "beretta93r_dw_mp", "fiveseven_mp", "fnp45_dw_mp", "judge_mp", "kard_mp", "smaw_mp", "usrpg_mp", "crossbow_mp", "knife_ballistic_mp", "minigun_wager_mp", "m32_wager_mp");```
- 
Thanks to the discord I figured out to #include common_scripts\utility and use array_randomize(array) 
- 
In the future you can search in the game's code directly here, even with no experience searching "randomize" shows up array_randomize in the first results, and in case of unresolved external errors you can try adding the includes at the top of that file, of course pick ones that make sense https://github.com/search?q=repo%3Aplutoniummod%2Ft6-scripts randomize&type=code 

