How do I use gamepads?

Get help using Construct 2

Post » Fri Feb 26, 2016 1:42 am

How can i use 4 gamepads to control 4 distinct players? I want four people to control the characters at the same time in a coop game, but I just can't figure out how to do this :(

Please someone help me.

P.S: Sorry for my bad english, I'm Brazilian
B
3
Posts: 3
Reputation: 183

Post » Fri Feb 26, 2016 3:00 am

Hey ericksr, :)

When adding an "On button index pressed" condition, one of the values you can specify is the "Gamepad" number. This number is "0" by default, which essentially means the first player. "1" would be the second player, "2" would be the third player, and "3" is the forth.

So, to create an event that detects only the second player pressing the jump button, you would use the "On button index pressed" condition and enter "1" for the "Gamepad" number.
B
28
S
18
G
8
Posts: 333
Reputation: 6,193

Post » Fri Feb 26, 2016 10:28 am

Hi @fisholith,

I've tried to use this this condition before, but it didn't work. Can you show me a simple example where you use 2 gamepads?

Thanks!
B
3
Posts: 3
Reputation: 183

Post » Fri Feb 26, 2016 10:52 am

Hi,
as far as I know you have to push a button so C2 recognizes the gamepad and it has to be XBox compatible

you could check that
create a few textobjects and in the eventsheet
gamepad | On gamepad 0 Button A is pressed
subevent Gamepad | gamepads are supported | obj_textbox0 | set text to "0 is supported
same for gamepad 1, 2, 3

There is also a check "has gamepads" and "on gamepad connected"

  • System > On start of layout | system > load game from slot "brain"
  • System > On load failed | system > scroll to obj_Forum
B
17
S
8
G
5
Posts: 340
Reputation: 4,707

Post » Fri Feb 26, 2016 11:37 pm

@fm4fanAt Hi,

I know how to check, but the fact it is that even using
gamepad 0 right shoulder trigger is down | sprite 0 simulate car pressing accelerate
gamepad 1 right shoulder trigger is down | sprite 1 simulate car pressing accelerate

Only the first player moves and I don't know why.
B
3
Posts: 3
Reputation: 183


Return to How do I....?

Who is online

Users browsing this forum: jojomickymack, LogoGuy2017, pegasus6464 and 31 guests