Zelda-esque unequip when running, equip when pressing Fire

atmosgames

New member
I'm working on my next commercial release, and am having a hard time getting a grasp on how I can holster my weapon when I begin sprinting, and equipping my weapon when I press the fire button.

1576871596592.png

I've looked into using the item equip varifier, but I'm not sure what to do here. I've also looked at trying to utilize the EquipUnequip, but not sure where to go from here. I was able to get him to unequipped when pressing jump, but that's about it. The gun attached perfectly to his back.

Any help would be amazing! Thank you!!
 
This type of firing mechanism isn't built in but it should be relatively easily to add. You'll want to create a new ability (similar to Toggle Equip) that calls EquipUnequip based on the sprinting/firing button. The Toggle Equip abilty is a good ability to use as a reference.
 
Perfect thank you! For those curious: I ended up creating a Holster (by pressing sprint [shift]) and Equip ([shoot] item ability). They are basically identical to Toggle Equip, except it forces either true or false, not a toggle. The only line I changed was in the AbilityStarted function:

Code:
var itemSetIndex = false ? m_PrevItemSetIndex : defaultItemSetIndex;

Then I just set both Equip and Holster up here:

1577116310915.png
 
Top