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
35
S
12
G
9
Posts: 191
Reputation: 8,724

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
66
S
22
G
14
Posts: 1,484
Reputation: 16,511

Post » Wed Dec 07, 2011 1:08 pm

Thanks, greatly appreciated :)
B
35
S
12
G
9
Posts: 191
Reputation: 8,724


Return to How do I....?

Who is online

Users browsing this forum: muquia, tarek2 and 1 guest