ID:139216
 
Code:
client/proc/BeginHotKeys()
new/obj/JutsuKeys/J1(src)
new/obj/JutsuKeys/J2(src)
new/obj/JutsuKeys/J3(src)
new/obj/JutsuKeys/J4(src)
new/obj/JutsuKeys/J5(src)
new/obj/JutsuKeys/J6(src)
new/obj/JutsuKeys/J7(src)
new/obj/JutsuKeys/J8(src)
new/obj/JutsuKeys/J9(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/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)
obj/JutsuKeys
layer=98
icon='Jutsu Buttons.dmi'
var/locater
New(client/C)
screen_loc=locater
C.screen+=src
J1
icon_state = "B"
locater = "1,1"
J2
icon_state = "B"
locater = "2,1"
J3
icon_state = "B"
locater = "3,1"
J4
icon_state = "B"
locater = "4,1"
J5
icon_state = "B"
locater = "5,1"
J6
icon_state = "B"
locater = "6,1"
J7
icon_state = "B"
locater = "7,1"
J8
icon_state = "B"
locater = "8,1"
J9
icon_state = "B"
locater = "9,1"
obj/Keys
layer=99
icon='Jutsu Buttons.dmi'
icon_state = "Blank"
var/locater
New(client/C)
screen_loc=locater
C.screen+=src
Key1
locater = "1,1"
Key2
locater = "2,1"
Key3
locater = "3,1"
Key4
locater = "4,1"
Key5
locater = "5,1"
Key6
locater = "6,1"
Key7
locater = "7,1"
Key8
locater = "8,1"
Key9
locater = "9,1"
obj/Numbers
layer=100
icon='Jutsu Buttons.dmi'
var/locater
New(client/C)
screen_loc=locater
C.screen+=src
Key1
icon_state = "1"
locater = "1,1"
Key2
icon_state = "2"
locater = "2,1"
Key3
icon_state = "3"
locater = "3,1"
Key4
icon_state = "4"
locater = "4,1"
Key5
icon_state = "5"
locater = "5,1"
Key6
icon_state = "6"
locater = "6,1"
Key7
icon_state = "7"
locater = "7,1"
Key8
icon_state = "8"
locater = "8,1"
Key9
icon_state = "9"
locater = "9,1"

mob/proc/SkillsUpdate()
for(var/obj/Skillcards/Z in src.contents)
if(Z.SlotL!=0)
if(Z.JutsuType=="Ninjutsu")
src << output(Z, "Ninjutsu.nin[Z.SlotL]")
src << output(Z.name, "Ninjutsu.ninname[Z.SlotL]")


obj
var
screenlocation
SlotL = 0
JutsuType = "None"
Skillcards
layer = 9
New()
..()
src.mouse_drag_pointer = icon(src.icon,src.icon_state)
DblClick()
usr.SkillsUpdate()
MouseDrop(obj/Slot)
if(Slot)
usr.client.screen += src
src.screen_loc=Slot.screen_loc
src.screenlocation = src.screen_loc
if(istype(Slot,/obj/Skillcards))
usr.client.screen -= Slot
Slot.screenlocation = null
else
..()
MouseDrop(src)
if(istype(src,/obj/Keys)||istype(src,/obj/Skillcards/Ninjutsu))
..()
else
return
Skillcards
Ninjutsu
icon = 'Jutsu Buttons.dmi'
JutsuType = "Ninjutsu"
Ama
icon_state = "Amaterasu"
name = "Amaterasu"
Click()
alert("Dude I said test 5 times why the fuck would you keep clicking them retard...")
Chidori
icon_state = "Chidori"
name = "Chidori"
Click()
alert("Test")
Rinnengan
icon_state = "Rinnengan"
name = "Rinnengan"
Click()
alert("Test")
Byakugan
icon_state = "Byakugan"
name = "Byakugan"
Click()
alert("Test")


Problem description:


Anyways I used Asakuraboy's guide to make a hotkey thing for attacks but I caant get the drag n drop tow ork. Like I drag the skill card over to the hotkey bars but they wont appear on them ): I also changed a few vars to my liking.
While I don't have an answer to your question, there is an easier way of generating objs for your HUD without having to list all of them out.

for(var/hud in typesof(/obj/hud) - /obj/hud) //Create everything that's of the type /obj/hud, but also disclude /obj/hud itself as it most likely isn't doing anything.
new hud(src)
In response to LordAndrew
LordAndrew wrote:
While I don't have an answer to your question, there is an easier way of generating objs for your HUD without having to list all of them out.

> for(var/hud in typesof(/obj/hud) - /obj/hud) //Create everything that's of the type /obj/hud, but also disclude /obj/hud itself as it most likely isn't doing anything.
> new hud(src)
>



How would I code in the list then with this code you showed me, Im a novice coder >_<