Is there a way to have Runtime Pickups just equip items, and not entire ItemSets?

omg_ketchup

New member
I'm having a bit of trouble with Runtime Pickup Items and the Item Sets. I have a working setup where I added items directly to a character, but I wanted it to be more modular, so I'm trying to convert these to Runtime Pickup Items. My current setup has 3 slots, each with a Shootable or MagicItem attached to the character. I've also set up a Use (Slot 0), Use (Slot 1), Use (Slot 2) Item Abilities. This sets it up so I can press 1, 2, or 3, and each of the items will be used properly. This is working swimmingly.

However, creating Runtime Pickups is not working so well. I've created the Items which I can successfully pick up, and they are equipped to the proper slot. However, picking up an Slot 1 item will unequip any other Item Slots that are currently equipped. I think this is related to the PickupSet/ItemSet interaction. On the ItemPickup component, it says taht I need to define a PickupSet or the character won't be able to pick p the item. When I define the PickupSet for the items, I assign the Item, and it auto-selects the proper slot for that item, and leaves the other slots blank. However, when it's actually picked up, the entire PickupSet gets added as a new ItemSet, and since the other slots were empty, it unequips them.

Is there a way to have it so when I pick up an item, it does not unequip item slots that are left empty in the PickupSet?

I am -not- using the Ultimate Inventory System, just in case anyone was wondering.
 
In order for the item to be equipped the ItemSet must be added. You can deselect Unique Item Set and it will not automatically add an ItemSet, but you still must have an ItemSet in order for it to be added.

The Ultimate Inventory System does this in a really unique way allowing for Item Sets to only exist on the character when they are equipped. There are then Item Set Rules which define when a particular Item Set is added. It allows for a really dynamic situation, but there was a lot of logic that went into that so it does require the inventory system.
 
Thanks for the input! I'm trying to avoid the UIS here, I feel like it's way too much overhead for what I'm trying to achieve. And I also think I'm not explaining myself properly here. And maybe the solution for me is to extend Inventory or ItemPickup a little bit, which is fine, but I think I'm just missing something still. I'm hoping you can clarify. And if you need more context in the form of screenshots of settings or anything just ask, happy to provide.

My desired behavior:
I would be able to pick up the "Fireball" Slot 0 ItemPickup, and it would equip to Slot 0. I would then be able to pick up the "Iceball" Slot 1 ItemPickup, and it would equip to Slot 1, without unequipping the item in Slot 0.

What I already have:
- 2 "types" of items, Primary and Secondary. Primary weapons are all Slot 0, Secondary weapons are Slot 1
- ItemSet definitions on the character for each individual weapons, with the extra slots left blank. For example- a Primary would have "Fireball/None" and a Secondary would have "None/IceballSpell". All Primary and Secondary item definitions are set to Non-Unique.
- I am able to get multiple items all equipped and active at the same time (UI and everything) if I add ALL of the items to a single ItemPickup object's PickupSet. For example, the PickupSet has Fireball in Slot 0, Energyball in Slot 1, and Iceball in Slot 2. All 3 of the weapons work properly when the character picks up this ItemPickup, but I only want the character to pick up 1 item, without changing whatever is already equipped.

My questions:
- Am I understanding ItemSets and unique items correctly?
- Is what I am attempting to achieve possible with just the base Item/ItemSet/ItemPickup system?
- If it's not possible, what would you recommend as the path of least resistance to working around this limitation? I'm happy to extend and code my own, but after working with the ItemEvents for OnPickup/OnEquip/OnUnequip as well as the scripts for Inventory, ItemPickup, PickupItem, and EquipUnequip, I have to confess I'm not sure where the best place to start extending would be.
- Is this something that is like basic behavior in UIS? I couldn't find an example of it.

Maybe the solution here is for every ItemPickup on the ground to respond to the character's OnEquip events, and change their intended PickupSet to match the player's current ItemSet except for the single item they actually want the player to pick up? This approach feels pretty wrong... I'm just kind of throwing ideas out there at this point.

Or maybe there's a way to have a "NonEquip" item definition in there, that basically just cancels out of the equip process, leaving whatever is already there intact...? I'm not sure, tbh.
 
Last edited:
I would have bumped my old thread but I can't seem to find it. I'd like the player to be able to equip the same item into Slot 1 or Slot 2, like throwing a grenade with either hand. This part doesn't have to be through an item pickup- the player can choose an item from a list and decide which Slot it should go to.... ideally.

Is that possible with categories and ItemTypes, or will I need to add some extra logic in for this one?
 
You'll need two different items. Take a look at the demo scene as it has this exact setup :)
 
It's gonna be a headache to dupe everything and change all the values, but this approach is definitely gonna work. Thanks for your time!
 
Top