Topic was automatically imported from the old Question2Answer platform.
Asked By
DeadGames2
hi so bassicaly I need help with animated sprite
So im doing some 2d top down game and im trying to make animated sprite to loop when player is moving.
You can let the animation stop at the last frame with $AnimatedSprite.frames.set_animation_loop("walk", false)
You can probably put that in the _ready() function since you’ll be calling play() as soon as it ends if you’re holding the button, so you shouldn’t have to worry about telling it to loop. If it doesn’t reset as intended, you can connect a function to the animation_finished signal, and call set_frame(0) and stop()
Note: I made the code myself and I’m not sure it works well
This code stops the player’s movement in Farme 0. You can control the appropriate window to stop the player’s movement. This helps improve the gaming experience by keeping the player’s face in the same place where they were clicked