How to make a node to check for multiple other nodes that are instantiated

Godot Version

4.2 2.

Question

Should i use groups? The reason i want this is bcs im making a “baldi like pathfinding system” where theres a point whenever a player does something, i know this is light plagiarism but theres prob no other good way

Also can you help me get a new pathfinding system, i dont want to plagiarize this one but its just too good

Also sorry fir no code, i have school this day i will do it later after school, thanks in advance

Yes, groups work:

add_to_group("noise_points")  # on each spawned point
for n in get_tree().get_nodes_in_group("noise_points"):
	pass  # distance / priority / etc.

Or just have the event emit a signal with the position; often simpler for “player did a thing.”

Pathfinding – use Godot’s NavigationAgent3D and set the target to the player or the noise location. That pattern isn’t plagiarism; copying Baldi’s assets/code would be.

–Useful docs for you: