ID:268654
 
mob/Login()
src.HUD()
mob/proc/HUD()
src.client.screen += new/obj/HUD/midtop1
src.client.screen += new/obj/HUD/midtop2
src.client.screen += new/obj/HUD/midtop3
src.client.screen += new/obj/HUD/midtop4
src.client.screen += new/obj/HUD/midtop5
src.client.screen += new/obj/HUD/midtop6
src.client.screen += new/obj/HUD/midtop7
src.client.screen += new/obj/HUD/midtop8
src.client.screen += new/obj/HUD/midtop9
src.client.screen += new/obj/HUD/midtop10
src.client.screen += new/obj/HUD/midtop11
src.client.screen += new/obj/HUD/bottop1
src.client.screen += new/obj/HUD/bottop2
src.client.screen += new/obj/HUD/bottop3
src.client.screen += new/obj/HUD/bottop4
src.client.screen += new/obj/HUD/bottop5
src.client.screen += new/obj/HUD/bottop6
src.client.screen += new/obj/HUD/bottop7
src.client.screen += new/obj/HUD/bottop8
src.client.screen += new/obj/HUD/bottop9
src.client.screen += new/obj/HUD/bottop10
src.client.screen += new/obj/HUD/bottop11


Halp, wut is a better way of duing this so i dunt have to do src.client.screen += whatever so meny times?
Halp pls.
In response to Vash_616
Vash_616 wrote:
Halp pls.

Lean english properly and then more people would help.

obj/hud
        bright
                layer = 21
                name = "Bottem Right"
                icon = 'Icons/menus.dmi'
                icon_state = "br"
                New()
                        src.screen_loc = "20,1"
                        usr.client.screen+=src
        tright
                layer = 21
                name = "Top Right"
                icon = 'Icons/menus.dmi'
                icon_state = "tr"
                New()
                        src.screen_loc = "20,19"
                        usr.client.screen+=src
        bleft
                layer = 21
                name = "Bottem Left"
                icon = 'Icons/menus.dmi'
                icon_state = "bl"
                New()
                        src.screen_loc = "1,1"
                        usr.client.screen+=src
        tleft
                layer = 21
                name = "Top Left"
                icon = 'Icons/menus.dmi'
                icon_state = "tl"
                New()
                        src.screen_loc = "1,19"
                        usr.client.screen+=src
        bottom
                layer = 15
                name = "Bottom"
                icon = 'Icons/menus.dmi'
                icon_state = "b"
                New()
                        src.screen_loc = "1,1 to 20,1"
                        usr.client.screen+=src
        top
                layer = 21
                name = "Top"
                icon = 'Icons/menus.dmi'
                icon_state = "t"
                New()
                        src.screen_loc = "2,19 to 19,19"
                        usr.client.screen+=src
        left
                layer = 25
                name = "Left"
                icon = 'Icons/menus.dmi'
                icon_state = "l"
                New()
                        src.screen_loc = "1,18 to 1,2"
                        usr.client.screen+=src
        right
                layer = 21
                name = "Right"
                icon = 'Icons/menus.dmi'
                icon_state = "r"
                New()
                        src.screen_loc = "20,18 to 20,2"
                        usr.client.screen+=src

Do something like tis for the borders to make your code smaller

mob/Choosechar
        Login()
                new/obj/hud/tright
                new/obj/hud/tleft
                new/obj/hud/bright
                new/obj/hud/bleft
                new/obj/hud/bottom
                new/obj/hud/top
                new/obj/hud/right
                new/obj/hud/left
                new/obj/hud/say
                new/obj/hud/shout
                new/obj/hud/save
                new/obj/hud/gold
                new/obj/hud/exp
                new/obj/hud/stats

and that to add them to your screen
In response to Smoko
no heres an example..

obj/hud
bright
layer = 21
name = "Bottem Right"
icon = 'Icons/menus.dmi'
icon_state = "br"

mob/login()
for(hud)
src.client.screen+=HUD


I know thats not right but thats how i can explain it so i just have to hard code it and add something similar into my mob login and have it appear instead of doing continueous lines of src.client.screen+=whatever all the time.

In response to Vash_616
client/New()
..()
for(var/obj/V in typesof(/obj/HuD)
screen += new V


I'd figure this works... I've never done anything with the client's screen var.
In response to Vash_616
Oh, I dont know how to do that properly, I think Destroys on screen inventory does it