Code:
mob proc UpdateHealth() if(!src.client) return var/a = round((src.HP/src.MaxHP*100)) for(var/obj/Life/o in src.client.screen) if(a >= 69 ) if(o.type == /obj/Life/Life1 || o.type == /obj/Life/Life2) continue else o.icon_state ="[a]" else if(a < 69 && a >= 38) if(o.type == /obj/Life/Life3) if(o.icon_state) o.icon_state="" if(o.type == /obj/Life/Life1) continue else o.icon_state ="[a]" else if(a < 38 && a >= 0) if(o.type == /obj/Life/Life2 || o.type == /obj/Life/Life3) if(o.icon_state) o.icon_state="" else o.icon_state ="[a]"
|
Problem description:
Can someone help to see what's wrong? I'm trying to update a multi tiled health bar icon except it's not running so smoothly. The first part of the health bar updates well for a few seconds before turning blank, letting the middle part of the health bar updates, and then returns, making some kind of weird shift gap between the two parts.
http://www.byond.com/developer/YungZeus/GameStarterKit