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
29
S
8
G
1
Posts: 120
Reputation: 2,835

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
108
S
24
G
18
Posts: 1,373
Reputation: 22,824

Post » Fri Dec 16, 2016 7:31 am

@TELLES0808 Thank you so much :)
Image
B
29
S
8
G
1
Posts: 120
Reputation: 2,835

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
108
S
24
G
18
Posts: 1,373
Reputation: 22,824


Return to How do I....?

Who is online

Users browsing this forum: moebios and 7 guests