![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | Newby |
![]() |
Old Version | Published before Godot 3 was released. |
When i click my attack button the function calls before animation is done.
![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | Newby |
![]() |
Old Version | Published before Godot 3 was released. |
When i click my attack button the function calls before animation is done.
![]() |
Reply From: | cardoso |
You can add function calls on the animation.
Like this:
I have done that but the function happens on click and is not sync with the animation
Newby | 2017-10-13 04:10
And did you moved the “dot” of the corresponding funcion call on the track to the desired timing?
Also, you can add several function calls on the same track at different timings.
https://i.imgur.com/s9lUR4X.png
I don’t know if this solves your issue, If not, more info would be needed (a pic of your animation area + some description what the function is doing in the code)
cardoso | 2017-10-13 10:08
im not sure if i put a function in already but i put queue_free() in the name is that how you call a function
Ps:i dont know how to put a picture showing it
Newby | 2017-10-14 11:08
I’m not undertstanding your doubt
Maybe this tutorial will help
Godot Engine Tutorial Part 10-Animation – GameFromScratch.com
After the middle of the page there is a part with title “Scripting the AnimationPlayer”.
It explains how to use function calls on animations.
(even thought its for an older version of Godot, I think it will be almost the same for current Godot version).
cardoso | 2017-10-14 22:50
does the function script need to be in the same scene or does it work to instanced scene
Newby | 2017-10-15 05:07