AnimationPlayer with sound-track property

Godot Version

Last

Question

Hello there!
I have a question about sound queue play when character is animating (like a footsteps or attacking)

I have something like this

But inside AnimationTree which I using, i increase TimeScale of animation by some value depends from Attack Speed of character, so animation above is playing more fastly than 1.8 sec., but sound is cutting off (not finishes play).

And question is: how i can call that sounds inside animation like a queue (while previous is playing - not start another one)?

I appreciate you for any help!

P.S. Or maybe I must insert sounds as other way? How you - are do it?

@hexgrid summon you! =D

This isn’t something I have experience with in Godot, unfortunately, but if I wanted to solve a problem like that I’d probably use a “call method” track to call a local function that triggers the audio. That moves the audio playback itself out of the animation, which means the animation player won’t tell it to stop or cut it off.

1 Like

Sounds like a great idea ;D, I’ll have to try it. Thank you for answering my call! I appreciate it!

1 Like

It worked! Thank you so much!

P.S> animation sometimes is glicthing but that’s a completely different story =D

1 Like