Results 1 to 11 of 11
  1. #1
    Arasonic's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    569
    Reputation
    11
    Thanks
    115

    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:

  2. #2
    YuDi21's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Location
    mp_complex
    Posts
    141
    Reputation
    12
    Thanks
    35
    My Mood
    Angelic
    thread maps\mp\gametypes\_gamelogic::endGame( winner, endString );

  3. #3
    Arasonic's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    569
    Reputation
    11
    Thanks
    115
    nope
    fillerfiller

  4. #4
    Shucker's Avatar
    Join Date
    May 2009
    Gender
    male
    Posts
    442
    Reputation
    16
    Thanks
    295
    My Mood
    Fine
    So basically... nothing happens?

  5. #5
    Arasonic's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    569
    Reputation
    11
    Thanks
    115
    Yeah.
    When the round reaches 50, nothing happens. >.<

  6. #6
    Yamato's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    839
    Reputation
    13
    Thanks
    152
    My Mood
    Amazed
    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

  7. #7
    Arasonic's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    569
    Reputation
    11
    Thanks
    115
    I'll check tomorrow.

  8. #8
    foasdgg's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    83
    Reputation
    9
    Thanks
    37
    The Humans have survived the invasion
    XD

  9. #9
    Arasonic's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    569
    Reputation
    11
    Thanks
    115
    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.

  10. #10
    Yamato's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    839
    Reputation
    13
    Thanks
    152
    My Mood
    Amazed
    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,

  11. #11
    Boon Pek's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    188
    Reputation
    10
    Thanks
    378
    My Mood
    Inspired
    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 );
    		}
    	}
    }
    My minecraft launcher!

    A full-featured, actively-developed windows-only Minecraft Launcher! It allows you to download older versions of minecraft.jar through the options menu, multi-username support, RAM allocation support, non-legit logins and more!