I'm working on adding custom controls to my game...beacuse I hate when developers lock you into their button layout.

Anyway, it occurs to me that this must have been discussed before, included in a tutorial, etc...but my searching isn't getting anywhere.

In particular, I'm having a bit of trouble coming up with an elegant solution to custom map mouse buttons. With the keyboard I can just store keycodes in global variables like "keycode_foo", then "On keycode (keycode_foo) pressed".

However, there is no "On (keycode_foo) mouse button clicked" action, and all I'm coming up with is awkward, convoluted event trees.

Not sure if this will help you, but it might..It's meant to turn Keyboardinput into the numbers on the NumPad..so to check if a key is pressed and the mousebutton is pressed at the same time would be rather easy (But I might have totally misunderstood your question)

You do not have the required permissions to view the files attached to this post.

I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..

Sorry, but that's not quite what I'm after. Trying to come up with a good way to alias any mouse button to any control.

With the keyboard, I can store keycodes in global variables (or an array) and then have "On keycode (keycode_foo) pressed" events. When these are true, I set a global var to 1. So

On keycode Keycode_Attack pressed:Set ControlDown_Attack to true

However, there is no equivalent "On mouse button (mousecode_foo) pressed" action. Instead I have to do:

On left/middle/right clickSet ???

With the keycode solution, I know what the user is trying to do by the name of the keycode var, and I know they are pressing the right key by evaluating it's value. But...how do I handle that for the mouse? All I can tell is when the the different mouse buttons are down...I have to figure out what said buttons are supposed to do with other logic.

I can think of a couple ways to do it, with functions or groups, but my approaches seem overly complicated. I can't help but think "Ockham's razor...you are missing something."

couldn't you just add a variable mousebutton or something and make actions based on that variable..there's only three mousebuttons, so creating an event to change the mousebuttonvariable based on user preferences shouldn't be hard..It seems to me to be that easy, but I might be overlooking something?

I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..

Call back referenes. Personally I like to use a dictionary. There is a tutorial. but it's all about knowing the keywords to use.... but you won't know them until you found the tutorial in the first place