mob
proc
UpdateHP1()
if(src.Pokemons)
var/HP
var/mob/M
HP=round(M.HP/M.MaxHP*100)/10
if(src.Pokemons.len==1)
M=src
for(var/obj/HUD/HPBar/HP1/o in src.client.screen)
o.icon_state=num2text(HP)
spawn(10)
src.UpdateHP1()
UpdateFH1()
if(src.Pokemons)
var/mob/M
if(src.Pokemons.len==1)
M=src
var/obj/HUD/FaceHolder1/FH1
FH1=new(M.icon,M.icon_state)
src.client.screen+=FH1
spawn(10)
src.UpdateFH1()
Update()
src.UpdateFH1()
src.UpdateHP1()
Problem description:
This don't update HP Bar or put icon_state of pokemon on HUD
Here is an example of how to update the value of a Bar control.
As for the Pokemon problem. Their is also a way to fix this with the interface. By using label's.
Let's say you created a label called "label1".
Hope this helped ya.
PS: Don't forget to switch the "usr" in winset to a "src" if it's included into a procedure (proc).