Modme Forums
Menu:

Player Specific Starting Weapon

Game Modding | Call of Duty: Black Ops 3 | Scripting


ModmeBot:

Thread By: belly3031
How can I change the starting weapon based on what player you are? E.g Dempsey = Raygun, Richtofen = Wunderwaffe


ModmeBot:

Reply By: TheJaguarPlays

belly3031
How can I change the starting weapon based on what player you are? E.g Dempsey = Raygun, Richtofen = Wunderwaffe

To do this I have included the link from the original post, but I also included the instrcutions below.
https://aviacreations.com/modme/index.php?view=topic&tid=1872

Instructions:


<ol>
<li>Copy
zm_usermap.gsc
from
root\share\raw\scripts\zm into root\usermaps[mapname].gsc\scripts\zm
</li>
<li>Open the script file and navigate to
function giveCustomLoadout
and replace the entire function with the following code:</li>
</ol>
function giveCustomLoadout( takeAllWeapons, alreadySpawned ){
if(!isDefined(level.weapons) || level.weapons.size&lt;1){
//DEFINE YOUR WEAPONS HERE
level.weapons = [];
level.weapons[0] = "WEAPON_1"; //Dempsey
level.weapons[1] = "WEAPON_2"; //Takeo
level.weapons[2] = "WEAPON_3"; //Richtofen
level.weapons[3] = "WEAPON_4"; //Nikolai
}

weapon = getWeapon(level.weapons[self.characterIndex]);
self giveWeapon(level.weaponBaseMelee);
//self zm_utility::give_start_weapon(true);
self zm_weapons::weapon_give(weapon, false, false, true, 1);
}

3. Replace the four weapon names (e.g.
"WEAPON_1"
) with the four the weapons (their weaponfile names/what you put after
weapon,
in the zone file) you want s to spawn with (e.g.
lmg_slowfire
).
4. Open
[mapname].gsc
and add
#using scripts\zm\zm_usermap;
to the top of the file with the rest of the
#using
's.
5. In the
function main()
of
[mapname].gsc
add
zm_usermap::main();
6. Open
[mapname].zone
and add
scriptparsetree,scripts/zm/zm_usermap.gsc

Note: If you ever needs some more help there are many tutorials on Youtube, but also here's a link to a website where you can find all sorts of tutorials for mod tools.


ModmeBot:

Reply By: belly3031

TheJaguarPlays
belly3031 How can I change the starting weapon based on what player you are? E.g Dempsey = Raygun, Richtofen = Wunderwaffe To do this I have included the link from the original post, but I also included the instrcutions below. https://aviacreations.com/modme/index.php?view=topic&tid=1872 Instructions: Copy zm_usermap.gsc from root\share\raw\scripts\zm into root\usermaps[mapname].gsc\scripts\zm Open the script file and navigate to function giveCustomLoadout and replace the entire function with the following code: function giveCustomLoadout( takeAllWeapons, alreadySpawned ){ if(!isDefined(level.weapons) || level.weapons.size<1){ //DEFINE YOUR WEAPONS HERE level.weapons = []; level.weapons[0] = "WEAPON_1"; //Dempsey level.weapons[1] = "WEAPON_2"; //Takeo level.weapons[2] = "WEAPON_3"; //Richtofen level.weapons[3] = "WEAPON_4"; //Nikolai } weapon = getWeapon(level.weapons[self.characterIndex]); self giveWeapon(level.weaponBaseMelee); //self zm_utility::give_start_weapon(true); self zm_weapons::weapon_give(weapon, false, false, true, 1);} 3. Replace the four weapon names (e.g. "WEAPON_1") with the four the weapons (their weaponfile names/what you put after weapon, in the zone file) you want s to spawn with (e.g. lmg_slowfire). 4. Open [mapname].gsc and add #using scripts\zm\zm_usermap; to the top of the file with the rest of the #using's. 5. In the function main() of [mapname].gsc add zm_usermap::main(); 6. Open [mapname].zone and add scriptparsetree,scripts/zm/zm_usermap.gsc Note: If you ever needs some more help there are many tutorials on Youtube, but also here's a link to a website where you can find all sorts of tutorials for mod tools.

Thanks Bro!