Stamina Attribute Not Working As Intended

bluemanD

New member
After a lot of research and trial and error, my stamina attribute still has major issues. When the speed change ability is active, it decreases the amount of stamina you have left. When the player isn't running, it should wait for 2 seconds and then start regenerating stamina. This all works fine. The problem is that if I start and stop running a few time really quickly, the start delay stops working and it depletes and regenerates really quickly. I haven't found anything about this issues yet. All help is appreciated! Also if you need pictures of anything please let me know!
 
StaminaAttribute.png
This is the attribute.

SpeedChangeAbility.png
This is the speed change ability.

Everything works. It just starts acting strange if I start and stop running a few times in quick succession.
 
I also figured out it only seems to be happening if I let the player start and stop running by releasing the sprint key. If I keep the stop type on the speed change ability as button toggle it seems to be impossible to encounter the bug. I wanted to use both by letting the player change a setting at runtime.
 
Last edited:
Top