How to make Hunger and Thirst resource bars go down over time

Im currently working on a survival game with a health, hunger and thirst bar.
However, i have no idea how to make the hunger and thirst bar go down over time, and when i eat or drink, the hunger goes up. And if the hunger and thirst bar are empty, the player will start to take damage. does anyone know how to do this? pls help

1 Like

You could use a timer to reduce the bars and reset the timer whenever it gets to a set value.

Alternatively, you could use tweens to reduce the hunger and thirst bars. This is a bit trickier as you’ll have to stop and restart the tween whenever the health is changed by an action. And you’ll have to calculate the duration of the tween based on the value, max value and how long the meter runs down based on max value.

1 Like


This code does not work for some reason. What am i doing wrong?

Did you start your timer anywhere?
You need like event at beginning of the scene start timer

1 Like

ZeroX4, the official most goated person on gdevelop forum. Thank you so much bro. lifesaver

1 Like