Page 1 of 1

Keeping total of collisions for mission progression

Posted: Mon Apr 11, 2016 12:12 pm
by antn18
my game requires all of the enemies in the level to be killed for the second mission to activate, is there a way to remove the enemies from the card but store the collisions to make it possible to advance in the game.

for example, if there are 2 enemies in the level, if one is shot, how can i make the enemy disappear but keep the information on the collision so that when the 2nd is killed, the victory screen is triggered.

sorry, its hard to explain XD

thanks, Ant

Re: Keeping total of collisions for mission progression

Posted: Tue Apr 12, 2016 4:32 pm
by Newbie4
create a global variable to keep count of the number of enemies killed. When an enemy is killed, update the variable then check if it matches the total number of enemies. If so, show the victory screen

Re: Keeping total of collisions for mission progression

Posted: Mon Apr 25, 2016 11:46 am
by antn18
so how do i go about this?

i dont really understand variables at the moment, what coding needs to be in the buttons for it to count down the amount of collisions left before the levels can be progressed.

thanks,
Ant