Using Gamepads

This forum is currently in read-only mode.
From the Asset Store
With this template you will learn how to use the GooglePlay Games native plugin
  • Is there a way to use gamepads in Construct, or a way to redefine which keys are used for the various movement types?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I haven't set it up properly for my game yet, but AutoHotkey is an incredible program once you get the basic hang of redefining keys.

    Tested an old script I used to play an RPG on my 360 gamepad, and it worked fine in Construct. Just so you get an idea of how simple it is, this is the script in notepad:

    Joy6::Send {Enter}
    Joy8::Send {Escape}
    
    Joy1::
    Send {Down down}
    SetTimer, WaitDown, 30
    return
    WaitDown:
    if not GetKeyState("Joy1")
    {
    Send {Down up}
    SetTimer, WaitDown, off
    return
    }
    Send {Down down}
    return
    
    Joy3::
    Send {Left down}
    SetTimer, WaitLeft, 30
    return
    WaitLeft:
    if not GetKeyState("Joy3")
    {
    Send {Left up}
    SetTimer, WaitLeft, off
    return
    }
    Send {Left down}
    return
    
    Joy2::
    Send {Right down}
    SetTimer, WaitRight, 30
    return
    WaitRight:
    if not GetKeyState("Joy2")
    {
    Send {Right up}
    SetTimer, WaitRight, off
    return
    }
    Send {Right down}
    return
    
    Joy4::
    Send {Up down}
    SetTimer, WaitUp, 30
    return
    WaitUp:
    if not GetKeyState("Joy4")
    {
    Send {Up up}
    SetTimer, WaitUp, off
    return
    }
    Send {Up down}
    return[/code:2jusld89]
    
    The only reason I set movement to the keys instead of joystick is because I'm lazy; bear in mind that it entirely possible to customize and macro-ify any keyboard, mouse and gamepad input with an AutoHotkey script.
    
    Built-in gamepad use for Construct would be cool! If you didn't know, you can change global input keys and their aliases when you click your game name in the project pane; 'controls', at the bottom of its properties window.
  • thanks a bunch for the informative reply!

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