How to equip a fist when the player is not equipped with a weapon

ymo

Member
Q1: How to equip a fist when the player is not equipped with a weapon

Q2: I want to unequip it from the player once I use the UCC(Ultimate Character Controller) knife
 
You'll see that the Integration demo does just that.

In the Inventory System Item Set Manager, you should set your "body", or "fist" in your case, as the last Item Set.
Make sure to toggle on "Default" and toggle off "Can Switch To".
This will automatically equip the item if nothing else is equipped.

1605255892571.png

You can add your knife in an item set above, simply make sure you "can switch to" it and default is false.

Make sure to have a look at the integration demo for more examples.
 
You'll see that the Integration demo does just that.

In the Inventory System Item Set Manager, you should set your "body", or "fist" in your case, as the last Item Set.
Make sure to toggle on "Default" and toggle off "Can Switch To".
This will automatically equip the item if nothing else is equipped.

View attachment 4299

You can add your knife in an item set above, simply make sure you "can switch to" it and default is false.

Make sure to have a look at the integration demo for more examples.

The fist problem has been resolved!

But there is still a problem
You can build by equipping building items. When the construction is successful, the equipped item is deleted, but the item remains equipped.
 
Last edited:
Currently adding/removing the item directly to/from the item collection"Equipped" won't work because the Bridge component won't get notified.

Instead you will need to remove the item using the bridge component.
In the future we may look into a solution which will allow you to remove the item both ways.

For now use:

Code:
var ucc_uis_bridge = itemUser.gameobject.GetCachedComponent<UltimateInventorySystemBridge>();
ucc_uis_bridge.RemoveItem(itemInfo, false);
 
  • Like
Reactions: ymo
Currently adding/removing the item directly to/from the item collection"Equipped" won't work because the Bridge component won't get notified.

Instead you will need to remove the item using the bridge component.
In the future we may look into a solution which will allow you to remove the item both ways.

For now use:

Code:
var ucc_uis_bridge = itemUser.gameobject.GetCachedComponent<UltimateInventorySystemBridge>();
ucc_uis_bridge.RemoveItem(itemInfo, false);
playeritemucc.PNG
I was able to remove the equipment with the above code
However, the player's items still remain, is that okay?
 
You'll see that the Integration demo does just that.

In the Inventory System Item Set Manager, you should set your "body", or "fist" in your case, as the last Item Set.
Make sure to toggle on "Default" and toggle off "Can Switch To".
This will automatically equip the item if nothing else is equipped.

View attachment 4299

You can add your knife in an item set above, simply make sure you "can switch to" it and default is false.

Make sure to have a look at the integration demo for more examples.

I don't want to equip it when I get the equipment item
After changing Auto Equip of Equip Unequip of UCC ability to Unequiped
If you save with no items and load it, you will not equip the body
 
Yes saving and loading equipped items has some issues which we plan to fix in the near future, I'll add that to one of the use cases to test
 
Top