GML Need help making a tool bar for game. [Solved]

So, i'm making a moomoo.io like game for educational purposes, i've came to need a tool bar to switch between tools and weapons, i've sketched some ideas, as the calculation for the drawing event and everything, i just have no idea where to start, like arrays and switch functions. Any link to a solved thread or a video(i've searched for a long time until post this) would be really nice.
 

Phil Strahl

Member
It's hard (if not impossible) to come with a robust design when you don't really know where you want to go. Try to nail down the the specifics first and go from there, this also makes it easier for us here in the forums to help you out with specific issues you might be facing. So to start you off, here's how I would describe it:
"You need a toolbar with 8 clickable slots that players can click. Each slot can hold an item or a weapon that players can craft which takes up their resources. Slots holding items whose crafting requirements are not met are grayed out and clicks on them is ignored.", for example. Writing things down as concise and precise as possible helps me narrow in on what I actually want. I know, this isn't the clean-cut solution you're looking for but it might be a stepping stone.
 
It's hard (if not impossible) to come with a robust design when you don't really know where you want to go. Try to nail down the the specifics first and go from there, this also makes it easier for us here in the forums to help you out with specific issues you might be facing. So to start you off, here's how I would describe it:
"You need a toolbar with 8 clickable slots that players can click. Each slot can hold an item or a weapon that players can craft which takes up their resources. Slots holding items whose crafting requirements are not met are grayed out and clicks on them is ignored.", for example. Writing things down as concise and precise as possible helps me narrow in on what I actually want. I know, this isn't the clean-cut solution you're looking for but it might be a stepping stone.
Thanks! Today i did it, as i choose an item with the keyboard (like 1, 2, 3) the toolbar get highlighted the item, i'll be getting a clickable slot too, thank you!
 
Top