So i have first inventory scene with item slots array
extends Node2D
onready var itemscene = preload("res://src/Items/Item.tscn")
var item
export var inventory = [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, ]
func _ready():
inventory[28] = additem()
inventory[28].itemdata.type = "test28"
inventory[29] = additem()
inventory[29].itemdata.type = "test29"
print(inventory[28].itemdata.type)
print(inventory[29].itemdata.type)
pass
func additem():
var inputitem = itemscene.instance()
return inputitem
Then i have item scene with dictionary
extends Node2D
var itemType = ["armor","weapon","trincket","other"]
export var itemdata = {
"type": "weapon",
"damage": 10,
"attackSpeed": 0.4,
"strenght": 1,
"intelect": 1,
"dexterity": 1,
"texture": ""
}
but when i changing scene in one array's slot all other slots are changing too
