Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
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 615 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • DylanBeast777undefined Offline
    DylanBeast777undefined Offline
    DylanBeast777
    wrote on 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.

    chicken emojiundefined 1 Reply Last reply
    1
    • DylanBeast777undefined DylanBeast777
      #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.

      chicken emojiundefined Offline
      chicken emojiundefined Offline
      chicken emoji
      wrote on 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

      DylanBeast777undefined 1 Reply Last reply
      2
      • chicken emojiundefined chicken emoji

        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

        DylanBeast777undefined Offline
        DylanBeast777undefined Offline
        DylanBeast777
        wrote on last edited by
        #3

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

        Crowd Killerundefined 1 Reply Last reply
        0
        • DylanBeast777undefined DylanBeast777

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

          Crowd Killerundefined Offline
          Crowd Killerundefined Offline
          Crowd Killer
          wrote on 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

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

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