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!
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)
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?
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
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!
Using Item Remover Devices seems like the easiest way to remove weapons from the player’s inventory. You have the option to configure the device, for example to only remove weapons, leaving consumable items in the player’s inventory, you would set the “Affected Objects” to “Weapons”. Alternatively, you can populate the device with an array of the specific types of items you would like to remove from the player’s inventory.
The verse hooks are here: item_remover_device class | Unreal Editor for Fortnite Documentation | Epic Developer Community (epicgames.com)