Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | R4mp3t |
##Hello, I’m having a problem that says “Stack overflow (Stack Size: 1024)” when I want to queue_free( ) an enemy when dies after an animation
extends KinematicBody
onready var Anim_play = $AnimationPlayer
var health = 100
func _ready():
pass
func _process(_delta):
if health <= 0:
Anim_play.play("EnemyDeath")
func _on_AnimationPlayer_animation_finished(_anim_name):
if _on_AnimationPlayer_animation_finished("EnemyDeath"):
queue_free()
someone pls help