ControllerTakeover

This script will change your Dualshock 4's LED bar, plus other features like rumbling. Read notes inside the script for details and instructions.
Version2.00
Authorrenfrozodiac
Publish DateSun, 1 Jun 2014 - 00:30
Last UpdateSun, 1 Jun 2014 - 01:44
Downloads85
RATE


0

0

Release Notes: Rumble feature added. See inside of script for details.
Code: Select all
/*ControllerTakeover
by renfrozodiac
PSN: jdreno
 
Contact: [email protected]
 
This script will change your Dualshock 4's LED bar, plus other features. To change the color,
hold the touchpad and press cross, circle, triangle, or square. The color of
the LED bar corresponds to the color of the button. For example, blue is cross,
red is circle, green is triangle, and purple is square.
****This script only works with the DS4 as it requires the touchpad.****
You can make this script work with any other controller, (though it'll
really only change the player LED, which doesn't make much sense) by changing
the values "PS4_TOUCH" to any other button (Ex. XB360_BACK)
 
--Version 1.1: ColorWheel added. Hold L1+L2+R1+R2 to quickly cycle through colors.
It will always land on purple, so you'll have to change it back.
This feature really isn't important, but the idea came to me so I added it for fun.
--Version 2.00: Rumble feature added. Hold L1+L3 for heavy rumble, R1+R3 for light rumble.
Hold all four buttons for a combination. You can hold L1+L3+R1+R3+L2+R2 for ColorWheel and rumble.*/

 
main {
 
    if(get_val(PS4_TOUCH) && get_val(PS4_CROSS)) combo_run(LED1);
    if(get_val(PS4_TOUCH) && get_val(PS4_CIRCLE)) combo_run(LED2);
    if(get_val(PS4_TOUCH) && get_val(PS4_TRIANGLE)) combo_run(LED3);
    if(get_val(PS4_TOUCH) && get_val(PS4_SQUARE)) combo_run(LED4);
    if(get_val(PS4_L1) && get_val(PS4_L2) && get_val(PS4_R1) && get_val(PS4_R2)) combo_run(ColorWheel);
    if(get_val(PS4_L1) && get_val(PS4_L3)) combo_run(RumbleA);
    else combo_run(NoRumbleA);
    if (get_val(PS4_R1) && get_val(PS4_R3)) combo_run(RumbleB);
    else combo_run(NoRumbleB);
}
    combo LED1 {
    set_led(LED_1, 1);
    set_led(LED_2, 0);
    set_led(LED_3, 0);
    set_led(LED_4, 0);
}
    combo LED2 {
    set_led(LED_1, 0);
    set_led(LED_2, 1);
    set_led(LED_3, 0);
    set_led(LED_4, 0);
}
    combo LED3 {
    set_led(LED_1, 0);
    set_led(LED_2, 0);
    set_led(LED_3, 1);
    set_led(LED_4, 0);
}
    combo LED4 {
    set_led(LED_1, 0);
    set_led(LED_2, 0);
    set_led(LED_3, 0);
    set_led(LED_4, 1);
}
    combo ColorWheel {
    set_led(LED_1, 1);
    set_led(LED_2, 0);
    set_led(LED_3, 0);
    set_led(LED_4, 0);
    wait (80);
    set_led(LED_1, 0);
    set_led(LED_2, 1);
    set_led(LED_3, 0);
    set_led(LED_4, 0);
    wait (80);
    set_led(LED_1, 0);
    set_led(LED_2, 0);
    set_led(LED_3, 1);
    set_led(LED_4, 0);
    wait (80);
    set_led(LED_1, 0);
    set_led(LED_2, 0);
    set_led(LED_3, 0);
    set_led(LED_4, 1);
    wait (80);
}
    combo RumbleA {
    set_rumble(RUMBLE_A, 100);
}
    combo NoRumbleA {
    set_rumble(RUMBLE_A, 0);
}
    combo RumbleB {
    set_rumble(RUMBLE_B, 100);
}
    combo NoRumbleB {
    set_rumble(RUMBLE_B, 0);
}