How do Make "custom gamepad buttons" selection?

0 favourites
  • 4 posts
From the Asset Store
Selection frame like in RTS games, works both on mobile and desktop devices.
  • 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)

  • Anyone? I need a selection of controls for my game, please help me :(

  • 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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Man... Really.... Very Thank You!!! :D

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