How to restart the animation of an AnimatedSprite?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By godotnoobperson

Let’s say I have an AnimatedSprite with an animation consisting of 2 sprites running at 1 frame per second.

At t = 0 seconds, the animation starts at index 0.

How can I restart the animation at t = 0.5 seconds? (Meaning at t = 0.5 seconds, I need sprite index 0 to show 1 second, i.e. it will be displayed from t = 0s to t = 1.5s.)

My idea is to stop the frame, change the frame to frame 1, then change it back to frame 0, then play. Is there a less messy way to do this?

Edit: Looks like you don’t need to stop and play the animation again.

:bust_in_silhouette: Reply From: JimArtificer

Change the resolution of the animation to 2 frames per second. Add a delay of 0.5s to the start of the second animation.