![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | lordbry |
Hello all. I made a button that lets players mute the sound effects in my game. The variable “FXon” is in the top level Node/Panel’s GDscript. Two layers below that, I have a child node with its own GDscript like this:
Node/Panel (a) -> Node/Control (b) -> Node/Control (c)
I tried this:
onready var globalVars = get_node("/root")
if globalVars.FXon == 1: do_stuff
Every time it got to that line of code, the game hung. So how can I read a’s FXon value from c’s GDscript? Thanks.