Essentially what all this is doing is whenever stamina is lowered it starts a cooldown, so long as you meet the conditions the cooldown will finish and you will begin to regen stamina. If you break these conditions while the cooldown is active or while you are regenning stamina you stop regenning stamina and the cooldown rests. Once your stamina is maxxed out you stop regenning and the cooldown stops altogether.
The StaminaCooldown function just runs the StaminaRegen function basically just using it to delay StaminaRegen.
Any tips or feedback on this would be greatly appreciated as I’m still new to unreal and trying to learn how to keep things efficient while also maintaining good performance