Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
1

Multiple Game Input Controllers

Community Beginner ,
Sep 27, 2015 Sep 27, 2015

I've been trying to get multiple game controllers to work in my game.

It works great when only one game controller is used.  However when trying to use multiple controllers, a single control will trigger for every controller, essentially allowing one person to play as every player.

Calling device.getControlAt(0) will say that the control is triggered for every device.  Checking control.device will return the correct device, but the value will be changed for every control.  The only help I can seem to find is here:

To identify individual devices:

  1. Add event listeners to every control on all undetected input devices. These listeners listen for Event.CHANGE events, which are dispatched whenever a control value changes.
  2. The first time a control is activated (for example a button press or trigger pull), the application labels that device.
  3. Remove all of the event listeners from the remaining undetected input devices.

Repeat steps 1-3, as required, to identify the remaining undetected input devices.

This doesn't make any sense to me.  The devices are detected, all the controls just seem to be linked.  Any help is much appreciated.

TOPICS
ActionScript
169
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation