UGX-Mods

Call of Duty: Black Ops 3 => Help Desk => Scripting => Topic started by: Rangfarl on October 02, 2016, 03:35:13 am

Title: Putting all weapons into a array.
Post by: Rangfarl on October 02, 2016, 03:35:13 am
Hi, first time posting. I am working on a mod and I need all the weapons put into a array. I had a nice short way that I was using on other cods, but it does not work in black ops 3. I currently have it set up like this, but its I like simple, and trying to find a shorter way. I have about half of the guns in the array, the way i'm doing now.  Any help is much appreciated.
Spoiler: click to open...
Code Snippet
Plaintext
		level.RandWeapon = [];
level.RandWeapon[0] = "pistol_burst";
level.RandWeapon[1] = "pistol_fullauto";
level.RandWeapon[2] = "smg_versatile";
level.RandWeapon[3] = "smg_fastfire";
level.RandWeapon[4] = "ar_standard";
Title: Re: Putting all weapons into a array.
Post by: DidUknowiPwn on October 02, 2016, 04:30:05 am
Weapons are their own structs now you must use:

weap = GetWeapon(string);

and store weap.
Title: Re: Putting all weapons into a array.
Post by: Rangfarl on October 02, 2016, 02:04:01 pm
Weapons are their own structs now you must use:

weap = GetWeapon(string);

and store weap.
ok thank you, wasn't sure if I could use, level.zombie_weapons , Like i did in black ops 1.
Title: Re: Putting all weapons into a array.
Post by: DidUknowiPwn on October 02, 2016, 04:40:47 pm
There is a global array for weapon.