mob/var
insurance = /turf/medic/Free // insurance type
inhospital = 0
mob/proc/hospital()
var/area/T = usr.insurance
for(T in world)
if(Move(T))
src << "You have made it into a hospital bed!"
src.inhospital = 1
return
//HEAL CHECK
mob
var/healtime=200
New()
..()
spawn(healtime) HealLoop()
proc/HealLoop()
if(vitality<=0 )
if(inhospital == 0)
hospital()
else
..()
if(inhospital == 1)
for(var/turf/medic/T in view(0,src))
src.vitality += T.healrate
vitality=min(vitality+1,max_vitality)
spawn(healtime-recovery) HealLoop()
NOw, it keeps on sending me to the hospital...over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over again.
Help is GREATLY appreciated.
-ST
If that's not what you were after, then I can modify it to suit your needs. :)