How do Make "custom gamepad buttons" selection?

Get help using Construct 2

Post » Sun Sep 01, 2013 9:03 pm

I would like to know how to make a "menu" for the user to select their own buttons and they become "stored" as well as in the emulator, for example:

Attack
Jump

Click and press the desired button..
I hope you have given to understand. And sorry for my bad english.

EdiT:
And I want at the time that the player is playing, the controls for Gamepad getting chosen as player controls (of course)DFox2013-09-01 21:06:34
B
9
S
1
Posts: 75
Reputation: 1,118

Post » Mon Sep 02, 2013 4:35 am

Anyone? I need a selection of controls for my game, please help me :(
B
9
S
1
Posts: 75
Reputation: 1,118

Post » Mon Sep 02, 2013 4:49 am

I recommend reading the manual page for the Gamepad object..

A condition and expression combination that would be useful is:

Gamepad | on Gamepad(0) any button pressed   >   [variable] to Gamepad.LastButton(0)

so for example you can have a variable that stores the button ID for jumping, called 'JumpID' or something.

and for a custom controls screen it can prompt you for each button, one by one
a text object could read "press key for Jump"

and then have the event

Gamepad | on Gamepad(0) any button pressed > set JumpID to Gamepad.LastButton(0)

and then set the text object to read "press key for Attack"

Gamepad | on Gamepad(0) any button pressed > set AttackID to Gamepad.LastButton(0)

etc.

and then, to check if the jump button is pressed, you can use the condition

Gamepad | on Gamepad(0) button JumpID pressed/down
B
28
S
8
G
1
Posts: 469
Reputation: 4,683

Post » Mon Sep 02, 2013 5:10 am

Man... Really.... Very Thank You!!! :D
B
9
S
1
Posts: 75
Reputation: 1,118


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 5 guests