Sprite equivalent of gui.cancel_flipbook()

Hi everyone,

Is there currently any way to cancel or pause a flipbook sprite animation started with msg.post("#sprite", "play_animation", {id = hash("anim_id")})?

I would like to pause or stop an animation on the current frame when a player takes a hit or is stunned for example.

Thanks

No, not at the moment. We’ve discussed a system where you’re able to get a cursor or something like that to control the playback. But it’s so far only discussions and no concrete implementation work.

1 Like

OK, Thanks a lot for the info.

You can put the sprite inside of a collection loaded via a collection proxy and then set its time step to be zero for as long as you want the pause.

Attached example

paused_char_example.zip (3.1 KB)

This can also be used for slow motion effects.

If you add a very tiny freeze frame to the entire game when attacking / taking damage it can make the game’s damage feel very impactful.

4 Likes

Quite clever! But if you use physics there’s problems with different physics world.

1 Like

If it’s a problem then would need to keep the go with the physics collision object in the main world, and then put the go with the animations in the collection proxy collection, then sync the positions as the game goes.

1 Like

@Pkeod: This is nice, and definitely an approach I wouldn’t have thought of.

I stumbled accross this thread and ended up controlling animation manually in a simple module:

Thanks a lot for the help!