

on a base object of type ‘null instance’."
Null instance means there’s no instance. If $Beacon
gives you this, it means that such node doesn’t exist.
As a side note, I dislike hardcoding nodes like this. Consider getting the beacon instance beforehand with var
or such. If the beacon doesn’t exist, you’ll then see the error immediately instead of later when the script tries to use it.
makes the character rotate around the world origin.
You’re using position
, which is the relative position to the parent node. I don’t know how your node structure look like, but chances are that you should be using global_position
(absolute world position) instead.
and then adding or subtracting to its X and Y positions with beacon’s movement keys
oh boy. When find yourself building something like your own position tracking code instead of using builtin systems, it’s best to scrap it and rethink what you need.
how to either make TestChar use that that variable from Beacon’s script
Same was as position: look_at(beacon.look_here_P1)
. Add a class name for the beacon script and type your variable as such (var beacon: Beacon = ...
) to get editor hints.
Protip: speaking from experience, you might want to enable this setting:
screenshot
Making Beacon emit a signal every time it moves in a particular direction and then using those signals to update a Vector3 variable in TestChar’s script doesn’t seem to work
Rube Goldberg machine much? It should work though. Your problem is probably still relative vs absolute position.
Hope this helps
Big tech always caters to the lowest common denominator