ID:149596
 
i have this in my stat bar thing. Now i want to add it as a on screen object
src.health_meter.num = (src.hp/src.maxhp)*src.health_meter.width
src.magic_meter.num = (src.mp/src.maxmp)*src.magic_meter.width

//update the meters to take on the new changes
src.health_meter.Update()
src.magic_meter.Update()

//change the meters' names to reflect the current numbers
src.health_meter.name = "[src.hp]/[src.maxhp]"
src.magic_meter.name = "[src.mp]/[src.maxmp]"

using nadrews hud sytemn here

obj
hud
menus//for the main menus
layer = MOB_LAYER + 1//appears above mobs
icon = 'menus.dmi'//sets the icon for all the things defined under /obj/hud/menus
main//The main button
icon_state = "main"
Click()//When clicked
usr.openmenu("main")//Calls the openmenu proc with "main" as it's argument
New(client/C)//When created
screen_loc = "1,15"//Locates it on the screen
C.screen+=src//Adds it to client's screen

i was thinking somewhere in there