ID:173950
 
I want to stop the health going over the Max_health var
how can I do this?

Is this right? :

if(health >= Max_health)
health = Max_health
Please do not start another thread!

~Ease~
if(health >= Max_health)
health = Max_health

this wont work unless you have these defined:
var
health
Max_health

I'm pretty sure your not using world vars for a mobs health and maximum health, so most likely you have them defined like this:
mob/var
health
Max_health

which in this case your if() should be like this:
if(src.health >= src.Max_health)
src.health = src.Max_health

as long as src is the mob who's health you want to check, this should work fine.

Trog