I'm trying to make a max ammo reward that's given to players after completing every round. This is what I have so far but it does nothing.
-
#include maps/mp/zombies/_zm_utility; #include maps/mp/_utility; #include maps/_utility; #include common_scripts/utility; #include maps/mp/zombies/_zm_spawner; #include maps/mp/gametypes_zm/_hud_message; #include maps/mp/gametypes_zm/_hud_util; #include maps/mp/zombies/_zm_powerups; #include scripts/zm/remix/_powerups; init() { level thread onplayerconnect(); } onplayerconnect() { for (;;) { level waittill("connected", player); // when a player connects, they will thread this. player thread maxAmmo_setup(); } } maxAmmo_setup() { self endon("disconnect"); level endon("end_game"); self endon("end_game"); wait 5; for (;;) { level waittill("round_start"); self thread maxAmmoEveryRound(); } } maxAmmoEveryRound() { if (level.round_number >= 1) { //foreach (player in level.players) //{ level thread full_ammo_powerup_override(); // Change to max_ammo_powerup player thread full_ammo_powerup_override(); // Change to max_ammo //} } }
It compiles and loads fine but doesn't give any max ammo. Any help would be appreciated.
-
DylanBeast777 You should do the setup within a level scope and you can give the powerup by using
level maps\mp\zombies\_zm_powerups::specific_powerup_drop( "full_ammo", level.players[0].origin );
so for example this will make the level wait for the end of each round and then give the powerup
init() { level thread maxAmmoEveryRound(); } maxAmmoEveryRound(){ for(;;){ level waittill("end_of_round"); level maps\mp\zombies\_zm_powerups::specific_powerup_drop( "full_ammo", level.players[0].origin ); } }
You dont necessarily have to wait for "end_of_round" you can also use "start_of_round", which will also give the powerup when the first round starts. Alternatively you can use "between_round_over", which i think will give spectators time to respawn before giving the powerup
-
chicken emoji Thank you so much for your help! That works perfectly!
-
DylanBeast777 any chance you can help me learn how to make mode cuz youtubes useless they don't explain what there doing or even at time don't show you how