DropItemAction

I am currently implementing items actions. I have tested the both item actions type "DropAction" and "ItemDropItemAction".

I consider that you have 2 kinds of action provided with the asset. Actions that comes as a common basic action on the shelf (like DropAction) and customed actions that comes like example (demo actions DemoConsumeItemAction).

I distinghish what is it on the shelf and what it comes as examples because I need to understand what needs extra coding or tuning and what can be accomplished fully with the asset with just some tuning.

Then for DropItemAction, I don't understand that the Pickup ItemPrefab is required here. It should be the item that is dropping?

DropItemAction.png

I am confused to put an arbitrary gameobject here. But maybe I am wrong. Could you explain a little bit?

Another point is when I test with a pickup object (my sword) in this field, it is working fine but the sword is to close to the player and it is automatically equipped again!
 
Last edited:
I agree that the name "ItemDropItemAction" and "DropItemAction" are a bit confusing. DropItemAction is used when you only have an Inventory or when using pure UIS functionality. "ItemDropItemAction" is for the integration.

I'll rename the integration ItemActions to "CharacterXXXItemAction" instead I think that'll make more sense.

As for the ItemPickup prefab, the way we think about it is that all the item pickups will have the same base logic, meaning the same components. Also many times you do not want to make a 3D model for every single item in your game.

So the prefab you set here is the parent/default ItemPickup. The moment the item pickup is spawned I set it the Item and amount specified when the user invokes the item action.

As soon as the Item is bound to the item pickup I have a script that takes care of swapping out the 3D Model (if it exists as an attribute on the item). This is done by a script calle ItemPickup Visual Listener

Learn more about pickups here: https://opsive.com/support/documentation/ultimate-inventory-system/item-objects/item-pickups/

Also there are other action to drop items. Check out the documentation here: https://opsive.com/support/document...ry-system/item-actions/built-in-item-actions/
As for the issue where you auto pickup as soon as you drop it there are two ways to go around it.

Either set a timer on the item pickup (only available with the integration pickup, example the integration item pickups are set with a timer)
Or only pickup using a button (you can set that in the integration item pickup component too)

I will add an option to the item action to choose how far the item should be dropped

Let me know if that helps and if you have other ideas to improve the item actions
 
Hi,

Thanks a lot for the explanations. It is clearer to me now.

I think that the improvement you propose is good. Having a such offset for dropping is good.

I didn't realize when I have started with the assets and Integration the bounds between what is for examples (demo) and what is included. I mean that we need to be careful when implementing our games to separate, duplicate prefabs and so on to avoid overriding when assets are upgraded. Maybe it will interesting to emphasize this approach in the tutorials or give somecadvices in this direction.
 
I just want to clarify that when using the CharacterDropItemAction (currently named ItemDropItemAction), the prefab for the item pickup is defined on the character itself, not the item action.
 
I just want to clarify that when using the CharacterDropItemAction (currently named ItemDropItemAction), the prefab for the item pickup is defined on the character itself, not the item action.
Through the ability Pickup. I had skipped that before relaunching integration demo ...
 
Well I cannot succeed to trigger the message to press F to pickup. It is always automatically pick-up. I have analysed the integration demo scene (latest version... it was not the last when I wrote this post), but it seems I have the same setup but it is likely I am mixing things because it doesn't work like the Assault Rifle pickup with the message Press F (for my sword). I don't know what I do wrong.
 
I found what I missed! The field "Pickup on Trigger Enter" was enabled. I disabled and I got the message as expected!
Pickup on Pressing F.png
 

Attachments

  • Pickup on Pressing F.png
    Pickup on Pressing F.png
    37.6 KB · Views: 2
Top