How to unequip player weapon/item?

I want to unequip whatever item/weapon the player is using whenever interacting with my Object in the objects blueprint, similar to how the player unequips weapon when mounting dino. I’ve looked through the TestPlayerPawn variables and components, and I see current weapon, etc. but doesn’t seem to be any functions or variables to set to unequip an item, also looked in PlayerControllerBlueprint, just not finding what I need.

Also, while im asking questions, I’d also like to effect the players carry weight, or movement speed from my object, based on the inventory weight, for example if you could drag a raft with inventories on it, take the inventory weights and effect the weight/movement speed of the player as if overburdened, but not sure what variables in the player to set based on my calculated inventory mass.

Any help would be much appreciated.

Just off the top of my head, get the current weapon, find it’s match in the item slot array, then simulate a key-press and release of the matching slot number. That or you should be able to get the slot index from the weapon itself and just use that as the slot number.

Doesn’t ARK do that already? Once you hit max weight you can’t move anymore, and it slows you down the closer you get to it. At any rate, things like that, are most likely to be in the movement component.

-WM

Thanks for the help, I’ve got most of what I want working, but I still have an issue with not allowing the player to equip any weapons, in the same way as when riding a dino. Here is more details about the situation and why I needed to get the weight of the inventory and effect the player movement speed/weight. I’m making a cart that is based on the raft_BP, and the player pulls it by spawning a Physics Constraint, not by ‘Riding’ it. I used the raft because it came with most of what I needed to have a mobile structure that can be built on.

As you can see the player can equip weapons, I don’t want the player to be able to equip any weapons while pulling the cart, its not a make or break problem, just something I’d like to add. I do currently have unequiping current weapon working when the player ‘hitches’ to the cart.

Also, about the weight and movement speed, currently I have it so that the weight of the inventories of structures on the cart are calculated, then I set the player’s ‘Weight Speed Decrease Power’ in ‘Player Character Status’, which works, as the weight of the cart’s inventory nears 1000, it slows down the player, and at 1000, the player can’t pull it any more. The problem though is that I’d like to be able to dynamically adjust this based on the player’s weight stat, so that stronger players can pull heavier loads, and I haven’t figured that out yet.

Thanks again for your help.

Published Mod: https://steamcommunity.com/sharedfiles/filedetails/?id=691820366