This seems to be extremely problematic. At first I used structures that also holds an actor to whatever item that structure is, but since every item is a structure and I couldnt make an array of said struct inside it. This was a no go since I need bags
Storing them as actors allows me to easily setup their own inventories (bags, chests etc), problem here is that I cant destroy them since they all reference to the same object.
I discovered the AssetID array, havent tried it yet but every variable is a reference.
Another problem is the random stats on items.
So I am thinking if the inventory should be two arrays, one that holds the actor class (with variable to its own inventory if it has one). And another array wich keeps structures to store that specific items stats.
So that when you spawn the actor from class, it has the specific inventory size for that class. But also has all the random stats for that specific item?
Does this sound reasonable? I mean its an extra array for every inventory object, I just cant handle the thought that there would be 100s or thousands of items in the world hidden at the same time.
Edit: Did some maps, and no matter how I try I always end up with the bag needing an inventory of stats, wich is the same structure as the stats structure the bag has.