world view="35x23" loop_checks=0
client/proc/StartHotkeys() new/obj/Numbers/Key0(src) new/obj/Numbers/Key1(src) new/obj/Numbers/Key2(src) new/obj/Numbers/Key3(src) new/obj/Numbers/Key4(src) new/obj/Numbers/Key5(src) new/obj/Numbers/Key6(src) new/obj/Numbers/Key7(src) new/obj/Numbers/Key8(src) new/obj/Numbers/Key9(src) new/obj/Numbers/Key10(src) new/obj/Numbers/Key11(src) new/obj/Numbers/Key12(src) new/obj/Keys/Key0(src) new/obj/Keys/Key1(src) new/obj/Keys/Key2(src) new/obj/Keys/Key3(src) new/obj/Keys/Key4(src) new/obj/Keys/Key5(src) new/obj/Keys/Key6(src) new/obj/Keys/Key7(src) new/obj/Keys/Key8(src) new/obj/Keys/Key9(src) new/obj/Keys/Key10(src) new/obj/Keys/Key11(src) new/obj/Keys/Key12(src) obj/Hotkeys layer = 99 icon='Hotkeys.dmi' var/locc New(client/C) screen_loc=locc C.screen+=src Z1 icon_state = "z1" locc = "1,14" Z2 icon_state = "z2" locc = "1,13" X1 icon_state = "x1" locc = "15,2" X2 icon_state = "x2" locc = "16,2" X3 icon_state = "x3" locc = "15,1" X4 icon_state = "x4" locc = "16,1"
obj/Keys layer=10 icon='Hotkeys.dmi' icon_state = "" var/locc New(client/C) screen_loc=locc C.screen+=src Key0 locc = "2,1" Key1 locc = "3,1" Key2 locc = "4,1" Key3 locc = "5,1" Key4 locc = "6,1" Key5 locc = "7,1" Key6 locc = "8,1" Key7 locc = "9,1" Key8 locc = "10,1" Key9 locc = "11,1" Key10 locc = "12,1" Key11 locc = "13,1" Key12 locc = "14,1" obj/Numbers layer=25 icon='Hotkeys.dmi' var/locc New(client/C) screen_loc=locc C.screen+=src Key0 icon_state = "~" locc = "2,1" Key1 icon_state = "1" locc = "3,1"
Key2 icon_state = "2" locc = "4,1" Key3 icon_state = "3" locc = "5,1" Key4 icon_state = "4" locc = "6,1" Key5 icon_state = "5" locc = "7,1" Key6 icon_state = "6" locc = "8,1" Key7 icon_state = "7" locc = "9,1" Key8 icon_state = "8" locc = "10,1" Key9 icon_state = "9" locc = "11,1" Key10 icon_state = "0" locc = "12,1" Key11 icon_state = "-" locc = "13,1" Key12 icon_state = "+" locc = "14,1"
obj var screenlocation SlotLoc = 0 SkillType = "None" DblClick()
obj/skill layer=95 icon='Skill.dmi' MouseDrag() mouse_drag_pointer=src MouseDrop(obj/overobject,srclocation,overlocation) if(istype(overobject,/obj/Keys/)) screen_loc=overobject.screen_loc usr.client.screen+=src if(name==usr.slot0)usr.slot0=null if(name==usr.slot1)usr.slot1=null if(name==usr.slot2)usr.slot2=null if(name==usr.slot3)usr.slot3=null if(name==usr.slot4)usr.slot4=null if(name==usr.slot5)usr.slot5=null if(name==usr.slot6)usr.slot6=null if(name==usr.slot7)usr.slot7=null if(name==usr.slot8)usr.slot8=null if(name==usr.slot9)usr.slot9=null if(name==usr.slot10)usr.slot10=null if(name==usr.slot11)usr.slot11=null if(name==usr.slot12)usr.slot12=null switch(overobject.icon_state) if("0")usr.slot0=name if("1")usr.slot1=name if("2")usr.slot2=name if("3")usr.slot3=name if("4")usr.slot4=name if("5")usr.slot5=name if("6")usr.slot6=name if("7")usr.slot7=name if("8")usr.slot8=name if("9")usr.slot9=name if("10")usr.slot10=name if("11")usr.slot11=name if("12")usr.slot12=name else usr.client.screen-=src if(name==usr.slot0)usr.slot0=null if(name==usr.slot1)usr.slot1=null if(name==usr.slot2)usr.slot2=null if(name==usr.slot3)usr.slot3=null if(name==usr.slot4)usr.slot4=null if(name==usr.slot5)usr.slot5=null if(name==usr.slot6)usr.slot6=null if(name==usr.slot7)usr.slot7=null if(name==usr.slot8)usr.slot8=null if(name==usr.slot9)usr.slot9=null if(name==usr.slot10)usr.slot10=null if(name==usr.slot11)usr.slot11=null if(name==usr.slot12)usr.slot12=null Click() if(loc!=usr)del src ..() Heal icon_state="Heal" Click()usr.Heal()
mob/verb Hotslot0() set hidden=1 if(slot0)skilluse(slot0) Hotslot1() set hidden=1 if(slot1)skilluse(slot1) Key2() set hidden=1 if(slot2)skilluse(slot2) Key3() set hidden=1 if(slot3)skilluse(slot3) Key4() set hidden=1 if(slot4)skilluse(slot4) Key5() set hidden=1 if(slot5)skilluse(slot5) Key6() set hidden=1 if(slot6)skilluse(slot6) Key7() set hidden=1 if(slot7)skilluse(slot7) Key8() set hidden=1 if(slot8)skilluse(slot8) Key9() set hidden=1 if(slot9)skilluse(slot9) Key10() set hidden=1 if(slot10)skilluse(slot10) Key11() set hidden=1 if(slot11)skilluse(slot11) Key12() set hidden=1 if(slot12)skilluse(slot12)
mob proc skilluse(var/A) var/k="[A]" switch(k) if("Heal")Heal()
|
And just for future reference - you cannot post a huge snippet like this and say "why doesn't it work?".
In my opinion, if you need all that obnoxious programming just for on-screen HUD objects, then you're doing it wrong. However, since I myself have never personally used on-screen HUDs (I rather use the interface for its purpose), I cannot, for certain, tell you that you are doing it wrong.