halgorithm
New member
I'm making a (third-person adventure camera only) game where each instance of an item in the world has runtime state that needs to persist seamlessly across picking up and dropping that instance. To give an example, a burning wooden spear might be launched at the player, who catches it in midair (auto-equipping it), dunks it in water to put out the fire, and finally throws this now-wet spear back at their opponent. They can also store a limited number of items in their backpack to equip at a later point, preserving any physical state the item had when it was stored in the backpack.
UCC provides an ItemPickup script for the simple case of adding a given quantity of an ItemType to the player's inventory, but it doesn't seem like this will work for me since ItemTypes are not instances of items but rather representations of a particular Item that gets added to your inventory. I need my inventory to contain actual item instances, multiple of which may belong to the same ItemType but each of which have their own state. I'm expecting I might have to do a bit of custom scripting to achieve this, but I would appreciate some guidance on where to start if I need to make modifications to the existing inventory system (or if already can support my use case, how I can add items to it in the way I need).
Any sort of guidance would be greatly appreciated! Thanks!
UCC provides an ItemPickup script for the simple case of adding a given quantity of an ItemType to the player's inventory, but it doesn't seem like this will work for me since ItemTypes are not instances of items but rather representations of a particular Item that gets added to your inventory. I need my inventory to contain actual item instances, multiple of which may belong to the same ItemType but each of which have their own state. I'm expecting I might have to do a bit of custom scripting to achieve this, but I would appreciate some guidance on where to start if I need to make modifications to the existing inventory system (or if already can support my use case, how I can add items to it in the way I need).
Any sort of guidance would be greatly appreciated! Thanks!
Last edited: