Invasion: Number of Waves Survived
Invasion: Number of Waves Survived
Does anyone know how to display the amount of waves survived in an Invasion game? I'm trying to do this for the final version of Project 115 for the Zombies mode.
e.g. GameOver! You Survived (current wave) Waves.
Something like this: (This script is from Demon Defense by Chubzdoomer)
while(TRUE)
{
SetFont("BIGFONT");
HudMessage(s:"WAVE ",
d: waveNumber;
HUDMSG_PLAIN | HUDMSG_COLORSTRING, 2, "Red", 0.50, 0.02, 1.0);
Not like this:
script 244 death
{
While((GetInvasionWave() != 2))
{
delay(1);
}
setfont("bigfont");
print(s:"\clGame Over\n\clyou survived 2 Waves");
delay(7);
restart;
}
Sorry if this sounds confusing, but I'm trying my best to describe it.
e.g. GameOver! You Survived (current wave) Waves.
Something like this: (This script is from Demon Defense by Chubzdoomer)
while(TRUE)
{
SetFont("BIGFONT");
HudMessage(s:"WAVE ",
d: waveNumber;
HUDMSG_PLAIN | HUDMSG_COLORSTRING, 2, "Red", 0.50, 0.02, 1.0);
Not like this:
script 244 death
{
While((GetInvasionWave() != 2))
{
delay(1);
}
setfont("bigfont");
print(s:"\clGame Over\n\clyou survived 2 Waves");
delay(7);
restart;
}
Sorry if this sounds confusing, but I'm trying my best to describe it.
RE: Invasion: Number of Waves Survived
Which one did you want? You used "Game over! You survived x waves!" as an example, but then said you did not want that.
RE: Invasion: Number of Waves Survived
I wanted the "Game Over! You Survived x Waves"
Sorry for the confusion.
Sorry for the confusion.
RE: Invasion: Number of Waves Survived
So basically this then:
You can add more logic for the case of only one wave survived, or a death during the warmup period.
Code: Select all
script 1 DEATH {
SetFont("BIGFONT");
HUDMessage(s:"Game over! You survived ", d:GetInvasionWave()-1, s:" waves!";
HUDMSG_PLAIN | HUDMSG_LOG, 0, CR_RED, 0.5, 0.02, 3.0);
}RE: Invasion: Number of Waves Survived
So I inserted the script into my mod and tested it out. It works and all but, it displays as i survived 1 wave even though I was on wave 2. So i changed the "d:GetInvasionWave()-1" to "d:GetInvasionWave()-0" and fixed the incorrect number of waves survived. Thank you Qent for solving this issue I had 
RE: Invasion: Number of Waves Survived
If you died in the second wave, you only survived one wave, so the script was correct as Qent posted it.
"For the world is hollow, and I have touched the sky."
RE: Invasion: Number of Waves Survived
Not to mention, making -1 to a -0 is pretty useless, you're better off just removing it. Although, this doesn't mean getting rid of -1 in first place is actually right!Empyre wrote: If you died in the second wave, you only survived one wave, so the script was correct as Qent posted it.
=== RAGNAROK DM ON ... uh... dead forever? ===
=== ALWAYS BET ON ... uh... dead forever? ===
=== Who wanta sum wang? ===
=== Death and Decay - A new Monster/Weapon replacer ===
=== ALWAYS BET ON ... uh... dead forever? ===
=== Who wanta sum wang? ===
=== Death and Decay - A new Monster/Weapon replacer ===
RE: Invasion: Number of Waves Survived
If you'll remove the -1 just rename it "You died on wave X".
[][][][][][][][][][][][][][][]
Nothing to see here
[][][][][][][][][][][][][][][]
Nothing to see here
[][][][][][][][][][][][][][][]


