Old question, still not answered sufficiently.
I have a gaming station that has a steering wheel controller, flight stick (hotas), light gun, and xbox 360 controller connected to it. I have written games for each of those, and a menu to select which game to play. But I need to ensure the input for the right controller is used with the right game, and no other input is accepted. For example, you can't use the steering wheel or light gun to fly the helicopter, and you can't use the hotas or light gun to steer the car.
I was going to make a separate input for each controller, but the problem there is, I don't know which controller will be which number each time. Basically, I can't set up an Axis called "Steering Wheel Accelerator" = Joystick3.Axis1, because the next time I play the game, the Steering Wheel could be Joystick0 or Joystick1.
So, simple question, how can I tell which controller the input came from? Or, how can I ignore input from all but one controller? Or, how can I be sure that a specific controller is always JoystickN?
(Hint: this would all be so simple if, instead of Joystick# we could feed GetAxis(JoystickName). Seems like a simple fix.)
↧