I have an enemy with a timer attached to it. When the player attacks the enemy, it dies and gets destroyed, and that is when this error gets fired. Everything works fine and does as expected but this error is just a bit annoying. Here's the code:
onready var idleTimer = $IdleTimer
func _on_DetectionArea_body_entered(body):
idleTimer.stop()
if isActive == false:
animSprite.play("Wakeup")
yield(animSprite,"animation_finished")
animSprite.play("Active")
isActive = true
func _on_DetectionArea_body_exited(body):
idleTimer.start()
func _on_IdleTimer_timeout():
if $DetectionArea.get_overlapping_areas():
idleTimer.stop()
else:
isActive = false
animSprite.play("Death")
yield(animSprite, "animation_finished")
animSprite.play("Idle")
func _on_Hurtbox_area_entered(area):
animSprite.play("Death")
$Hurtbox.set_deferred("monitoring", false)
$Hitbox.set_deferred("monitorable", false)
yield(animSprite, "animation_finished")
queue_free()