Godot Version
4.2.2
Question
Can someone help me figure out why my spawn point is not working?
I have two spawn points for the enemy. Each a Marker2D and in the group spawn_location. Both markers are children of the world scene. The create enemy instance code is in the world script.
This is where the ghost spawns relative to the spawn location
This is what I am using to spawn the enemy.
var enemy_instance = enemy.instantiate()
add_child(enemy_instance)
var nodes = get_tree().get_nodes_in_group("spawn_location")
var node = nodes[randi() % nodes.size()]
enemy_instance.position = node.position
Thanks