Download

Simple Stamina Regen Problem

All righty. So, I’ve got a simple stamina regen going, but I came across a couple problems that I can’t quite figure out. Initially, it worked perfectly. At below max, it would restore stamina based off the StamRestore var, until full. Then I noticed, at <= 0 stamina, it would not regen at all. So, I threw a quick branch check in at the start of the regen function (the red circle) to check for that, and restore stamina then go through the false branch in to the normal regen. Now, once the <=0 regen kicks off, it won’t regen past that point, like it never feeds in to the false branch. It’s most likely a simple oversight, but I for the life off me can’t see it. Please ignore the ugliness of my logic flow. I know I need to shuffle some things around and clean it up (SprintCheck should be earlier in the logic, for example).