<reference of CharacterBody2D doesn’t work. i drag it from scene, press control, so reference should be correct. (code 1-3) but it says it’s null!(4) and it degub it prints Node %ryuji not found. script is attached to inventory. the structure is like “root/node/scene_icons/inventory” the weirdest thing, in the same scene i have object with the same realisation, that works (5)>
And static variable is like normal variable, but it’s binded to type(such as Node, CustomClass), not object.
Define: static var <variable_name>[: <type>][ = <value>]
Usage: <Type>.<variable_name><Type>.<variable.name> = <value>
thanks everyone who replied here, but i found a rather cool solution by just manually going through nodes (or using get_node()). if anyone has the same problem, i would be glad if it helps