here is how I do the stamina bar I mentioned, there is a hud to show the status change.
here is overview.
Here is how I use a custom Enum to do stamina update base on pawn status
And then call a event to check and set pawn parameters(in this case Max Walk Speed)
And finally, update pawn status based on various parameters.
Hopefully this could help you in your case.
I think there is a better way doing this, mine is a bit cluttered.
But it does the following:
Running reduce stamina faster then walking
idle/falling/exhausted(thus can’t move) will restore stamina
you can toggle walking status at will
if you reach exhausted status, you have to wait for stamina recovered back to 40+ before you can start moving again.
I would certainly get back on this type of thing later down the road, but right now I have to focus on something else.