



Login Issues
Forgot password?Activate Issues
Account activation email not received? Wrong account activation email used?Other Problems?
Contact Support - Help Center Get help on the UGX Discord. Join it now!![]() | |
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() | Has shown excellence and experience in the area of custom scripting in the UGX-Mods community. |
![]() BO3 Modtools Alpha | This user has access to the Black Ops 3 Modtools Alpha |
and a zombie spawns it goes up
!self thread BeginZMCounter();
//Code by WhiteDevilHD.
BeginZMCounter()
{
self endon( "disconnect" );
if( isDefined( self.ZM_Counter ) )
return;
self.ZM_Counter = CreateZMCounter(275, 465, "white", "white", (0,0,0), (0,1,0),true,(1,0,0) );
Previous_Percentage = 0;
while(1)
{
remainingZombies = (get_enemy_count() + level.zombie_total);
remainingZombies_percentage = ( 100 * remainingZombies ) / level.zombies_spawn_this_round;
if( Previous_Percentage != remainingZombies_percentage )
{
self.ZM_Counter thread UpdateProgressBar(0.5, int(remainingZombies_percentage) );
self.ZM_Counter thread UpdateProgressBarText(remainingZombies);
self.ZM_Counter thread colorOverTime(Previous_Percentage, remainingZombies_percentage);
Previous_Percentage = remainingZombies_percentage;
}
if( remainingZombies == 0 )
{
while(1)
{
remainingZombies = get_enemy_count() + level.zombie_total;
if(remainingZombies != 0 )
{
break;
}
wait 0.5;
}
}
wait 0.5;
}
}
CreateZMCounter(x, y, Shader_Background, Shader_ProgressBar, _BACKGROUND_COLOR, _BAR_COLOR, Text, _TEXT_COLOR)
{
HUD_BAR = [];
ProgressBar_BACKGROUND = newClientHudElem( self );
ProgressBar_BACKGROUND.x = x;
ProgressBar_BACKGROUND.y = y; // -265;
ProgressBar_BACKGROUND.alpha = 1;
ProgressBar_BACKGROUND.sort = -3;
ProgressBar_BACKGROUND SetShader(Shader_Background, 102, 6);
if( isDefined( _BACKGROUND_COLOR ) )
{
ProgressBar_BACKGROUND.color = _BACKGROUND_COLOR;
}
ProgressBar_BAR = newClientHudElem( self );
ProgressBar_BAR.x = (x+1);
ProgressBar_BAR.y = (y+1); // -265;
ProgressBar_BAR.frac = 0;
ProgressBar_BAR.alpha = 0;
ProgressBar_BAR.sort = -2;
ProgressBar_BAR SetShader(Shader_ProgressBar, 1, 4);
if( isDefined( _BAR_COLOR) )
{
ProgressBar_BAR.color = _BAR_COLOR;
}
if( isDefined( Text ) )
{
ZombiesLeft = newClientHudElem( self );
ZombiesLeft.x = (x+1);
ZombiesLeft.y = (y-11);
ZombiesLeft.foreground = 1;
ZombiesLeft.fontscale = 1.05;
ZombiesLeft.alpha = 1;
ZombiesLeft.sort = 0;
ZombiesLeft.color = ( _TEXT_COLOR );
ZombiesLeft SetText("Zombies Left: ");
ZombiesLeft_SHADOW = newClientHudElem( self );
ZombiesLeft_SHADOW.x = (x+2);
ZombiesLeft_SHADOW.y = (y-11);
ZombiesLeft_SHADOW.foreground = 1;
ZombiesLeft_SHADOW.fontscale = 1.05;
ZombiesLeft_SHADOW.alpha = 0.4;
ZombiesLeft_SHADOW.sort = -1;
ZombiesLeft_SHADOW.color = ( 0,0,0 );
ZombiesLeft_SHADOW SetText("Zombies Left: ");
HUD_BAR[2] = ZombiesLeft;
HUD_BAR[3] = ZombiesLeft_SHADOW;
}
HUD_BAR[0] = ProgressBar_BACKGROUND;
HUD_BAR[1] = ProgressBar_BAR;
return HUD_BAR;
}
UpdateProgressBar(Time, Value)
{
self[1].alpha = 1;
IsNull = false;
if(Value == 0)
{
Value = 1;
IsNull = true;
}
self[1] scaleOverTime(Time, Value, 4);
if(IsNull)
{
wait(time);
self[1].alpha = 0;
}
}
UpdateProgressBarText(Text)
{
if( isDefined( self[2] ) )
{
self[3] SetText("Zombies Left: " + Text + ".");
self[2] SetText("Zombies Left: " + Text + ".");
}
}
colorOverTime(FromValue,Tovalue)
{
AmmountEachTime = (Tovalue - FromValue) / 10;
for( i = 1; i < 11; i++ )
{
self[1].color = ( ( FromValue + ( i * AmmountEachTime ) ) / 100 , ( 100 - ( FromValue + ( i * AmmountEachTime ) ) ) / 100, 0 );
self[2].color = ( ( FromValue + ( i * AmmountEachTime ) ) / 100 , ( 100 - ( FromValue + ( i * AmmountEachTime ) ) ) / 100, 0 );
wait(0.05);
}
} //Intricate - Declare variable for ZM counter
level.zombies_spawn_this_round = undefined;
//
// Sets up function pointers for animscripts to refer to
level.playerlaststand_func = ::player_laststand;
// level.global_kill_func = maps\_zombiemode_spawner::zombie_death;
//DUKIP - Edit for the ZM counter
level.zombies_spawn_this_round = max;
//
level.zombie_total = max;
mixed_spawns = 0; // Number of mixed spawns this round. Currently means number of dogs in a mixed round
// DEBUG HACK:
//max = 1;
old_spawn = undefined;
while( count < max )


