Im trying to figure out how to make this. The character is always hungry and need to keep eating stuff to maintain its health, otherwise it will deplete over time.
Made a variable called health
set health to 5
each time player hits an enemy adds +1 to health
after every 20 seconds subtracts 1 to health
if health = 0 reset game
But it doesnt work. Any help please?