animation stateframe too fast compared to other animations...

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

hi everyone,

i have the usual animation of a sprite moving, jumping etc. All the animations are running as expected on the speed set up in the engine. except for the punch animation (as shown here).

the punch animation is running twice the speed. Ive been trying to figure how to slow the animation down. its five frames long and i tried to duplicate the frames but its still running to fast.
i discovered a string code called “set_speed_scale”. but i’m having trouble implementing it. the punch animation in the code is on line 43.

https://pastebin.com/c31kiCaT

can someone guide me on how to implement set_speed_scale with a website or video.
ive tried myself but im failing to understand it.

thank you

:bust_in_silhouette: Reply From: jgodfrey

To set the speed_scale property of the animated sprite, you can just set it directly.

animatedSprite.speed_scale = 0.5 # run animation at half speed

However, you probably want to find the root cause of the animation speed problem.