Hey all, just getting the grip around the variables and im experimenting.
This is what i have as a variable

money = 1000;
health = 100;

Then i have the dynamic textbox that shows them.
works great, and i also have various effect that makes the two go up and down. Here's the problem, or more, how i would like to expand the concept but is stuck on.

Right now both variables can go as high and low as possible (of course).
Is there something i can add in that script that makes so the money variable can't go below 0.

Also is there something i can add so that the Health can't go ABOVE say 500 and when health reaches zero (or a negative) this triggers

_root.gotoAndPlay("gameover");

you get what im trying to achive here

Thanks for the help! I hope i made myself clear