- Edited
I have been coding a form of platformer, and am having a problem with a label. I want the label to show when you fall off the map, and hide when youre just playing. I have had trouble getting the label to hide. I have checked my other scripts and there is no reference to the label, the variable controlling it (Global.global) is set to zero and works properly. The label is a child node of the player, which is set to visible, although from what ive read it seems that it should only affect it if the parent node was set to hidden, or invisible.
extends Label
func _ready() -> void:
visible = false
hide()
visible = false
modulate.a = 0.0
func _process(float):
if Global.global == 1:
visible = true
if Global.global == 0:
hide()
visible = false
modulate.a = 0.0
print(Global.global)