Starting the next animation where the last animation left off

In a game like Mega Man, the player has a running animation as well as a shooting while running animation and they seamlessly switch between the two. By this I mean that if you are running and then start shooting, the “running while shooting” animation doesn’t start from frame 1, it starts where the last animation left off, that way the run cycle does not restart mid cycle, which would look odd.

How would you solve this problem in Defold?

The sprite cursor is a property (value ranging from 0 to 1) that tells you how far along the animation is in its cycle. You can get and set that value whenever you switch between the animation types.

5 Likes

Very cool!!! Thank you! That’s actually how I was doing it in Unity before, it just had a different name and I didn’t know Defold provided that.

3 Likes