Stamina system

Hi,

I have a stamina system that I’m having alot of problems with, I’ve tried adding bool checks and switching the nodes to see if I can fix it but for the life of me can’t figure it out. This parts probably obvious but I’m trying to make it so that the player holds the shift key to drain stamina if the bar has any left and to stop draining and replenenish when releasing the sprint button.

The timeline is a 5 seond timer with a value of 1 if thats relevant

Heres the graph on the player character

Decrease stamina function

Increase stamina function

I know there is a lot to look at here but any help would be appreciated.

1 Like

wow thankyou so much, I didn’t expect someone to just make it for me. I noticed the main issue that I missed a return node on checking the increase stamina. It works great now thx. One last thing, how do I increase the timer of the timeline so that the stamina refills slower?

You can take the output of the regeneration timeline and multiply it by a fraction

To not show fragments in the text floor it before setting the text

1 Like

Amazing, thankyou :slight_smile: