Legacy GM How To Detect If Controller Is Present?

J

JeZxLee

Guest
Hi,

Little confused...
How can we detect if one or more controller(s) is/are present?

The following code ran once on game start returns "0" when 2 USB controllers ARE plugged in on Win 10?
Code:
global.NumberOfGamepads = 0;
for (var index = 0; index < gamepad_get_device_count(); index++)
{
    if ( gamepad_is_connected(index) )  global.NumberOfGamepads++;
}
Any help would be appreciated, thanks!
 
J

JeZxLee

Guest
Hi,

Thanks for the info, but is there a method to do this in script code?
We are preparing for an XBox One release at the end of the year.
Thanks!
 
Top