obj/healthbar
icon='hp.dmi'
icon_state="10"
layer=FLY_LAYER+10111
mob/New()
..()
if(src.client==null)
var/obj/O=new /obj/healthbar/
src.overlays+=O
O.owner=src
mob/proc/Updateh()
for(var/obj/healthbar/H in world)
var/mob/M=H.owner
H.icon_state="[round(M.health/M.Mhealth)*10]"
What am I doing wrong? I think it's because either:
1. The healthbar is in it's owners overlays and not in the world.
2. The overlays only contains the healthbar's icon.
There you go. :|
Not sure if that's what you wanted, because I didn't understand exactly what you meant.