How to equip shield with 2 catagories setup?

Iguane

New member
Hello !

I need help because I can't set up a sword/shield configuration with 2 categories correctly.

By following the documentation "Single Category Setup" (https://opsive.com/support/documentation/ultimate-character-controller/inventory/item-sets/), I managed to equip the sword and the shield correctly with :

C#:
inventory.Pickup(itemDefinition, 1, slotID, true, false);

When I switch to "Sword and Shield Category Setup" I can't figure out how to equip the shield.

Here is my configuration:

bug.png

The pickup command doesn't work, I figured it was because the shield is no longer in the default category but in the new "LeftHandItems", so I tested the following code:

C#:
var characterLocomotion = Controller.GetComponent<UltimateCharacterLocomotion>();
var equipUnequipAbilities = characterLocomotion.GetAbilities<EquipUnequip>();
var category = equipUnequipAbilities[0];
category.StartEquipUnequip(1);

However this one doesn't work either because the equipUnequipAbilities structure has a size of 1.

I'm sure I'm missing something obvious, but I can't find the corresponding documentation for equipping my shield in this configuration :(

Thanks in advance for your help!
 
You need an EquipUnequip ability for each Item Category. In the demo scene, Nolan has 3 of them, one for each category. In the ability you can select its "ItemSet Category". So make sure you've got an EquipUnequip ability for each of your categories and then try again. (Also try using forceEquip=true when calling inventory.Pickup).
 
Top