Multiple gamepad for local multiplayer control

0 favourites
  • 7 posts
From the Asset Store
"Easy Local Notifications" enhances games with customizable local notifications.
  • Hello!

    My game is using gamepad stick 360 degree rotation for player. It works like this: set rotation towards angle: angle(0,0,Gamepad.Axis(0,0),Gamepad.Axis(0,1)), but it uses joystick movements of all my gamepads. I want to create local multiplayer with multiple gamepads that will control different players' movement.

    Please, help!

  • I think you need to add gamepad number after "Gamepad":

    angle(0,0,Gamepad(0).Axis(0,0),Gamepad(0).Axis(0,1))

    angle(0,0,Gamepad(1).Axis(0,0),Gamepad(1).Axis(0,1))

    etc.

  • I can't connect 2 gamepads right now. Only one. Is it normal that the same gamepade works with gamepad(0), gamepad(1) and etc. ?

  • draiza

    Sorry, I was wrong. Gamepad number is the first parameter of Axis expression:

    Gamepad.Axis(0,1) - means gamepad #0, axis 1

    Gamepad.Axis(3,2) - means gamepad #3, axis 2

  • Hmmm, it's strange but my other gamepad not working at all in construct but x360ce see it correctly. In x360 ce it's shown as first controller and in construct 2 I tried to set it as #0-4 controller but it don't want to work at all. If i try with old gamepad it works with #0. Another strange thing is that I can't use old's gamepad buttons at all, maybe p.s. another gamepad is also connected but it's still stays strange.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • My old gamepad in x360ce is second conntroller.

  • Ok, yes. If I disconnect new controller the old's buttons works correctly but if I disconnect old one nothing wants to work.

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