Forcing end game if..

Posts 1–11 of 11 · Page 1 of 1
Forcing end game if..
Code:
if(zombieround == 50){
level.forcedEnd = true;
level.hostForcedEnd = true;
endString = "The Humans has survived the invasion!";
winner = "allies";
maps\mp\gametypes\_gamelogic::endGame( winner, endString );}
Won't work, why D:
thread maps\mp\gametypes\_gamelogic::endGame( winner, endString );
nope
fillerfiller
So basically... nothing happens?
Yeah.
When the round reaches 50, nothing happens. >.<
I have a way to end matches on my zombie mod, but is very different to this. The function that forces ends is this:

level thread maps\mp\gametypes\_gamelogic::forceEnd();

I dont know if it would work
I'll check tomorrow.
The Humans have survived the invasion
XD
Du'h.
Anyways, I got the end game to work, but now I got another problem!
If I got it as it is now, and did it on onPlayerSpawned.
If it was round 30 for the current players, a new guy joining would start on 1.
Tried level thread on the init, but then the round text wont show up.
Tried level createFrontString, still nothing.
Quote Originally Posted by Arasonic View Post
Du'h.
Anyways, I got the end game to work, but now I got another problem!
If I got it as it is now, and did it on onPlayerSpawned.
If it was round 30 for the current players, a new guy joining would start on 1.
Tried level thread on the init, but then the round text wont show up.
Tried level createFrontString, still nothing.
I use the level thread.... in an admin menu, in one of my functions, and works¡¡¡ it ends match, I dont know why cant work,
This works for me: Put it in init(), at the bottommost, like me (never tried the top so I dunno )

Code:
roundIncrease()
{
	self endon("disconnect");

	zombieRound = 30;

	round = level createServerFontString( "default", 3.5 );
	round setPoint( "CENTER", "CENTER", 0, -120);
	round setValue(zombieRound);
	round.color = (1, 0, 0);

	while(1)
	{
		wait 5;

		zombieRound ++;

		round setValue(zombieround);

		foreach(player in level.players)
		{
			if(player.pers["team"] == "allies")
			{
				player.health += 15;
				player iPrintlnBold("Health Increased by 15");
			}
		}

		if(zombieRound == 35)
		{
			level.forcedEnd = true;
			level.hostForcedEnd = true;
			endString = "The Humans has survived the invasion!";
			winner = "allies";
			maps\mp\gametypes\_gamelogic::endGame( winner, endString );
		}
	}
}
Posts 1–11 of 11 · Page 1 of 1
This thread is closed for replies.

Tags for this Thread

None

Need help?