I am having trouble wrapping my head around some logic and I thought someone here might be able to help me out.
So I have the player and if he is walking he is generating points, lets call them Tired Points, that will determine his overall stamina. This is based on a 0-100% scale. So if he is walking he generates 1 of these points per second. It seems extreme but I will nail out the actual variables later. If he is running he generates 5 of these points per second. If he is standing still he loses 2 of these points per second.
The total percentage determines how tired he is and when a check has to be done it will be against that result. For instance at 80% he will lose the ability to run temporarily and if he hits 100% he will lose the ability to move.
Because people often try to put things in context, lets say the player is in a radioactive area and every movement has a consequence. This is a good case for why I need to calculate this.
Player Variable: TiredPoints Float 0.0 - 100.0
Walking == +1/Sec
Running == +5/Sec
Can Run T (Able to run or walk)
Can Walk T (Can walk but no longer run) F (Can no longer move/idle)
I feel like this is simple logic but I just can’t seem to get it to work any way I try.