The tree has the 2DNode (Game) a couple nodes for other items and a welcomescreen node that has the sprite in it.
Every time you press the button error comes up.
NODE NOT FOUND: LOGOSPRITE
I have tried copying the node path “WelcomeScreen/BackgroundScr/LogoSprite” still dont work
I have tried .hidden(), .visible = false, everything returns the same error.
Is it because the button goes from GAME.TSCN signal to UIINTERFACE.TSCN?
I have googled it, check video tutorials, check through godot website and forums, NOTHING!
Please let me know if you have a clue of what can be going on, this is getting to the point I want to return to Unity but I love the small and easy program size of Godot and do not want to have to go back.
I have tried .hidden(), .visible = false, everything returns the same error.
Obviously. The error is about a non-existent node, not a non-existent method. If you call a different method on the same node, the node still doesn’t exist.
From your description I get your tree looks somewhat like this?
In that case, the path "WelcomeScreen/BackgroundScr/LogoSprite" would be the correct, if the script containing the callback-method on_Button_pressed is attached to the UIInterface-node. However, if it’s attached to the Game-node it would be:
The node path is relative to the node the script is attached to. So you have to first navigate to the Game-nodes parent-node “UIInterface” using .., which is just the short-hand form of get_parent(). The following is equivalent:
get_node(“…/WelcomeScreen/BackgroundScr/LogoSprite”).hide()
This fixed the issue. Now I understand, I was reading up on nodes but did not quite understand it fully. I had the understanding that root node and anything under that node should be able to be accessed just right of the bat and not need to indicate it is in root as your already there
Many thank you’s this saved a lot of frustration and headaches.