Health
layer=MOB_LAYER+56
icon='Hud.dmi'
icon_state="Health"
New(client/C) screen_loc = "4,1", C.screen+=src
Stamina
layer=MOB_LAYER+56
icon='Hud.dmi'
icon_state="Stamin"
New(client/C) screen_loc = "7,1", C.screen+=src
Stamina_
layer=MOB_LAYER+56
icon='Hud.dmi'
icon_state="A"
New(client/C) screen_loc = "8,1", C.screen+=src
Bpnumber
layer = MOB_LAYER + 56
icon = 'Numbers.dmi'
screen_loc = "2,1"
pixel_y = 16
var/position = 0
New(client/C,num_position)
position = num_position
screen_loc = "2:[(position-1)*8],1"
C.screen+=src
Hpnumber
layer = MOB_LAYER + 56
icon = 'Numbers.dmi'
screen_loc = "5,1"
pixel_y = 16
var/position = 0
New(client/C,num_position)
position = num_position
screen_loc = "5:[(position-1)*8],1"
C.screen+=src
Stamnumber
layer = MOB_LAYER + 56
icon = 'Numbers.dmi'
screen_loc = "8,1"
pixel_y = 16
var/position = 0
New(client/C,num_position)
position = num_position
screen_loc = "8:[(position-1)*8],1"
C.screen+=src
Percent
layer=MOB_LAYER+56
icon='Numbers.dmi'
icon_state="%"
New(client/C) screen_loc = "3,1", C.screen+=src
Percent2
layer=MOB_LAYER+56
icon='Numbers.dmi'
icon_state="%"
New(client/C) screen_loc = "6,1", C.screen+=src
Percent3
layer=MOB_LAYER+56
icon='Numbers.dmi'
icon_state="%"
New(client/C) screen_loc = "9,1", C.screen+=src
mob/proc
BPRefresh() // The hp proc. Call this whenever hp adds and or subtratcs
for(var/obj/Bpnumber/H in client.screen) // For var/hpnumber/N in client.screen
H.icon_state = "[copytext(num2text(round(battlepower/maxbp)*100),H.position,H.position+1)]"//Changes the icon state to what's needed
mob/proc
HPRefresh() // The hp proc. Call this whenever hp adds and or subtratcs
for(var/obj/Hpnumber/D in client.screen) // For var/hpnumber/N in client.screen
D.icon_state = "[copytext(num2text(round(Health/maxhp)*100),D.position,D.position+1)]"//Changes the icon state to what's needed
mob/proc
STAMRefresh() // The hp proc. Call this whenever hp adds and or subtratcs
for(var/obj/Stamnumber/A in client.screen) // For var/hpnumber/N in client.screen
A.icon_state = "[copytext(num2text(round(stam/stamax)*100),A.position,A.position+1)]"//Changes the icon state to what's needed
client
New()
new/obj/Bar_1(src)
new/obj/Bar_2(src)
new/obj/Bar_3(src)
new/obj/Bar_4(src)
new/obj/Bar_5(src)
new/obj/Bar_6(src)
new/obj/Bar_7(src)
new/obj/Bar_8(src)
new/obj/Bar_9(src)
new/obj/Bar_10(src)
new/obj/Bar_11(src)
new/obj/Bar_12(src)
new/obj/Battlepower(src)
new/obj/Power_Up(src)
new/obj/Power_Down(src)
new/obj/Health(src)
new/obj/Stamina(src)
new/obj/Stamina_(src)
new/obj/Percent(src)
new/obj/Percent2(src)
new/obj/Percent3(src)
..()
Problem description: Okay, thats the code for my hud. But when I want the numbers on it change with the procs HpRefresh ect. It doesn't work. The proc I put it down here. I put it in my training system and tryed it. It doesn't change to like 66% It just goes straight to 0% when it's really 90% This is what I put:
src.BPRefresh()
src.HPRefresh()
src.STAMRefresh()
//I only posted some of the coding. The rest is fine.
New(client/C) screen_loc = "9,1", C.screen+=src
Does that even compile? It's supposed to be
New(client/C) {screen_loc = "9,1";C.screen+=src}
And just what the poo are you trying to do with this? Sorry if this is correct, but I've never seen anything like it. o.o
And we need to see how you call it, an example given by you provides us with very little information. There could be anything.