I'm trying to have a node await an animatedsprite2D animation before queue-freeing but it doesn't seem to work, the queue_free isn't being run but everything else is. It is worth mentioning I'm using a parent script called Entity to call an @export variable AnimatedSprite2D's animation.
- Here’s my code:
func damage(amount : int):
health -= amount
if health <= 0:
health = 0
animated_sprite.play("Death")
await animated_sprite.animation_finished
queue_free()