-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid get index 'interactive_object_detected' (on base: 'Nil') #197
Comments
I tried for hours to compare DEMO_Lobby and my simple test scene bit for bit, but I can't find the difference that makes my scene crash (see description above) and the DEMO level not. Please enlighten me! D: |
Can you confirm that you set the references to the HUD and PauseMenu in the Player node? See also this video for reference where I do a quick scene setup from scratch: https://www.youtube.com/watch?v=KXcOj4LhOrY |
My scene is set up almost exactly like in the video, only difference is some additional meshes (e.g. StaticBody+Mesh+Collider instead of CSGBox) and some World Environment settings concerning the skybox that shouldn't touch Cogito. For the sake of it I recreated the scene exactly as in the video, and it runs! Then I deleted PauseMenu, Player_HUD and player completely from my first scene and added them new. My scene now also runs. I guess it just goes to show that you shouldn't try to force progress if you are tired. |
A minute after closing the bug I discovered what the problem is! Loading order! |
Oh yeah, sorry, I always forget to mention that the nodes need to be in this order. We're discussing how to improve the whole Player tscn setup in this thread #179 , so hopefully this will improve in the near future. |
Just a quick update, the new commit 64c020d now unifies this all into a single Player.tscn . |
Cogito and Godot Engine Version:
Cogito 9f4be78
Godot 4.2.1
Description:
When first instantiating CogitoPlayer prefab and Player_HUD as well as PauseMenu, setting their references, but have the node order so that the player comes below the UI nodes, the scene will crash with the error message "Invalid get index 'interactive_object_detected' (on base: 'Nil')".
Reproduction steps:
Expected behavior:
The game should start, the reference to player_interaction_component should not get lost.
The text was updated successfully, but these errors were encountered: