Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Donate
Collapse

Plutonium

  1. Home
  2. BO2 Modding Support & Discussion
  3. 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.

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.

Scheduled Pinned Locked Moved BO2 Modding Support & Discussion
4 Posts 3 Posters 175 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • undefined Offline
    undefined Offline
    DylanBeast777
    wrote on Jun 3, 2023, 4:23 PM last edited by
    #1
    #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.

    undefined 1 Reply Last reply Jun 3, 2023, 5:28 PM
    1
    • undefined Offline
      undefined Offline
      chicken emoji
      replied to DylanBeast777 on Jun 3, 2023, 5:28 PM last edited by
      #2

      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

      undefined 1 Reply Last reply Jun 3, 2023, 5:57 PM
      2
      • undefined Offline
        undefined Offline
        DylanBeast777
        replied to chicken emoji on Jun 3, 2023, 5:57 PM last edited by
        #3

        chicken emoji Thank you so much for your help! That works perfectly!

        undefined 1 Reply Last reply Jun 3, 2023, 6:25 PM
        0
        • undefined Offline
          undefined Offline
          Crowd Killer
          replied to DylanBeast777 on Jun 3, 2023, 6:25 PM last edited by
          #4

          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

          1 Reply Last reply
          0

          4/4

          Jun 3, 2023, 6:25 PM

          • Login

          • Don't have an account? Register

          • Login or register to search.
          1 / 1
          • First post
            4/4
            Last post
          0
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Donate