set an event trigger

Get help using Construct 2

Post » Sun Apr 08, 2012 10:57 pm

Hi In my tower defence game i have an event that starts with 4 ships and every time one is destroyed 2 more ships spawn. Each time a ship is destroyed 1 is added to a global variable named counter and then when the counter reaches 100 for example ships stop spawning.

What I would like to do is to trigger a new set of events once all ships are destroyed and no more are being spawned. Can anyone advise the best way to do this?

Originally I had the new events set to when the counter reached a certain amount, but that's not precise enough.

Any thoughts/help greatly appreciated.
B
25
S
7
G
5
Posts: 185
Reputation: 5,056

Post » Mon Apr 09, 2012 12:29 am

How about using two variables for keeping track of how many are currently on screen, and deactivating groups to choose what events should run?

My suggestion: EnemySpawnLimit.capx
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Mon Apr 09, 2012 11:18 am

thank you for your help thats perfect now all i need to do is get the random event activation to work and im home free lol.
B
25
S
7
G
5
Posts: 185
Reputation: 5,056


Return to How do I....?

Who is online

Users browsing this forum: Artpunk, Braus, Kagubro, Mirlas, zeneizel and 26 guests