client/proc/Place_Hotbars()
for(var/T in typesof(/obj/Keys/)-/obj/Keys)
usr.client += T
obj/var/screenlocation
mob/var/list/obj/Hotbar_Commands=list()
obj/Keys// Creating blank boxes so that the hotbars 'identity' remains hovering
layer=13// over skillcards added to the bar
icon='Hotkeys.dmi'
var/locc
var/hotbar
New(client/C)
icon_state=name
screen_loc=locc
C.screen+=src
..()
Key1
locc = "10,1"
hotbar=1
Key2
locc = "11,1"
hotbar=2
Key3
locc = "12,1"
hotbar=3
Key4
locc = "13,1"
hotbar=4
Key5
locc = "14,1"
hotbar=5
Key6
locc = "15,1"
hotbar=6
Key7
locc = "16,1"
hotbar=7
Key8
locc = "17,1"
hotbar=8
Key9
locc = "18,1"
hotbar=9
Key10
locc = "19,1"
hotbar=10
Key11
locc = "20,1"
hotbar=11
Key12
locc = "21,1"
hotbar=12
obj
Skillcards
layer = 12
New()
..()
src.mouse_drag_pointer = icon(src.icon,src.icon_state)// Changes the mouse's icon when holding a technique tile
MouseDrop(obj/Keys,usr.contents)
usr.Hotbar_Commands[Keys.hotbar] = src
..()
MouseDrop(src)
if(istype(src,/obj/Keys)||istype(src,/obj/Skillcards/))// must be a skillcard being dropped onto a key
..()
else // that they are defined skill cards
return
Problem description:
Basically, I'm trying to make a hotbar system, which allows you to click on the hotbar, activating the skill but, I also want to make it so that you'll be able to press 1,2,3,4,5,6,7,8,9,0,,-,= to activate the skills aswell. For me to do that, I tried use arrays but, couldn't remember how to do it and I don't really understand how the hotbars work in general, I've tried look at a resource only found one and try edit that coding to my liking... You could probably tell it was done poorly.
For example go into your interface, then into your macros, and create a new macro for number 1 and type something like Hotslot(1).
You get the general idea, if you need some more help pager me.