Best work flow?

Rene

Member
I want to use my UCC character with UIS, but in the integration tutorial it shows the assault rifle being either spawned at runtime in the hand or picked up also?

However i want to have a melee sword concealed in a chest and then the UCC character finds the chest and opens the chest and picks the sword...it is then placed into inventory and then i want to equip it from the inventory.

Can I do that?

How do i do that?

I am not clear what tutorial to study?
 
I assume you have already seen that there is a chest in the UCC/UIS integration but that's not the behavior you wish for.

By default an item added to the character inventory will automatically be equipped. You should be able to change that by finding your Ultimate Character Locomotion script, under the Item abilities -> Equip Unequip -> AutoEquip, set Nothing:
1596194647355.png
If you do so, you should be able to interact with the chest and add the sword in your inventory to be equipped later.

If that's still not what you want, and instead want to animate your character taking the sword out of the of chest, then the UIS chest component won't be much use to you.

The best solution for you would be to use the UCC interact ability with a custom interaction : https://opsive.com/support/document...bilities/detect-object-ability-base/interact/

This way you may interact with the chest and start an animation that opens the chest and makes the character pick it up. Then through code you may add the sword to the inventory once the animation finishes.

Later if you end up wanting to pickup other type of items from your chest (other than a sword). You could use some animation IK (with animation rigging or with Final IK) to grab the correct spot on the item during the animation. Or go with a less realistic pickup animation that could fit any item shape or form (like in zelda games for example)

Another option, although probably overkill for your use case, would be to create your own custom ability

Check out the documentation for creating a custom ability here: https://opsive.com/support/document...r-controller/character/abilities/new-ability/

Of course it requires some custom code.

I hope that answers your questions, and I'd love to see the result once you've implemented it so make sure to let us know how it goes!
 
Thank you for response

i am trying to get all this clear in my head about using UIS system

what I mean is...

can I follow your UIS tutorials to set up my inventory after I set the UCC auto equip as you spoke of to set up my chest or do i have write code to speak to UIS to be able to use UIS

I have an animator for the chest and I also want the character to pick up a map...as well as a sword

but do I have to write special code to place the sword and map i in your UIS asset or just configure UIS properly?

i am not a strong coder

but I have purchased your asset because it integrates with UCC

I have I also purchased inventory Pro which seems a little bit easier to use but not sure if I’m just using your asset wrong and so I’m writing you to just to make sure
 
I want to equip the sword using your UIS asset and not the way Justin did I in the integration video...

I think I need to watch your UIS video “ Equipping Clothes and Weapons” maybe...

I am just not sure if this works with the UCC or is this video using your asset as standalone...that is what always confuses me
 
If I am using UCC & UIS if I understand the instructions I am supposed to make all items in UCC and create the item definition in UIS then link the prefab That UCC creates to the UIS.
 
Yes you are correct, you create your item prefab using UCC to add all the scripts required. That's only necessary for items that your UCC character will "equip". Then once you have a prefab you can assign it to the item definition you created in the UIS editor window.

As mentioned UCC and UIS are standalone, but they work together hand in hand.

I assume you've seen the UIS/UCC integration video:

Once you have your item setup you can equip from the inventory grid using an Item Action:
In the docs it exaplains all the existing item actions: https://opsive.com/support/document...ry-system/item-actions/built-in-item-actions/

So the only thing you will be required to code is adding the items in the inventory as soon as the animation of picking it up stopped.

All the is required is for you to get the player inventory and then use the function AddItem(item). You can create the item from an ItemDefinition using
C#:
//Note code untested

//get the inventory from the ucc player characater
var inventory = playerCharacter.GetComponent<UltimateInventorySystem.Core.InventoryCollections.Inventory>();

var item1 = InventorySystemManager.CreateItem(myItemDefinition);
//or
var item2 = InventorySystemManager.CreateItem("MyItemDefinitionName");

//Create an itemInfo which contain the amount you want to add.
var itemInfo = (ItemInfo)(1,item1);

//Add the item in the inventory
inventory.AddItem(itemInfo);

There are more examples of code here: https://opsive.com/support/documentation/ultimate-inventory-system/inventory/

I hope that helps
 
Top