Is there any way to remove the item that player currently has?

Hello!
I want to remove the weapon that player currently has.
If I use Item-remover-device , There is no option to remove the 1weapon only.

Thank you!

How did the weapon get granted to the player ? You have to track that and find the relevant item remover for the current weapon. (if it’s trackable)

1 Like

Thank you for you reply!
So I need to make the array of all the weapon and track and remove using the number?
There is no way to detect or remove the weapon player holding in UEFN currently?

1 Like

You could also use the conditional_button.IsHoldingItem[] method

# Returns if the `Agent` is currently holding the item stored at `KeyItemIndex`.
IsHoldingItem<public>(Agent:agent, KeyItemIndex:int)<transacts><decides>:void

Once you find the index, you could call conditional_button.SetItemCountRequired(Index, 1) and then conditional_button.Activate(Agent) the button needs to consume items. (finally you reset the button by calling conditional_button.SetItemCountRequired(Index, 0))

Problem with this is that conditional_buttons can only contain 3 items, so you’d need to do this many times

I also never done this so I’m not sure if it would work :person_shrugging:

Thank you but I want to do this to almost all the weapon available so its gonna be crazy…haha
I will find the way.
Thank you again LAMA!

1 Like