This is my scene:
slot (script is here)
-specs
-details
What I am trying to achieve is to have exported integer that determines which of these nodes are assigned to var info. This is what I have so far.
export(int,"bag","armor") var slot_type
onready var details = get_node("details")
onready var specs = get_node("specs")
var info
func _ready():
if slot_type == 1: #armor
info = specs
details.queue_free()
else: #bag
info = details
specs.queue_free()
The problem is when I try to do something with info. It tells me that the var is null.