Gamepad_get_battery_type - hpgDesigns/hpgdesigns-dev.io GitHub Wiki
Description
Gets the type of the battery of the given gamepad device and returns the result.
Parameters
Parameter | Data Type | Description |
---|---|---|
device | integer | The gamepad index, must be 0 through 3, 0 being player 1. |
Return Values
integer: Returns gamepad constant corresponding to the type of its battery.
Example Call
// demonstrates checking if the player has a wireless controller
var charge;
charge = gamepad_get_battery_type(0);
if (charge = gp_wireless) {
show_message("You have a wireless controller, please make sure it is charged before you start.");
}
NOTOC