9. Zombie Zähler (Zombie Counter)
1. Öffne Deine Mapname.gsc und füge folgendes an das Ende:
2. suche nach main() und füge
irgendwo in die Function main ein.
ZM Tut - Zombie Counter
1. Öffne Deine Mapname.gsc und füge folgendes an das Ende:
Code:
zombiesleft_hud()
{
Remaining = create_simple_hud();
Remaining.horzAlign = "center";
Remaining.vertAlign = "middle";
Remaining.alignX = "Left";
Remaining.alignY = "middle";
Remaining.y = 230;
Remaining.x = 60;
Remaining.foreground = 1;
Remaining.fontscale = 8.0;
Remaining.alpha = 1;
Remaining.color = ( 0.423, 0.004, 0 );
ZombiesLeft = create_simple_hud();
ZombiesLeft.horzAlign = "center";
ZombiesLeft.vertAlign = "middle";
ZombiesLeft.alignX = "center";
ZombiesLeft.alignY = "middle";
ZombiesLeft.y = 230;
ZombiesLeft.x = -1;
ZombiesLeft.foreground = 1;
ZombiesLeft.fontscale = 8.0;
ZombiesLeft.alpha = 1;
ZombiesLeft.color = ( 0.423, 0.004, 0 );
ZombiesLeft SetText("Zombies Left: ");
while(1)
{
remainingZombies = get_enemy_count() + level.zombie_total;
Remaining SetValue(remainingZombies);
if(remainingZombies == 0 )
{
Remaining.alpha = 0;
while(1)
{
remainingZombies = get_enemy_count() + level.zombie_total;
if(remainingZombies != 0 )
{
Remaining.alpha = 1;
break;
}
wait 0.5;
}
}
wait 0.5;
}
}
2. suche nach main() und füge
Code:
thread zombiesleft_hud();
ZM Tut - Zombie Counter