Godot Version
4,2
Question
Hi everyone! I’m trying to update a label font color as the game is running and the player collects stuff, i created a function on the ui scene:
func set_label_color(unit, color):
if unit > 3:
label.add_theme_color_override("font_color", color)
I then call this everytime the player collects anything on the game script by calling the function (with two variables on the main game scene:
func _on_baloon_body_entered(body):
#more code
ui.set_label_color(player.balloons, white)
I’ve tried several ways but none seem to work. the only help i could find online seemed to use the function add_color_override() which appears to be obsolete. Any clues?