I've been tinkering away at a project that borrows a lot of elements from the classic Resident Evil games - specifically a limited inventory. I've been using TheoAllen's script to handle this. Alongside the limited inventory I've also utilised Hime's Instance Items Script and Selchar's Weapon Durability script to imitate something similar to having limited weapon uses/ammo; to add some tension and decision making for the player.
Unfortunately, I've hit a snag trying to get the Limited Inventory script to play nicely with the Instance Items: dropping a weapon (as handled by the Limited Inventory script) does not work - the weapon remains in the player's inventory (sort of? you can't drop it again, but you can still find it in your inventory and equip it).
I also have Storage Boxes by IMP1 which highlight a similar issue, with Instanced weapons being duplicated when placed in storage - though I was able to edit this script to handle instanced items and the duplication glitch only occurred after I placed the Limited Inventory script into the project. :c
The issue seems to be that whenever Theo's Limited Inventory script tries to remove an item from the inventory it's directed to the template item rather than the instance - but I can't quite figure out where exactly this happens and how to remedy it. Any edits I've made have been unsuccessful.
I've tried placing each script in different positions in the list; and if Theo's script is located anywhere underneath Hime's suddenly weapons don't even show up in the inventory at all. Is this a clue?
Any help/direction on how to fix this would be appreciated. Ultimately the limited inventory is more important and if I have to drop the weapon durability I'm sure I can think of some other gameplay quirk, but I had a lot of fun ideas related to the durability that I'm not ready to throw away just yet ;~;
I've attached a demo which should hopefully demonstrate the issue more clearly than my word-soup.
Thanks for reading!
Unfortunately, I've hit a snag trying to get the Limited Inventory script to play nicely with the Instance Items: dropping a weapon (as handled by the Limited Inventory script) does not work - the weapon remains in the player's inventory (sort of? you can't drop it again, but you can still find it in your inventory and equip it).
I also have Storage Boxes by IMP1 which highlight a similar issue, with Instanced weapons being duplicated when placed in storage - though I was able to edit this script to handle instanced items and the duplication glitch only occurred after I placed the Limited Inventory script into the project. :c
The issue seems to be that whenever Theo's Limited Inventory script tries to remove an item from the inventory it's directed to the template item rather than the instance - but I can't quite figure out where exactly this happens and how to remedy it. Any edits I've made have been unsuccessful.
I've tried placing each script in different positions in the list; and if Theo's script is located anywhere underneath Hime's suddenly weapons don't even show up in the inventory at all. Is this a clue?
Any help/direction on how to fix this would be appreciated. Ultimately the limited inventory is more important and if I have to drop the weapon durability I'm sure I can think of some other gameplay quirk, but I had a lot of fun ideas related to the durability that I'm not ready to throw away just yet ;~;
I've attached a demo which should hopefully demonstrate the issue more clearly than my word-soup.
Thanks for reading!