• Support
  • how to make it so you starve(take damage) if you run out of hunger stat

Froglord1 changed the title to how to make it so you starve(take damage) if you run out of hunger stat .

Froglord1 within your hunger while loop:

while true do
      player.stat["hunger"] -= 1;
      if player.stat["hunger"] <= 0 then
           player.stat["hunger"] = 0;
           damage_entity(player, 1);
      end;
      wait(5);
end;

Froglord1 Just amended the script so it doesn't go below 0.
(if it keeps deducting, it might affect your scripts that increase it again)

So now if its below or at 0, while damaging you it also keeps it set to 0.

Froglord1 ive already done it...I edited my above post with the code for it.

oh,sorry i read "just amend it" instead of "just amended it"