Spawn animation frame but in order

Get help using Construct 2

Post » Thu Dec 15, 2016 9:55 pm

I have an animation with 7 sprites (They are words)

When a player touches the screen I would like the animation to spawn but in order - spawn 1 then 2 then 3 etc each time they touch the screen, I have - "set animation frame to random(0,7)"

Image

But I don't want it spawning random also I would like it looping from animation 7 back to animation 1.

Thank you :)
Image
B
24
S
4
Posts: 72
Reputation: 1,529

Post » Fri Dec 16, 2016 12:01 am

Create a global variable and store the currently animation frame there, also, add 1 for each time you create another sprite, reset when over the maximum.
Image
Image
B
104
S
23
G
17
Posts: 1,350
Reputation: 22,028

Post » Fri Dec 16, 2016 7:31 am

@TELLES0808 Thank you so much :)
Image
B
24
S
4
Posts: 72
Reputation: 1,529

Post » Fri Dec 16, 2016 10:55 am

I forgot, use On touch "trigger" instead of Is in touch to avoid spawning infinite objects, my bad.
Image
B
104
S
23
G
17
Posts: 1,350
Reputation: 22,028


Return to How do I....?

Who is online

Users browsing this forum: plinkie and 2 guests