How to set a keyboard and gamepad in a local multiplayer?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By MADNA

I am making a Fighting Game
I made a scene with a message saying, player1 press start, player2 press start, receive the events, but how can I assign them to a character without it ending up affecting both players 1 or 2 using a keyboard or gamepad?
I tríed using event.set_device(n), but it didn’t work

You could try assigning different button to each player. For example, player 1’s start button could be “X” on Device 0, and player 2’s could be X on device 2. Based on which one you receive, you know which player it is.

SteveSmith | 2022-02-07 23:15