UGX-Mods

Call of Duty: Black Ops 3 => Tutorial Desk => Scripting => Topic started by: wumbi on October 03, 2016, 05:59:17 am

Title: [Tutorial] How to Change your Starting Weapon
Post by: wumbi on October 03, 2016, 05:59:17 am
This post will  teach you how to change the starting weapon on your map.
Step 1: Naviagte to root/usermaps/scripts/zm/mapname.gsc

Step 2: Below this line:

Code Snippet
Plaintext
zm_usermap::main();

Add this code
Code Snippet
Plaintext
	startingWeapon = "ray_gun";
weapon = getWeapon(startingWeapon);
level.start_weapon = (weapon);

Make sure to change ray_gun to the weapon of your choice. List of current weapons included in the stock map can be found here: https://confluence.ugx-mods.com/display/UGXMODS/BO3+%7C+Weapon+List (https://confluence.ugx-mods.com/display/UGXMODS/BO3+%7C+Weapon+List)

Step 4. Save and close, then check the Link box when building your map or else changes WILL NOT TAKE EFFECT!

Done! You have successfully changed your starting weapon!
(https://www.ugx-mods.com/forum/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FROKcpoW.gifv&hash=b263bf31412f47d7d26ded40b3b656a8df02e2f4)
Title: Re: [Tutorial] How to Change your Starting Weapon
Post by: CanadianTyler on October 03, 2016, 04:55:41 pm
Works Great  :D
Title: Re: [Tutorial] How to Change your Starting Weapon
Post by: peleon02 on October 24, 2016, 02:18:19 pm
Works great, Can you put that when you die the weapon be the start weapon?
Title: Re: [Tutorial] How to Change your Starting Weapon
Post by: IceGrenade on January 03, 2017, 02:31:01 am
I just write:
Code Snippet
Plaintext
level.start_weapon = getWeapon("weapon_name");
No need for 3 lines.
Title: Re: [Tutorial] How to Change your Starting Weapon
Post by: Minepro14 on January 04, 2017, 01:22:16 am
Works great, Can you put that when you die the weapon be the start weapon?

//playing coop

level.default_laststandpistol = GetWeapon("your weapon");

//playing solo

level.default_solo_laststandpistol = GetWeapon("your weapon");
Title: Re: [Tutorial] How to Change your Starting Weapon
Post by: Galerame on April 24, 2017, 08:32:15 pm
Helo, I making a challange map with just wonder-weapons like ray-gun, thundergun, etc. And want the weapons to change randomly every level. (and if it go) I also want the script to know "if" the weapon is upgraded, you will get a randomly upgraded of this wonder-guns. Had been fun if you help me.