How to get audio to play after the first sfx end?

Godot Version



I’m trying to get the second slash sfx to play. the animations work fine. animation attack2 start after the first animation but the sound doesn’t work.

func attack():
	if isDead: return"attackRight")
	if atk2:

I think the issue is that calling play on swordSlash2 will play it immediately, it doesn’t queue it after the first sound. You have to call play when the second animation starts, but I don’t know how it’s normally done…

1 Like

Thank Monday, I just solved it.

func _on_animation_player_animation_finished(anim_name):
	if anim_name == "die":
	if anim_name == "attackRight" and atk2:"attack2")
1 Like

You can also call functions from an animation track. So, once attack2 is active, it would trigger the sound effect.