Godot 4.3
const STAMINA_LOSS_RATE = 25.0
if Input.is_action_pressed("sprint"):
%Stamina.value -= STAMINA_LOSS_RATE * delta
const STAMINA_REGEN_RATE = 10.0
if Input.is_action_just_released("sprint"):
%Stamina.value += STAMINA_REGEN_RATE * delta
the issue I’m having right now is that I can get the bar to go down at a normal rate, but I won’t constantly go up because there is no .is_action_released
there is only .is_action_just_released
which only give stamina for the 1 frame after I stop sprinting. I just need someone to help me with that and if anyone knows how to make me stop sprinting once I reach zero stamina that would be good cause I don’t even know where to start with that.