Godot Version
v4.2.2.stable.official [15073afe3]
Question
Hello! I’m a few days into Godot and also programming in general. I had this weird game idea of hitchhiking. I made a mechanic to raise your thumb, environment, models etc. everything worked fine, until i started programming the core mechanic. I wanted the game to detect if the thumb is up or not, and according to that a car would start moving. But when i tried referencing the variable for the thumbs up mechanic, the game sometimes would give a weird black and white window or would just not open. I’ll give any photos related with this issue down below.
The car movement script (it’s not finished, I’m just trying to figure this problem out.)
Thumbs up script (works fine)
The error and its source
Issue 1 (when i detach the script completely, the game works fine.)
I added @onready to the “var waitingforcar = handobject.waitingforcar” line in the first picture. The game now started, but the mesh instance didn’t move.
I also found this weird graphical error while trying to find and answer on reddit.
I don’t remember what caused it, but here is it anyway.
Here is that black and white game window i was talking about.
(To clarify, my game doesn’t consist of glowing incomprehensible shapes on a full black sky.
the map isn’t even shaped like this image.)
If you could help, i would very, VERY much appreciate it. I think it’s a small issue but the solutions that worked for other people that faced this issue didn’t work for me
Even if you don’t help (which wouldn’t be a problem at all) I’m sure I’ll figure something out.
Thanks.