Topic was automatically imported from the old Question2Answer platform.
Asked By
yuey
Hello,
im making a simple game for my coursework, i have a coin scene, menu scene, and level scene. i want to show how much i collect coin on level to menu scene but i dont know how.
help me please
hi why do you put dollar sign in front of the code?
Necessary?
Okan Ozdemir | 2019-09-23 19:47
Assuming the node that the script is attached to has a child node called CoinsLabel, instead of using get_node("CoinsLabel"), you can use the $ short-hand and just reference it as $CoinsLabel
You need to understand and make use of signals. We need to make our scenes independent of outside scenes. Your scene should work stand-alone for testing purposes. Have a look at my tutorial here to get a solid understanding of this topic: Signals in Godot