UCC items not equipped on drag and drop exchange from equipment slot

Cheo

Active member
Hello, in both our project and in the integration demo scene, it is possible to have an item equipped after a switch when dragging it from the inventory grid into an equipment slot. When doing the opposite however, the smart exchange is performed but the new item in the equipment slot isn't equipped. The strange part is that unless I missed something, both Item View Drop Handlers seem to have the same Item Drop Action Set configuration with the CharacterEquipItemAction after both conditions. Here's a video as always to make sure everything is clear :


If the switch and equipping works one way, we'd logically expect them to work the other as well, so I hope you can help us with this, thanks.
 
Hey Cheo, Sorry for the late reply. As mentioned in the other post I didn't receive any notification for you messages. I'm now going back through the forum searching for messages I missed.

To answer you question. The ItemViewDropActionToItemAction only processes the source item. So only the source item get equip/unequip called on it.

Let me change the code for you so we can choose to apply the action on the source or the destination item.
I've attached the updated script below



You need to use ItemViewSlotDropActioSet with more conditions/actions if you want to have more control.
In your video I see you modified the one that comes with the demo scene.
But there's actually another one that shows a good example of how you can achieve what you want.


See how it purposefully says if you move from ivnentory to equipment do equip action.

You can do the same for the other way around too. You can say when move item to.

Now with the new options you've be able to decide to call the item action on the destination item instead of the source item when going from equipment to inventory.

I hope that makes sense :)
 

Attachments

Hi, thanks for your reply. I have to get off soon so I can't make a fully detailed answer, but here's what I can say :

-I was able to get the desired results in the UCC-UIS demo scene by using the ItemViewSlotDropActionSet shown in the attached file in the MainInventoryGrid. The trick was to check if the Destination (meaning in this context the Main Inventory Grid) was null. If yes, the basic Move/SmartExchange could be performed, and if not the UCC Equip item action.

-However in our project where the main inventory grid is not composed of individual separate ones and can have items occupying several grids, the feature worked when dragging an equipped 2 slots-sized item onto an inventory 3 slots one, but not the opposite. The exchange was however performed if the 2 slots item was on the edge of the grid, had a 1 slot item to its left, and the equipped 3 slots item was dragged onto the 2 slots one. This may be confusing said like that but do you have any guess as to what this could suggest ?

I'll come back with more details tomorrow, thanks.
 

Attachments

  • Main ItemViewSlotDropActionSet.png
    Main ItemViewSlotDropActionSet.png
    80.4 KB · Views: 5
I'm not sure I understand. But your conditions/actions don't look right to me. I can't think of a reason to prevent moveIndex within the same container to only when source is null. That doesn't make sense to me
 
The reason why I checked if the Destination was null is that I wanted the simple MoveIndex/SmartExchange if the equipped item was dragged into an empty slot in the main inventory grid, and the UCC Equip action if it was dragged onto a slot with an item. This allowed the character to unequip his weapon and leave it in the main grid in the first case, and to perform a weapon switch in the second.

I just went back to this issue in our project after finishing up with the remaning other UIS issues we had related to drag and drop, and was pleasantly surprised to see that the issue I mentioned in my last post was fixed ! I believe it is because of the recent fixes you provided for the other issue as well and possibly because of custom changes I made to CharacterInventoryBridge.

Due to an NDA I will send you videos privately to fully make you understand what we were initially struggling with. I know it's no small thing to ask, but I would recommend adding a grid with joint slots to the UCC-UIS demo. Some issues that we had in our project could have been revealed in advance by doing so.

In any case thanks for following up on all this, I believe that the UIS side of things is finally solved for our upcoming demo 😄
 
Back
Top