Page 1 of 1

Killing all = end game

PostPosted: Thu Aug 30, 2007 4:51 pm
by 98700
I am making a game and i need to make it so that when i kill all of the guys (clones of one) that it ends the game. Is it possible? :shock:

Re: Killing all = end game

PostPosted: Thu Aug 30, 2007 9:24 pm
by jimmynewguy
If you know how many clones there are, just have everytime u kill 1 a counter goes up and when it gets to a certine amount end the game i guess

Re: Killing all = end game

PostPosted: Fri Aug 31, 2007 12:14 am
by cyber ruler
This is just a different way of doing what jimmynewguy said, but I think it would be better. Make a textnumber called enemycount or sumthing. make a "create actor event, script editor" and enter [ enemycount.textNumber = (how many enemies there are)] put the textnumber somewhere on view and make the view it's parent. then make a "draw actor event, script editor" and enter this
Code: Select all
if(enemycount<=0)
{
    EndGame()
}


this way, the player knows how many enemies are left

Re: Killing all = end game

PostPosted: Fri Aug 31, 2007 9:03 am
by metal_pt
If the enemies are all clones of the same actor you just have to do this:

Code: Select all
if(ActorCount("enemy")<=0)
{
    endgame();
}