How do I check for when all enemies are destroyed

Get help using Construct 2

Post » Mon Jul 21, 2014 7:08 pm

I want the level to end when all enemies are destroyed. At present I count them down as they are destroyed but this is a less than ideal approach.

What would you recommend?
B
4
S
1
G
2
Posts: 42
Reputation: 961

Post » Mon Jul 21, 2014 7:15 pm

It's fine that way, You can also use the system expression, Enemy.Count, this will return the number of enemy instances.
Please tag me with @caiorosisca if your post is refering to me :). I don't always follow the topics I answer.
B
11
S
4
G
1
Posts: 272
Reputation: 1,643

Post » Mon Jul 21, 2014 7:16 pm

If count = 0 end level.

Check this capx.

count-example.capx

(Click enemies to destroy them)
You do not have the required permissions to view the files attached to this post.
Bruno

I like to eat, but I'm no cook. Why liking to play games would make you a game designer?
B
20
S
6
G
2
Posts: 623
Reputation: 3,498

Post » Tue Jul 22, 2014 6:56 pm

Perfect, many thanks :-)
B
4
S
1
G
2
Posts: 42
Reputation: 961


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 58 guests