Executing an event after x objects changed frame?

Get help using Construct 2

Post » Wed Dec 07, 2011 12:41 pm

Hey!

Anyone have any idea how i could achieve this?

The thought is: When the player collides with an object, that object changes animation (which is really just a still-image of the same object, just slightly modified). The issue is, how do i define that after X number of objects have changed to that animation, another event starts?

My apologies if i'm not clear here.
B
34
S
11
G
9
Posts: 189
Reputation: 8,595

Post » Wed Dec 07, 2011 12:52 pm

[code]global variable changeCount type number
every tick : set changeCount to 0
foreach Sprite
    Sprite animation Frame = 1 -> add 1 to changeCount

ChangeCount >= your limit -> do your stuff[/code]
Yann2011-12-07 12:53:45
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Wed Dec 07, 2011 1:08 pm

Thanks, greatly appreciated :)
B
34
S
11
G
9
Posts: 189
Reputation: 8,595


Return to How do I....?

Who is online

Users browsing this forum: selaus and 0 guests