How would i do that because when i tried using the
getnodesin_group("Player")
it comes up with this error
(
E 0:00:02.116 get_tree: Condition "!data.tree" is true. Returned: __null
<C++ Source> scene/main/node.h:274 @ get_tree()
scorpion.gd:22 @ _init()
Start screen.gd:7 @ _on_Button_pressed()
)
all i have is a var named node and it has the get nodes command and it wont work.
I can give you a preview of what i am trying to do because it is hard to explain while writing it. I will try again if you didnt understand fully
I have an enemy scene and a player scene and a world scene. The scorpion has a raycast that sees everything but will only attack if it sees the collider as the player node in that scene. so i use a get_node function to get the player node in that scene and it works just fine but when i go to the next world it no longer works because its not in world 1 anymore its in world 2 how do i make the raycast check for the player node regardless of what scene