Need Help With Regaining Stamina

Exactly what the title says. The problem I am having is that it won’t constantly take down stamina when I run. It only takes down 1. Here is a screenshot of it all:

The problem may be in your sequence node, that (0) decreases the Stamina and then (1) increases it, right after.

Try creating two separate functions for Stamina increase and decrease.

I changed it around a little and it takes down stamina but now it doesn’t regain. This is what I have now:

Any ideas?

I would do it On Tick with delta seconds correction or on separate timer with bool as gate for removing stamina and enable disable sprint.

I am trying to avoid On Tick for better performance. Do you have any ideas on what could be happening with what I currently have?

Your current setup is way way way larger and heavier than just tick function guarded by bool. It’s heavy in comparison to each other, not heavy code which would slow your game.

Thank you for telling me. Would you be able to provide a screenshot of what I would need to do to change it to On Tick.

oWAaI.png

should be self explanatory, but seems like i forgot to check is stamina cost is zero with separate branch on very beginning and if yes call same logic but without any stamina manipulation, but since close project without saving, i think you can figure this out by yourself.

Thank you. I will give it a try.