Grenades removed when empty

Woods

New member
Using UCC: 3.0.15
I am currently working to implement grenades but am having an issue with them being removed from the Inventory when they have all been used. I need the grenades to remain in the inventory so that another script can refill whatever grenade is equipped. The only time I want these to be removed is when I explicitly remove them to swap to another grenade type.

I have tried changing EquipUnequip.AutoEquip to not include OutOfUsableItem, ThrowableAction.ShouldUnequip always returning false, disabling Inventory.AutoRemoveCharacterItems. Nothing seems to stop the grenade from being removed. My last thought is that its something in my ItemSetRule, but can't see any obvious way to make it persist.

My temporary hack is to refill the grenades from the default loadout, but this isn't going to work if I allow the player to change to a different type of grenade. Essentially I want my character to always have one type of grenade in their inventory, regardless if they have any left.
 
Last edited:
Another odd thing that tells me I should be able to get this to work, when the inventory has RemoveAllOnDeath enabled all the ammo persists. I also need to figure out how to fix that as it should drop all ammo and reset to the exact default loadout, not stack ammo from dying.
 
Last edited:
Well I figured sort of figured out my grenade problem. I had the wrong approach when adding grenades to my Inventory. Now that I have them in their own Item Set Group in they work more like expected. There doesn't seem to be a way to make them persist, but my original reason for needing that was resolved with groups.

Still haven't looked into the ammo reset issue.
 
Top