How to implement sheath weapon mechanic using a keypress

Special thanks to Zliryu from Discord for creating this tutorial.

1. Add a new bool variable (default value is false) to the character and recreate this key press event

2. Add a check for the new bool on the Fire event on BP_CharacterBase

3. In the W_WeaponInventory_UI widget in the drop weapon button logic, at the end if it add the following

4. (Optional) on the character, on the X event to drop a weapon, add the same bool and set it to false

That’s it!