LEDs
Each player LEDs can be set into one of four states: OFF, ON, FAST BLINK and SLOW BLINK. Letting you program visual indications for specific functions in your GPC script. NOTE: The XBox 360 controller does not support more than one LED lighted at the same time. If you try to light up more than one LED on a XBox 360 controller then the one with the highest index takes the precedence.
Related GPC Functions:
LED Identifiers:
1. get_led
Returns the value of a LED state.
Prototype:
int get_led ( <led_ident> )
Parameters:
<led_ident> : the identifier of a LED
Return:
0: LED OFF
1: LED ON
2: FAST BLINK
3: SLOW BLINK
Example:
2. set_led
Set the state of a LED.
Prototype:
set_led ( <led_ident>, <state> )
Parameters:
<led_ident> : the identifier of a LED
<state> : 0 to OFF; 1 to ON; 2 to FAST BLINK; 3 to SLOW BLINK
Return:
None
Example:
3. set_ledx
Blinks a LED a certain number of times.
Prototype:
set_ledx ( <led_ident>, <blinks> )
Parameters:
<led_ident> : the identifier of a LED
<blinks> : the number of blinks, can range from 0 to 255
Return:
None
Example:
4. get_ledx
Checks if a LED is being blinked by the set_ledx function.
Prototype:
int get_ledx ( )
Parameters:
None
Return:
TRUE if there are LEDs being blinked, FALSE otherwise
Example:
5. reset_leds
Reset the LEDs state to what was set by the console.
Prototype:
reset_leds ( )
Parameters:
None
Return:
None
Example:
|