|Attention||Topic was automatically imported from the old Question2Answer platform.|
I want to make a few animations behind other animations when they finished but with out a Timer. What is wrong ( if animation_finished(“name”): print(“test”)) ?
Did you properly set up the signal connections for the animations? Do any of the animations loop?
Ertain | 2020-12-20 19:49
This is just not how signals work in Godot, you have to connect them to a script through the “Node” tab that is right next to the Inspector. When you do so, a new function will be created on your script. It should look something like:
I’m not sure if this is how the name looks like by default… Anyways, this function (that may have any name you wish as long as you connect it from the Node tab) will be called every time an animation finishes.
So, taking your code as an example… It should look like this, if correctly used the function.
_on_cool_animation_thing_finished(anim_name): if anim_name == "name": print("test")
Hope I helped you!
Basicly the function is automatically called once the even triggers.
If you want to learn more about signals, check this page on the docs.
NikiDev | 2020-12-20 22:28
Ok, thanks it works.
Bot7 | 2020-12-23 13:24