Keeping total of collisions for mission progression

Creating Games? Developing something for fun?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
antn18
Posts: 10
Joined: Fri Feb 26, 2016 6:48 pm

Keeping total of collisions for mission progression

Post by antn18 » Mon Apr 11, 2016 12:12 pm

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

Newbie4
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 327
Joined: Sun Apr 15, 2012 1:17 am
Location: USA
Contact:

Re: Keeping total of collisions for mission progression

Post by Newbie4 » Tue Apr 12, 2016 4:32 pm

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
Cyril Pruszko
https://sites.google.com/a/pgcps.org/livecode/
https://sites.google.com/a/setonhs.org/app-and-game-workshop/home
https://learntolivecode.com/

antn18
Posts: 10
Joined: Fri Feb 26, 2016 6:48 pm

Re: Keeping total of collisions for mission progression

Post by antn18 » Mon Apr 25, 2016 11:46 am

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

Post Reply

Return to “Games”