i want to make it so that when i spawn an enemy, a signal is connected a to it. the signal has an intiger value. when the number attached reaches zero, a variable in the enemy script will change from true to false. heres how i handle spawning the node:
var enemy = preload("res://enemy.tscn")
var instance = enemy.instantiate()
add_child(instance)
the signal is setup like so:
signal amount(number)
func _process(delta):
emit_signal("amount", remaining_num)
any help would be great.