mob/Login()
..()
Players += 1
src.loc = locate(1,1,1)
src.client.view = 6
src.client.screen += new/obj/Health/meter1
src.client.screen += new/obj/Health/meter2
src.UpdateHP(src)
src.icon='Player.dmi'
mob/var
hp=100
mhp=100
stam=100
mstam=100
obj
var/num = 0 // This var is used later to help set the icon state
Health
layer = MOB_LAYER+2 // Sets it at a layer above the background.
meter1
icon = 'HP1.dmi'
icon_state = "0"
screen_loc="1,1"
meter2
icon = 'HP2.dmi'
icon_state = "0"
screen_loc="1,2"
mob
proc
UpdateHP()
for(var/obj/Health/H in src.client.screen)
H.num = round(src.hp/src.mhp*100/10)
H.icon_state = H.num
Problem description: My HUD wont show up, however with what I've seen through demos and libraries I'm sure I'm doing everything right.
H.icon_state = H.num
to
H.icon_state = "[H.num]"