Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Newby |
The set_text and set_texture in my scene dont work when i add in data
here is the code for the set_
extends Control
export(int) var MAX_HP
var HP
export(String, "MAGIC", "MELEE", "RANGE") var ATTACKS
export(String, MULTILINE) var UNIT_NAME
export(Texture) var SPRITE
func ready():
randomize()
HP=MAX_HP
get_node("HP").set_text(str(HP))
get_node("Name").set_text(UNIT_NAME)
get_node("Sprite").set_texture(str(SPRITE))
i don’t know what is wrong