Endurance bar continues to drop after done running

Once I released the sprint key (shift), after sprinting…the endurance bar continues to decrease until 0. Tested out altering some numbers in EnduranceDegenRate and EnduranceDegenAmount, but I still can’t seem to find a fix. Running and running control are in CharacterBP.
EnduranceDegenRate is currently set to 0.2, EnduranceDegenAmount is 0.5 - but have been a multitude of numbers already.

,

Can’t make out the last image, it’s too small. You need do a check for “Is Running” bool and based on that stop endurance decrease (start replenish maybe, after a short delay) or continue to drain.

EDIT [The IsRunning? Bools were used and left in the picture by mistake. If you copy my blueprint delete them].

There are a lot of ways to fix it. Here is a my way to get what you need in the most performant way for the limited time that I have today.

The system that I made also stops the sprinting if you reach the amount specified.

This is the Character Blueprint:

You can keep the Widget as you have but I prefer to get a reference one time and then use that for the binding instead of casting on tick (cause thats how binding works). Here is what I mean by that:

And after the cast on the Construct I use the reference like this:

Make it a great day!

Thank you!

So at the top where it basically says stop running, how do I stop endurance degen?

If it helped you solve the problem please mark it as a valid answer.

It works perfectly except if you press shift (and don’t move) the “stamina” (or endurance) still goes down. If I put a bool is moving and such I am guessing that might fix it?

Get Velocity → Vector Length → check if output float is not 0 and then run the stamina code.

Found it in here.

I can understand that, however, I am not sure how to connect the vector length to the branch’s Boolean as it shows there

I don’t have the project anymore but what you have to do is drag a cable from the Vector Length write !=, then input 0.0 and connect it to a branch.

Okay thanks a bunch!