How do I check if objects are destroyed simultaneously?

Get help using Construct 2

Post » Sat May 28, 2016 3:24 pm

How do I check if objects are destroyed simultaneously? I use this but it doesn't work:

*Sprite.OnDestroyed & *Sprite.PickedCount > 1
--------> Set Text to "Simultaneous Kill = true;"

Any suggestion?
Thanks in advance.
The Things you can create is only limited by your imagination. If you don't have the skills then use your motivation as a natural force to exceed all expectations. Chadori RebornXD
B
65
S
21
G
90
Posts: 1,124
Reputation: 59,862

Post » Sat May 28, 2016 3:29 pm

I believe On Destroyed is like the other triggers, in that it triggers separately for each instance.

Not sure if there is a nice solution to that though. You may need to test for that when you destroy them, rather than using On Destroyed.
Another less pretty solution is to test if more than one has been destroyed this tick by assigning a variable to Object.Count at the end of the event sheet, and comparing that when an object is destroyed.
B
42
S
14
G
3
Posts: 165
Reputation: 5,115

Post » Sat May 28, 2016 3:42 pm

Nice suggestion and i'll use it but I was hoping for an event that can use the expression pickedcount but sadly it isn't possible.
The Things you can create is only limited by your imagination. If you don't have the skills then use your motivation as a natural force to exceed all expectations. Chadori RebornXD
B
65
S
21
G
90
Posts: 1,124
Reputation: 59,862


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 22 guests