Mouse and Keybourd OR gamepad

  • i am using the command

    Every tick >> Sprite >> set angle to mouse.x Mouse.y

    and this is great for mouse when using a 8 direction moving over the top game.

    i also have my controller working, as long as i disable that one line of code. my question is how to disable that line of code in game if the user wants to use a controller instead?

    i have made a Splash screen that makes the user click a box, or press A on gamepad, then the next screen tells the user how to use the controls for what they selected, then the next screen is the game. any help is good, thanks.

  • Create a global variable CONTROLTYPE

    Set it based on what the user wants to use then

    Compare Variable CONTROLTYPE = "Gamepad"

    • Game pad code here as sub events

    Else

    • Every tick >> Sprite >> set angle to mouse.x Mouse.y

    Or something like that.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • i didn't even think about this! thanks man

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