LED Adjustable Wheel And Dpad Adjustable LEDs

When you push the right trigger down the LEDs light up in a speed adjustable wheel and also how fast they blink when you push the Dpad buttons is also adjustable. there with be a great feature added in the future.
VersionV0.75
Authorbfixer117
Publish DateSun, 2 Mar 2014 - 01:56
Last UpdateSun, 2 Mar 2014 - 01:56
Downloads63
RATE


1

0

Release Notes: -initial Release -Added Dpad adjustable speed button LEDs -Added LED Adjustable Speed Wheel
Code: Select all
//Simple Script Made By bfixer117
define RT = XB360_RT;
define Up = XB360_UP;
define Right = XB360_RIGHT;
define Down = XB360_DOWN;
define Left = XB360_LEFT;
//Easy User Changeable Traits
define WSpeed = 25; //The Speed For The Wheel
define WSpeedU = 25; //The Speed For Pushing Up
define WSpeedR = 25;//The Speed For Pushing Right
define WSpeedD = 25;//The Speed For Pushing Down
define WSpeedL = 25;//The Speed For Pushing Left
//The Main Code
main {
//turns of the LEDs
set_led(LED_1, 0);
set_led(LED_2, 0);
set_led(LED_3, 0);
set_led(LED_4, 0);
//Turns on the LEDs with a button press
if(event_press(XB360_UP)) set_led(LED_1, 1);
if(event_press(XB360_DOWN)) set_led(LED_4, 1);
if(event_press(XB360_LEFT)) set_led(LED_3, 1);
if(event_press(XB360_RIGHT)) set_led(LED_2, 1);
//When the Right Tigger is pressed The Wheel Combo runs
if(get_val(RT))
{
combo_run(Wheel);
    }
//when up on Dpad is pressed the combo UP runs
if(get_val(Up))
{
combo_run(UP);
    }
//when right on Dpad is pressed the combo RIGHT runs
if(get_val(Right))
{
combo_run(RIGHT);
    }
//when down on Dpad is pressed the combo DOWN runs
if(get_val(Down))
{
combo_run(DOWN);
    }
//when Left on Dpad is pressed the combo LEFT runs
if(get_val(Left))
{
combo_run(LEFT);
    }
}
 
combo Wheel
{
set_led(LED_1, 1);
wait(WSpeed);
set_led(LED_1, 0);
wait(WSpeed);
set_led(LED_2, 1);
wait(WSpeed);
set_led(LED_2, 0);
wait(WSpeed);
set_led(LED_4, 1);
wait(WSpeed);
set_led(LED_4, 0);
wait(WSpeed);
set_led(LED_3, 1);
wait(WSpeed);
set_led(LED_3, 0);
wait(WSpeed);
}
 
combo UP
{
set_led(LED_1, 1);
wait(WSpeedU);
set_led(LED_1, 0);
wait(WSpeedU);
}
 
combo RIGHT
{
set_led(LED_2, 1);
wait(WSpeedR);
set_led(LED_2, 0);
wait(WSpeedR);
}
 
combo DOWN
{
set_led(LED_4, 1);
wait(WSpeedD);
set_led(LED_4, 0);
wait(WSpeedD);
}
 
combo LEFT
{
set_led(LED_3, 1);
wait(WSpeedL);
set_led(LED_3, 0);
wait(WSpeedL);
}