Using Enum to tap sprint or control movement state?

Hey friends. I could use some help figuring out how to make a blueprint. I have one for tap sprinting. Press shift, and you can sprint at high speed. Someone said a flipflop is bad practice and I should use an enumeration instead. I know what an enum is, but I don’t get how to like… implement it here. My game will have several movemen states. Walking, sprinting, jumping, crouching, etc.

Here’s my current movement blueprint. Bit of a mess, and unsure if I need the event begin play, but it works currently.

Id use both: bools for player intent/input state and an enum for the pawns actual movement state.

For example, bWantsToSprint or bSprintHeld tells you what the player is trying to do, while an enum like Walking, Sprinting, Jumping, Crouching represents what the character is currently doing.

So for tap sprint, pressing the key could toggle the sprint intent bool, and then your movement logic decides whether the enum should become Sprinting based on conditions like stamina, grounded state, crouch state, etc.

With just an enum its impossible to tell different conditions.