auto holster the weapon

Hi people
just a question, i have a blueprint that equips and weapon and then holster it, how would I go about auto holster the weapon that allows me to equip a new weapon.

Your question is a little hard to understand, can you be a bit more specific?

Is this a separate blueprint from your character? Or is it just a function within your character BP?

If it’s in your character when you call equip on the new weapon can you not simply call holster on the original? Or is this an animation thing?

If you can give a little more detail it might be easier to help you out?

(post deleted by author)

Sorry mate, yah the post is a bit short.
I just getting a bit confused on my own BP LOL
yes, Blueprint is in the of the Player BP
so basically, I have the player able to Equip the weapon and holster the weapon, i am using keys 1, 2 and 3 or different weapons, Ie press the 1 key, and you equip a gun, press the 1 again and you holster the gun, but I’m just getting a bit confused on how to go about getting the player to holster the current weapon and equip a different weapon, buy pressing the other 2 keys.
I Have a Enum that switched when the player has equipped a weapon or holstered the weapon. i know it sounds simple enough but i am just getting a bit confused about it and just need some direction on the best way to it as what I am doing now isn’t working,

1 Like

Okay I think I understand what you’re trying to work out.

Note that this is really only for demonstration purposes there is a lot of ways that a system like this can be improved upon but I’ve just tried to lay it out clearly.

So in this image when we press the “1” key to select that weapon we run a check against the enum which tells you the current weapon and if no weapon is equipped then we call equip on weapon 1 and set the enum.

If weapon 1 is already equipped then we call holster and set the enum to none.

However if weapon 2 or 3 is equipped then we first run a call to holster weapon whichever weapon is currently equipped and then call draw weapon on weapon 1 and set the enum.

This logic can then be applied to input 2 and 3 just switching out what weapons are drawn and holstered.

Hopefully that points you in the right direction, like I said this is just a demonstration script so it’s quite basic but if you get it to work the way you want, you can refine from there.