So get_node() works like the file browser on your operating system. If you are familiar with the command line and changing directories like cd documents
cd games
cd ..
However, the get_node() function operates on the scene tree (this is what you see on the left side of the inspector in the editor). The box on the bottom left if the file system, the files on your hard drive in the project folder.
The files in the project folder mean they are ready to be used in the engine, but they are not in the game yet, they are still on your hard drive. You have to load them first. Either by dragging them onto the scene tree (drag and drop with the mouse) or loading them manually with code usingload()
or preload()
. To load something you can do this at the top of the file (under the extends and classname).
onready var level_1 = preload("res://levels/level1.tscn")
Now you can use the object level_1
, which already is a node, you don't need get_node(). Get node is for things already in the scene tree, meaning visible in the inspector on the left.