Hey,
I hope someone can help me with a problem I have?
I want to find a way to make the items that drop randomly and are picked up by the player be persistent. By that I mean, once it is in the inventory that instance of the item with any randomised stats etc defined when it was created should last for the items lifetime.
Currently, it recreates the instance every time the item is manipulated in the inventory, like moved to a different slot or in the case of a weapon or armour etc - equipped and unequipped.
I think it’s probably something I can add to the items, some kind of unique ID that I can define when it’s created, and save or tie in the unique properties of the item to that unique ID, then just use that as some kind of reference that I can call back whenever the item is manipulated and recreated.
I hope that’s clear?
I have tried this with other inventory systems and always struggled with this part, but I’m told the way this inventory system is created supports that kind of randomised item persistence in theory.
I’m not a massively experienced scripter. I mean I can usually trace something back to debug and figure something out once it’s created but modifying or creating from scratch something like this might be a little ahead of my knowledge at the moment!
Can anyone tell me if I’m on the right lines, provide some help etc?
I have a good basis for my game with stats, enemies, procedural levels, levelling system etc but having actual randomised items with random stats is what I need. I have the system scripted already to make the items have random appearances and stats but I can’t retain those stats between item manipulation.
Anyway, I think you get the idea.
Thanks for any help you can give,
Daz