Hello,
I am a beginner at Unreal Blueprints and I asked for some advice the other day about how to map two buttons to one action and was given the advice to use enumerators, but, I’m stuck at a step.
Now, I just want it so that dashing down is the default and only requires one key, the dash button. The other three directions would require two buttons, the dash button and the direction.
I want it to be able to play like this.
I don’t know what to do from here. Any help would be appreciated.
I would do it just how you have it with a few changes:
Create input mapping in project settings where you have your 2 input axes for up/down and left/right, I’d also make it so there is one InputAction for each single direction: One for up, one for down, one for right, and one for left.
Using these same direction keys as ACTION inputs allows you to use the On Press and On Release execution pins in their input events. You can use those to set the Direction enumerator to match the most recently pressed direction, OR to set it to the default on Release of the buttons. You may need to also track which buttons are all pressed simultaneously with a set of booleans or a bitmask, in order to make sure it only sets to the default dash direction if ALL the buttons have been released. But maybe not. Try it without that first and see how it acts.