Godot Version
<stable4.2>
Question
<Im managing enemy spawning by making ObjSpawner scene which basically instantiate assigned enemy object when attached VisibilityNotifer entered camera. Id like to queue_free them when player left the room and respawn them when reentered in room, just like in metroidvania game. To achieve this, I tried to queue_free enemy nodes by connecting the signal area_exited of the room to ObjSpawner. However, I have no idea how to queue free "get_tree().get_nodes_in_group("Enemy")"
. So I would appreciate if you could teach me how to queue free nodes in group.
Even if this works, I kinda feel it is too much work to connect signal of all room to ObjSpanwer. Do you have any better idea to make this work?