Skip to content

Gamepads: Add conditions to check buttons by numerical ID #1996

@Edytor-Studio

Description

@Edytor-Studio

Changes

Added IsButtonPressedByID: A condition to check if a button is held down using its ID.

Added IsButtonJustPressedByID: A condition to trigger only once when a button is first pressed.

Added IsButtonReleasedByID: A condition to trigger when a button is released.

Improved Flexibility: Users can now support any non-standard button (like IDs 17, 18, 19) without modifying the extension's source code.

How to use the new features

Find the new conditions: In the events sheet, search for "Gamepads" and look for conditions with "(by ID)" in their name.

Gamepad identifier: Enter the player number (1, 2, 3, or 4).

Button ID: Enter the numerical index of the button.

Example: For most controllers, 0 is 'A/Cross', 1 is 'B/Circle'.

Special buttons: Use IDs like 17 or 18 for specialized arcade sticks or extra buttons that don't have standard names.

Dynamic Support: You can use a variable in the Button ID field (e.g., Variable(MyButton)) to let players remap their controls dynamically.

Checklist

  • I've followed all of the best practices.
  • I confirm that this extension can be integrated to this GitHub repository, distributed and MIT licensed.
  • I am aware that the extension may be updated by anyone, and do not need my explicit consent to do so.

Example file

example.zip

Extension file

Gamepads.json

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions