gamepad_set_colour

Set the LED colour for PS4 gamepads.

Syntax:

gamepad_set_colour(device, colour);


Argument Description
device Which gamepad device "slot" to set.
colour The colour to use.


Returns: N/A


Description

This function can be used to set the colour of the LEDs within a PlayStation controller. You specify the device slot to set, and then give a colour, which can be any of the colour constants or a colour value created using the specific colour functions or a HEX value(like $FFFFFFF).


Example:

if health < 10
   {
   gamepad_set_colour(0, c_red);
   }

The above code will set the PlayStation controller LEDs to red if the health variable falls below 10.


Back: GamePad Input
Next: gamepad_is_supported
© Copyright YoYo Games Ltd. 2018 All Rights Reserved