// Blink Switch Filter (LS/L3 linked to BLINK - INVERTED open to select - no blink filter)
//
//
// www.SpecialEffect.org.uk
// Original thread working on this script at: http://www.consoletuner.com/forum/viewtopic.php?f=6&t=1795
// Many thanks to Jefferson Kopee and UK_Wildcats_Fans for assistance in building this script.
define BLINK = XB360_LS;
define LED = 500; // Length of time for LED to be on.
int filter = 500; // Deliberate Blink time
int pulse_time = 500; // Time that "A" is pulsed.
int wait_time = 4000; // Time to wait before checking for a blink again.
int run_combo_once = FALSE;
main {
if(get_val(XB360_XBOX) && get_ptime(XB360_XBOX) >= 100) {
load_slot(4); // change the number to the slot number you want load. // PRESS XBOX TO CHANGE MODE
}
if(event_press(BLINK)) { // If any input is detected, flash LED 1.
run_combo_once = TRUE;
set_ledx(LED_1, 1);set_rumble(RUMBLE_A, 0);
combo_stop(Blink_Accepted);
}
if(run_combo_once && get_val(BLINK) && get_ptime(BLINK) > filter) { // Check for a deliberate blink
combo_run(Blink_Accepted);
}
// Suppressing A.
set_val(BLINK, 0);
}
combo Blink_Accepted // Routine for pulsing the "A" button, flashing LED 2, rumbling motor gently and pausing before checking for input again.
{
set_val(XB360_A, 100);
set_ledx(LED_2, 6);
set_rumble(RUMBLE_A, 20);
wait(LED);
wait(pulse_time);
set_val(XB360_A, 0);
set_rumble(RUMBLE_A, 0);
wait(wait_time);
run_combo_once = FALSE;
}