Skip to content
  • 0 Unread 0
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Collapse

Plutonium

  1. Home
  2. BO2 Modding Support & Discussion
  3. Just a Question for Teh_Bandit

Just a Question for Teh_Bandit

Scheduled Pinned Locked Moved BO2 Modding Support & Discussion
4 Posts 3 Posters 508 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.
  • WolflexZundefined Online
    WolflexZundefined Online
    WolflexZ
    Contributor
    wrote on last edited by
    #1

    teh_bandit If you don't mind me asking. Your ColdWar Mod for zombies. I really like your concept of the healthbar. I was wondering if you can separate it from the rest of your scripts and make it an individual script that works.

    Kalitosundefined 1 Reply Last reply
    1
    • WolflexZundefined WolflexZ

      teh_bandit If you don't mind me asking. Your ColdWar Mod for zombies. I really like your concept of the healthbar. I was wondering if you can separate it from the rest of your scripts and make it an individual script that works.

      Kalitosundefined Offline
      Kalitosundefined Offline
      Kalitos
      wrote on last edited by Kalitos
      #2

      WolflexZ

      #include common_scripts\utility;
      #include maps\mp\zombies\_zm;
      #include maps\mp\zombies\_zm_weapons;
      #include maps\mp\zombies\_zm_utility;
      #include maps\mp\gametypes_zm\_hud_util;
      #include maps\mp\gametypes_zm\_hud_message;
      #include maps\mp\_utility;
      
      
      init()
      {
      			
      	level thread onPlayerConnect();	
      	
      }
      
      onPlayerConnect()
      {
      	for(;;)
      	{
      		level waittill("connected", player);
                      player thread health_bar_hud();	
      	}
      }
      
      
      
      
      health_bar_hud()
      {
      	level endon("end_game");
      	self endon("disconnect");
      	flag_wait("initial_blackscreen_passed");
      
      	health_bar = self createprimaryprogressbar();
      	if (level.script == "zm_buried")
      	{
      		health_bar setpoint(undefined, "BOTTOM", -335, -95);
      	}
      	else if (level.script == "zm_tomb")
      	{
      		health_bar setpoint(undefined, "BOTTOM", -335, -100);
      	}
      	else
      	{
      		health_bar setpoint(undefined, "BOTTOM", -335, -70);
      	}
      	health_bar.hidewheninmenu = 1;
      	health_bar.bar.hidewheninmenu = 1;
      	health_bar.barframe.hidewheninmenu = 1;
      
      	health_bar_text = self createprimaryprogressbartext();
      	if (level.script == "zm_buried")
      	{
      		health_bar_text setpoint(undefined, "BOTTOM", -410, -95);
      	}
      	else if (level.script == "zm_tomb")
      	{
      		health_bar_text setpoint(undefined, "BOTTOM", -410, -100);
      	}
      	else
      	{
      		health_bar_text setpoint(undefined, "BOTTOM", -410, -70);
      	}
      	health_bar_text.hidewheninmenu = 1;
      
      	while (1)
      	{
      		if (isDefined(self.e_afterlife_corpse))
      		{
      			if (health_bar.alpha != 0)
      			{
      				health_bar.alpha = 0;
      				health_bar.bar.alpha = 0;
      				health_bar.barframe.alpha = 0;
      				health_bar_text.alpha = 0;
      			}
      			
      			wait 0.05;
      			continue;
      		}
      
      		if (health_bar.alpha != 1)
      		{
      			health_bar.alpha = 1;
      			health_bar.bar.alpha = 1;
      			health_bar.barframe.alpha = 1;
      			health_bar_text.alpha = 1;
      		}
      
      		health_bar updatebar(self.health / self.maxhealth);
      		health_bar_text setvalue(self.health);
      
      		wait 0.05;
      	}
      }
      
      WolflexZundefined 1 Reply Last reply
      4
      • Kalitosundefined Kalitos

        WolflexZ

        #include common_scripts\utility;
        #include maps\mp\zombies\_zm;
        #include maps\mp\zombies\_zm_weapons;
        #include maps\mp\zombies\_zm_utility;
        #include maps\mp\gametypes_zm\_hud_util;
        #include maps\mp\gametypes_zm\_hud_message;
        #include maps\mp\_utility;
        
        
        init()
        {
        			
        	level thread onPlayerConnect();	
        	
        }
        
        onPlayerConnect()
        {
        	for(;;)
        	{
        		level waittill("connected", player);
                        player thread health_bar_hud();	
        	}
        }
        
        
        
        
        health_bar_hud()
        {
        	level endon("end_game");
        	self endon("disconnect");
        	flag_wait("initial_blackscreen_passed");
        
        	health_bar = self createprimaryprogressbar();
        	if (level.script == "zm_buried")
        	{
        		health_bar setpoint(undefined, "BOTTOM", -335, -95);
        	}
        	else if (level.script == "zm_tomb")
        	{
        		health_bar setpoint(undefined, "BOTTOM", -335, -100);
        	}
        	else
        	{
        		health_bar setpoint(undefined, "BOTTOM", -335, -70);
        	}
        	health_bar.hidewheninmenu = 1;
        	health_bar.bar.hidewheninmenu = 1;
        	health_bar.barframe.hidewheninmenu = 1;
        
        	health_bar_text = self createprimaryprogressbartext();
        	if (level.script == "zm_buried")
        	{
        		health_bar_text setpoint(undefined, "BOTTOM", -410, -95);
        	}
        	else if (level.script == "zm_tomb")
        	{
        		health_bar_text setpoint(undefined, "BOTTOM", -410, -100);
        	}
        	else
        	{
        		health_bar_text setpoint(undefined, "BOTTOM", -410, -70);
        	}
        	health_bar_text.hidewheninmenu = 1;
        
        	while (1)
        	{
        		if (isDefined(self.e_afterlife_corpse))
        		{
        			if (health_bar.alpha != 0)
        			{
        				health_bar.alpha = 0;
        				health_bar.bar.alpha = 0;
        				health_bar.barframe.alpha = 0;
        				health_bar_text.alpha = 0;
        			}
        			
        			wait 0.05;
        			continue;
        		}
        
        		if (health_bar.alpha != 1)
        		{
        			health_bar.alpha = 1;
        			health_bar.bar.alpha = 1;
        			health_bar.barframe.alpha = 1;
        			health_bar_text.alpha = 1;
        		}
        
        		health_bar updatebar(self.health / self.maxhealth);
        		health_bar_text setvalue(self.health);
        
        		wait 0.05;
        	}
        }
        
        WolflexZundefined Online
        WolflexZundefined Online
        WolflexZ
        Contributor
        wrote on last edited by
        #3

        Kalitos Thanks!

        1 Reply Last reply
        0
        • teh_banditundefined Offline
          teh_banditundefined Offline
          teh_bandit
          wrote on last edited by
          #4

          glad someone told u, have a great day

          1 Reply Last reply
          1

          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
          • Unread 0
          • Recent
          • Tags
          • Popular
          • Users
          • Groups