Changing hotbar behavior for UCC/UIS

ChristianWiele

Active member
Hi,

I am using UIS with UCC, and I want to equip my weapons through the hotbar / keyboard. But I have the following behavior, that seems to be due to the "soft" equip process.

I put two items in my hotbar. If I press "1" then the first item is equipped. If I press "2", the second item is equipped, but the first remains selected in the hotbar. If I now press "1" again to equip item 1, instead of equipping the item it is unequipped completely.

How can I configure the hotbar in a way that I can simply switch between items trough the keyboard? (BTW, the same behavior by using the mouse).

Thanks, Christian
 
If you only ever want to equip one Item at a time you could make your Equippable ItemCollection have a single slot (Considering you are using an ItemSlotCollection). Or if you need multiple slots, you can use more specific item categories to allow certain items only in one slot.
Then the equip ability will be forced to remove the previously equipped item to equip the new one.

And if that does not give you enough control don't forget you can very easily create custom Item Actions. Simply find the CharacterEquipUnequip ability, copy paste the code in your own custom script and edit it. It will automatically appear as an option in the Item Action drop down in the inspector.
 
Thank you, it took some time to understand the ItemSlotCollection, but now I have it working. My test players were confused by the soft-equip state, so I had to change it. Now only one weapon is equipped at a time.
 
Top