Sprinting problem

Hello there, I was wondering if anyone could help me with this. I made a sprint and stamina system, however, I found an issue where the stamina bar would go down when holding sprint, or left shift, when standing still. I thought I could easily solve this issue by adding “Get Velocity” → “Vector Length” → “>=350” then connect it to a branch, and if true it would allow the player to sprint, while also checking if they’re crouching. When I tested it, it seemed to work at first, the bar would not go down when I held sprint and was stationary, and I would sprint when I moved then held sprint. But, there was one “problem” if you will, that kept bugging me. If I were to hold sprint, or left shift, before moving, my character would not sprint. I tried “Move Forward/Backward Axis Values” → “<=0” and connected it to a branch, and connect false to the next, but it would do the same thing.

So, I simply ask for two things:

  • Have the stamina bar not go down when attempting to sprint while stationary
  • Have the ability to hold shift before moving and still sprint

Here is the part of the blueprint at which the “problem” seems to occur:

Thank you, in advance.

In order to make the sprinting responsive you need to make it axis dependent, which means that only when MoveForward is greater than 0 you will execute this sprint code when shift is pressed. By doing that you will make sure that your code will only be executed when you have forward input.