Using Gamepads

For questions about using Classic.

Post » Sun Dec 09, 2007 9:51 pm

Is there a way to use gamepads in Construct, or a way to redefine which keys are used for the various movement types?
B
1
G
5
Posts: 2
Reputation: 1,229

Post » Sun Dec 09, 2007 11:00 pm

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:

[code:2jusld89]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.
B
4
S
2
G
6
Posts: 161
Reputation: 2,597

Post » Sun Dec 09, 2007 11:15 pm

thanks a bunch for the informative reply!
B
1
G
5
Posts: 2
Reputation: 1,229


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests