Visually equipping a Hatchet by script

Snakzy

New member
Hello,

I managed to add the item to the characters hands by watching the video tutorial. However, I have my own inventory system and a hotbar. When you put the gun into the hotbar and select it, it should visually equip the hatchet to the player hands. I have not found any way to achieve this.

I tried it using the EquipUnequip method, but that only sets the Hatchet (which I didn't even selected in my code) to the Item Set Manager.
How do I put a SPECIFIC weapon I added to the ItemCollection to the hands via script? It cannot be that hard, right?


Best regards
 

Attachments

  • wrf.png
    wrf.png
    29.7 KB · Views: 10
StartEquipUnequip is the correct method. It will then start the Equip ability which will use the animator/spring system to visually equip the item.

However, I have my own inventory system and a hotbar.
That is likely the issue. Did you implement a new InventoryBase class? You'll need to implement this new class in order to add a new inventory.
 
Hello,

thanks for the reply.

I don't really get what you mean? I thought the UIS is a different Asset, so why does the UCC comes with an inventory system already on it?
And how do I implement the Inventory Base class?

Best regards
 
I don't really get what you mean? I thought the UIS is a different Asset, so why does the UCC comes with an inventory system already on it?
And how do I implement the Inventory Base class?
The character controller includes a basic inventory since it needs one in order for the basics to operate properly (such as shooting a weapon). The Ultimate Inventory System adds the more fully fledged inventory such as the UI and advanced inventory options.

If you have your own inventory code you will need to subclass the InventoryBase class and implement the abstract methods. This is what the integration does with the Ultimate Inventory System.
 
Top