I am trying to play the animation once the enemy enter the area 2d of my player both for some reason de queue free is activated and is not showing the dead animation. any ideas?
func _on_area_2d_area_entered(area):
_physics_process(false)
if area.is_in_group(“enemies”):
$AnimatedSprite2D.play(“dead”)
await ($AnimatedSprite2D.animation_finished)
queue_free()
I would like to know Ideas to get a timer or make sure the dead animation is being played and the _physics_process is being desactivated.
Maximo Nova is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.