@cybereality said:
There are two ways. You can use load or pre_load to cache the scene (with the weapon or whatever). Then:
onready var sword_scene = preload("res://sword.tscn")
func _ready():
var sword = sword_scene.instance()
add_child(sword)
That would be the best way I think. But you can also use duplicate() if the scene already exists.
Thank you cyber (again), but I don't think thats the (complete?) solution to my problem. As far as I can recognize, this is the procedure to add a totally fresh scene per code to the scene tree, with a totally fresh Script.
The problem I have is that the Script/Node of the scene I want to instantiate already exists in my inventory arrays after I deleted their scenes/3DModels. Stuff like their duration points are already stored in that Node. But I can't manage to "reinstantiate" the existing Node to the scene tree. Either that, or I have to find a way to attach an already existing Script to a new, scriptless Scene/3DModel.