0 votes

Hello all, I was using AnimationPlayer to set the sprites of my player when it walks, but when I try to do the same to change the sprites in battle, doesnt work. Inside the "sprites_batalha" are all sprites I will use in the battle.
enter image description here

I tried to use $Jogador/AnimationPlayer.play("batalha_normal") but dont work. How can I do that?

in Engine by (171 points)

1 Answer

0 votes

Did you create the animations on the animation tab?
Animation creation button

Also if the sprites under the node "sprites_batalha" are the sprites of your animation you don't need them there, just use the button of the image above. Unless you are doing your animation by hiding and showing these sprites. if that is the case you could use something like:

$sprites_batalha/batalha_normal.show()

to show the sprite and

$sprites_batalha/batalha_normal.hide()

to hide it.

More information here

by (244 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 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 webmaster@godotengine.org with your username.