When the caracter slash with an axe, the stamina bar's (wich is a TextureProgress) value -= 30. And I created a Timer node, wich used for wait like two seconds after the slash, to refil. It works, but ONLY at the first time, after that the stamina immediately refils. Do you have any idea, how to solve this probelm?
The codepart:
func onstamina_timeout():
stamina = true
func physicsprocess(delta):
if active == true:
process_weapons()
if stamina == true:
if s.value < s.max_value:
s.value += 0.5