0 votes

how do I make the value of a variable set the text of a label?

Godot version latest
in Engine by (24 points)

1 Answer

0 votes

Do you mean set the text of the label to be the value of the variable?

get_node("Label").text = str(variable)

Or

Do you mean display certain text based on value of the variable?

if variable == 0:
    get_node("Label").text = "Hello"
by (53 points)
thanks but how do i add and update in LABEL?
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.