I am trying to get spawned items to remove after a set amount of time. I found some questions similar to this here and attempted to modify the suggestions to make them work for my project. Currently it does not seem like the timer is ever activated because I never get the timeout printout.
extends YSort
onready var timer = get_node("/root/Node2D/Del_Timer")
func _physics_process(delta: float) -> void:
if self.get_child_count() > 0:
timer.start()
func _on_Del_Timer_timeout() -> void:
print("timeout")
var children = self.get_children()
for c in children:
self.remove_child(c)
c.queue_free()