+1 vote

I would like to use animations, as a way to smoothly transition between scenes. Following Angega Studios' Flappy Bird tutorial I am making a flappy bird clone to practice since I'm a beginner.
However I'm having trouble with the AnimationPlayer, I will post imgur links with everything I'm talking about below.
First of all I tried creating a stage manager, which would, when you change the scene, simply fade to and from black.

https://imgur.com/1pzxKDC

However, when I try implementing it in the death stage when you press the replay button, the button just stops working, I found somewhere that it's because of the animation's layer, so I tweaked that as you can see in the first picture but it still doesn't work, what's even worse, when I remove the stage_manager call in the script the button still continues not working and idk why.
Here is the death scene script:
https://imgur.com/QqGYHyV

I also have a main menu scene which should also transition with an animation, but aswell I make the animation, try playing it just in the animation player toolbar and it look exactly how I want it, then I try calling it in the scene's script on the button press and the buttons just stop working, and then when I delete it, the button still doesn't work, even when I disconnect and connect the signal, I have to completely delete the button and do it again for it to start working. I'm sure I'm overlooking something fairly simple I just don't know what and it's really frustrating. If you guys need I can provide any more pics y'all need.

in Engine by (18 points)

Is your stage manager a singleton auto-load? Because if it isn't, change_scene() will wipe it out.

It's also hard to tell what could be wrong since "not working" and screenshots is pretty vague. At this point you could provide your project, or try to reproduce your feature in a simpler project to make sure it works. Is the signal actually firing? Did you put prints or breakpoints in the methods you expect being called, to see if they are called?

1 Answer

0 votes

Where is the animation located?
getparent() is to get parent.
get
node("AnimationPlayer").play("animation_name")

by (32 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.