Accessibility: Invert Button Function

This script takes LS/L3 input and inverts it, outputting as the A/CROSS button. This can be adapted so that a person rests their finger down on a button, and nothing happens, but when they lift their finger it will activate the control (push-to-break instead of the normal push-to-make a circuit). This was originally designed to invert the function of a blink switch. The user could have their eyes-shut and nothing happens, but when they open them, they make a selection. For more on accessible gaming, see SpecialEffect at www.SpecialEffect.org.uk.
Version1.00
AuthorSpecialEffect
Publish DateSat, 4 Jul 2015 - 10:30
Last UpdateSat, 4 Jul 2015 - 10:30
Downloads54
RATE


0

0

Code: Select all
// Blink Switch Filter (LS/L3 linked to BLINK - INVERTED open to select - no blink filter)
//
//
// www.SpecialEffect.org.uk
//
// Many thanks to Jefferson Kopee and all others at the ConsoleTuner.com forums who have assisted in the development of these scripts.
 
 
 
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 "B" is pulsed.
int wait_time=4000; // Time to wait before checking for a blink again.
int y = 0;
 
 
main
{
    if(get_val(XB360_XBOX) && get_ptime(XB360_XBOX) >= 100) {
        load_slot(2); // change the number to the slot number you want load. // PRESS XBOX TO CHANGE MODE
        }
 
y = get_val(BLINK); // Check for a deliberate blink
          if (  y<1 )
    {
        set_val(XB360_A, 100);set_val(XB360_LS, 0);
    }
          set_ledx(LED_2,1);
 
set_val(XB360_LS, 0);
 
}