Hey. I am nearly to a mental breakdown because of this stupid label.
I am processing which character the player is talking to and the name of the character is then displayed as the labels text.
The problem is, that the label doesn't replace the characters name with the new one whenever the following function is called. It adds it to the existing text. For example: At the first call, the labels text displays the characters name and on the second call it doesnt set the entire text new, but it just adds the new text to the old one so that I have the same name two times in the labels text.
I hope you understand my problem now.
onready var title = get_parent().get_node("HUD/DialogBox/Speaker") # label
get_parent().get_node("HUD/DialogBox").visible = true
print("Talking to someone")
if len(title.text) > 0:
title.text = ""
title.text = format_name(with_who) # format_name only removes "_"
title.text = format_name(with_who)
# some more stuff not related to the label down here