On other platforms, pads may be detected on any slot that the OS has assigned it, which could slot 3 or slot 20 or more. However you can also check slots 4 - 11 inclusive for DirectInput gamepads, which means you can detect many other models of controller when connected through these slots. On the Windows target, slots 0 - 3 inclusive are only for Xinput gamepads, ie: Xbox360 controllers and compatibles. The gamepad "slots" are indexed from 0 upwards, and the actual slot that a gamepad assigned will depend on a variety of factors, not least of which is the OS that the project is running on. Note that when a gamepad is plugged in to your device (or it is removed) then an asynchronous System Event is triggered where you can deal with the situation using the appropriate functions. These functions work similar to the Device Inputs, in that you can detect up to four different XInput game pads that are connected (and up to 8 DirectInput gamepads) and deal with the input from each one using the same functions. GameMaker has a number of dedicated functions that can be used to detect both analog and digital controls from multiple connected gamepads.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |