How do I compare all the instances of the same object?

Get help using Construct 2

Post » Sun Aug 24, 2014 11:27 pm

Message: Nachockaxis can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Hi guys,

Is there a way to compare all instances of an object on screen? I mean, I want to trigger an event when all the enemies of the same type (i.e. enemy "A") are destroyed.

I'm doing a boss fight, and I want the boss do a specific thing only when all the "A" enemies are destroyed... I can't figure it out in Construct... Construct2 only allows to compare one instance of an object, not all the instances (as far as I know).

Image

https://imageshack.com/i/pcZH1BzNp

The orange squares are the enemies.

Please I need your help. Best regards!
B
7
S
1
Posts: 5
Reputation: 584

Post » Sun Aug 24, 2014 11:32 pm

Just in case, I tried with

miniEnemy -> Is on screen (inverted) -> boss | set scale to 2

this doesn't work...

thanks!
B
7
S
1
Posts: 5
Reputation: 584

Post » Mon Aug 25, 2014 1:16 am

System:Compare two values -> Sprite.Count = 0 -> action
ImageImageImage
B
71
S
21
G
232
Posts: 3,695
Reputation: 129,866

Post » Mon Aug 25, 2014 4:46 am

Oh dude I didn't realize that a "count" exists (like in SQL xD) ... that was pretty effective... Thank you, thank you very much!!!! :D
B
7
S
1
Posts: 5
Reputation: 584


Return to How do I....?

Who is online

Users browsing this forum: blackhornet, Bootfit, Exabot [Bot], Huemerson, unicornspitfire, Yahoo [Bot] and 1 guest