Topic was automatically imported from the old Question2Answer platform.
Asked By
BOX_Milk
hi
I need to make use of the item
and I have in the script of the item there are 2 variables (name, icon)
and I need to change it during spawn,
but I don’t know how to do
it, please help me
Have you tried overriding the init virtual method:
func _init():
export_param1 = value
and if you want to change these parameters from another script, then you need a reference to the item.
Say if you do var item = ITEM.instantiate()
then you can do item.export_param1 = value