How do I stop ALL of a sprite's animations?

Get help using Construct 2

Post » Sun Mar 06, 2016 4:20 pm

I have a single sprite consisting of 36 different animations, each representing a different character in my game. On a game over condition I want to freeze the screen and STOP all the animations of all the characters. How do I do that?

I thought that simply putting in a Stop event for the sprite would work. (It didn't.) Then I tried: For each [sprite] -> Stop [animation], but that didn't work either.

Do I need to cycle through all 36 animations and tell each one to stop playing? What's the best way to do that?
B
11
S
3
Posts: 85
Reputation: 866

Post » Sun Mar 06, 2016 4:24 pm

Have you thought about using timescale? It'll stop movement of all things, but you can use a set group active/inactive to stop turning during a pause menu.
Zelda Gamekit (my project)



Example capxs:

Zelda-Style Inventory

Zelda Health

3-saveslot system

[url=https://www.dropbox.com/s/d4396pwak0oh7q6/ZeldaDialogueSystem.capx?dl=0]Zelda-like Dialogue[
B
51
S
24
G
30
Posts: 534
Reputation: 19,620

Post » Sun Mar 06, 2016 4:32 pm

Are you sure other events aren't starting the animations again? LaDestitute's suggestion of placing events that would turn them on again in a Group, is a good one.
ImageImageImage
B
71
S
22
G
257
Posts: 3,790
Reputation: 142,696

Post » Sun Mar 06, 2016 6:35 pm

A cleaner solution would be to put all your sprites in the same family, then set the family's timescale to 0. That way, you won't affect the system's timescale, as you might need to animate menu elements or keep other timers running.
ImageImage
B
44
S
14
G
10
Posts: 167
Reputation: 7,781


Return to How do I....?

Who is online

Users browsing this forum: purplemonkey and 8 guests