How do I detect gamepad type?

0 favourites
  • 9 posts
From the Asset Store
Change delay, create new lines, "backspace" the text
  • How do I detect gamepad type - Xbox, PS, other?

    There is an expression GamepadID, which returns make and model, but what values should I look for?

    (I don't have Xbox or PS controllers)

    Tagged:

  • Could anyone who owns PS controller please tell me what value is returned by Gamepad.GamepadID(0) expression?

  • Perhaps if you upload a quick project that displays the returned value for detected controllers I can forward the link to a friend who has one and let you know what he sees.

    FWIW I'm using a dualshock 3 with an xinput wrapper, so the system sees it as an xbox controller. I think most games default to showing xbox style controls/tutorials. It would be nice to be able to choose manually in my case, sense autodetection would result in xbox style controls after all.

  • oosyrag Thanks, here is the link:

    doptrix.com/Construct/gamepad

    If possible, could you please ask your friend to test on Android? I believe gamepadID may return different values on different platforms. But an ID from a PC will also be very helpful.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • cdn.discordapp.com/attachments/780147845151326229/790121973438480424/unknown.png

    Gamepad #1 is a Dualshock 4

    Gamepad #2 is a Dualshock 4 running through DS4Windows wrapper

    Mine also looks like #2, running a Dualshock 3 through SCP Server

    Not sure how to go about on android...

  • Thanks!

    None of them mention "PS" or "Playstation". I guess I'll have to find another way to detect PS gamepad - ask player to press a specific button or something..

  • did you ever figure a way to do this? I search for the term "xbox" in the ID string and include a remap program incase its not in the list.

    and its a pain because I also need to allow mouse controls if their controller buttons are not mapped correctly.

    So far I've had users test with PS4 and Xbox controllers and everything maps correctly. but someone had a Switch Pro Controller (3rd party) and the buttons worked but were all mapped incorrectly.

  • Some games will have a section in their settings that allows the player to change the button prompts graphics if there's no way to dynamically determine what kind of controller they are using.

  • I just do generic symbols

    but for incorrectly mapped controllers its a problem. in that case I would make another animation of single frames and just the glyphs be a generic button. I haven't really tested it yet, but I will have to at some point.

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