8 Directions Gamepad Bug

0 favourites
  • 4 posts
From the Asset Store
Rotate & Animation for 16 Direction & Mouse Direction
  • I'm making a multiplayer game that uses two gamepads, and the players move in 8 directions.

    Using this tutorial h*t*t*p*s://w*w*w.scirra.com/tutorials/4859/smooth-gamepad-joystick-movement the player 1 works perfectly, but the player 2 only moves in the diagonals.

    Player 1 events:

    Player 2 events:

    As you can see, they are exactly the same, changing only the gamepad index.

    Testing, i could see that if i disable the 8_Way2 on the player 2 he don't move at all, so the 4_Way2 is never being executed for some reason. I maked a third player, with the same events, and he also has the same bug.

    Any ideas ?

  • First, you are confusing people and scaring them away telling that this is a multiplayer game. It's not. Multiplayer in C2 means playing with other people online.

    Your mistake is in Axis() expression. It takes two parameters - gamepad number and axis index.

    So for the second player you should use Axis(1, index)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • First, you are confusing people and scaring them away telling that this is a multiplayer game. It's not. Multiplayer in C2 means playing with other people online.

    Haha, sorry for that, its a local multiplayer.

    Your mistake is in Axis() expression. It takes two parameters - gamepad number and axis index.

    So for the second player you should use Axis(1, index)

    And thank for the reply, problem solved.

  • This forum should implement a 'like' button for msgs

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