How do I use the "has gamepads" condition? [Solved]

0 favourites
  • 3 posts
From the Asset Store
Solve the mathematical equations as fast as you can!
  • Seems simple I know but I'd class myself as someone with a bit of experience.

    I'm making a game, I recently tried to add gamepad support. Having never done so it's been a bit of an uphill struggle, but I thought I was making solid progress.

    However the "has gamepads" condition doesn't seem to be working at all. Maybe it's my laptop, maybe it's my programming, or maybe it's a bug in Construct 2. If someone else could confirm I have/haven't done something wrong I'd appreciate it.

    The event sheets are a bit of a mess, but here's the capx: https://www.dropbox.com/s/m109sytmaje5x ... .capx?dl=0

    The easiest places to see what I'm talking about are:

    Controls_Enabled = 0 means Mouse & Keyboard, Controls_Enabled = 1 means Gamepad

    Event Sheet_Options line35 This to me would suggest you can only activate gamepad control if there was a gamepad connected but that's not the case.

    Similarly, Event Sheet_Tutorial (Mouse) line 3 should switch controls from gamepad back to mouse if no gamepad is connected, again this isn't true.

    There's also the exact same situation in Event Sheet_World 1 but that's a lot more messy.

    Thanks for your help!

    EDIT: To demonstrate, here's a link to the game: https://levelupjordan.itch.io/secret?se ... 3GwjkNCj2s

    If you enable gamepad in options when there isn't a connected gamepad you will see the behaviour I'm referring to when you are in control of the character.

  • Your project is indeed messy. Too messy for it not to be faulty I assume but honestly, I can't review 800+ events and tell you how/where.

    "Has gamepads" does work as intended in a clear new project.

    If it doesn't work as intended in your game, I would then suspect your game's logic is at fault.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I didn't think it was messy enough to be doubly noteworthy!

    It's now working and I didn't change a single line, it must just be my laptop being dodgy.

    Thanks for your time.

    EDIT: And sorry to bother you with something that ended up being nothing at all.

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