ID:267386
 
Ok say i have this code..

mob/proc/Update()
if(usr.Health fraction of 1/2)
usr.HealthTell = "You are hurt"

How would i make fraction of 1/2 into a fraction?!
***This isnt a DBZ game!!!
Master Flame Sage wrote:
Ok say i have this code..

mob/proc/Update()
if(usr.Health fraction of 1/2)
usr.HealthTell = "You are hurt"

How would i make fraction of 1/2 into a fraction?!
***This isnt a DBZ game!!!

Do not put usr in procs. What were you thinking? No no no no. Use src here; it's correct. usr probably isn't.
mob/proc/Update()
if(Health <= 0.5 * MaxHealth)
HealthTell = "You are hurt"

Lummox JR
mob/proc/Update()
if(src.Health <= src.FullHealth/2)
src.HealthTell = "You are hurt"
Make a varible that defines what the max health is.

-ETG