0 votes

Hi everyone! Im new to Godot (and programming in general) and I'm following a 2D RPG game tutorial but I've met an issue with the UI of Godot:

I've been setting up the frames for an AnimationPlayer and suddenly when I tried to make a new animation, I became unable to change the Frame with the up and down arrow buttons in the right tab of the Sprite where the texture is located. It got stuck in the 12th frame from the last animation and now every time I press the up or down button it immediately switches back to the 12th animation.

I can still do the animation by going inside each of the frames in AnimationPlayer and change it manually but the preview there is too little and Godot do not longer identify the following frame as before.

in Engine by (12 points)

1 Answer

0 votes

I was stuck in a similar problem, although it wasn't much of a problem, I think this might help for anyone else as well.
Try this in your _ready(recommended) or any other function:

get_node('Sprite').frame = some_frame_no_you_want;

There may be some other alternative, but this is just a one liner, so no problem right?

by (14 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.