SOLVED-I can get gamepad(0) Y axis but not gamepad(1) Y axis

0 favourites
  • 3 posts
  • Hello,

    I'm making a multiplayer top-down shooter game, played with gamepads.

    I can get player 1 moving with left stick, aiming with right stick, dodging with left button, shooting with right trigger, all on gamepad(0).

    To add a player 2, I cloned every assets and cloned the controls to fit player 2. Now my player 2 can move and dodge correctly, but he can't aim. I can't get the gamepad 1 Y axis.

    When looking into the capx, do you have any ideas why?

    Thanks a lot for your help.

  • You're using the wrong notation. Take a look at this line:

    Placing a number n in parenthesis after the object name tells Construct you want to access properties from the nth instance of that object -- you can do this for all object types, and has nothing to do with the Gamepad index.  You're trying to access the Gamepad instance with index 1, which doesn't exist since there's only one instance of the Gamepad object.  The Gamepad index is specified in the first parameter of the "Axis" expression.  So what you actually want is this:
    And similar things with the rest of your expressions.
    EDIT: Some links for reference:
    [url=]Expressions - See "Object expressions"[/url]
    [url=]Gamepad manual entry[/url]
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks a lot! I also had some typo errors.. now everything is working! And thanks again for the useful info.

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