auto holster the weapon

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.