Custom Mouse Controls

0 favourites
  • 4 posts
From the Asset Store
Total customisation of the input! You can combine inputs from all peripherals. Make your game accessible for everyone!
  • For keyboard and gamepad objects, I can get the last key or button pressed and assign that input to a variable to customize controls. I can't seem to find any similar actions for the mouse object so I can't let a user change those inputs. Am I missing something or are there any workarounds for this?

    Thanks

    -Lou

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Can you give an example of how you are currently assigning custom keys to your controls? It will be easier to see how best to integrate.

    Basically upon entering an "Assign key" state, add events for on left/right/middle mouse clicked - do something. This should be in parallel to your on keyboard key or button pressed.

  • I have global variables representing all the actions in my game, for example, key_jump. When the user wants to change controls, I wait for input using keyboard.LastKeyCode or gamepad.LastButton and assign that to key_jump. I then call those variables using keyboard.keycode or gamepad(0).buttonindex. That all works fine. However the mouse doesn't seem to have these features. I can't seem to assign an index of a mouse button to a variable. I then can't say on mouse index pressed - do something.

  • Sorry don't have an answer off the top of my head. I'll experiment a bit when I get the chance to see if there is anything that can be done.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)