Strike Suit Zero Helper [AV8R EDITION]

This script aims to make your controller last longer and automate a few things that you do often such as enabling thrusters and Suit Dash. This is remapped for the Saitek AV8R Flightstick in mode 1. A - Guns B - Bombs Y - Target closest X - Transform RT - >50% is boost RT - <50% is brake A+B - EMP | Suit Dash Big Stick - Pitch control Small stick - Yaw Swapped LS <-> RS as it was near impossible to fly with that tiny stick. The small thumbstick is used to maneuver menus and X is used to make selections. When RT (forward) is held full on for a second or more, thrusters automatically activate. Hitting X (which transforms your craft) will block LB|LT|Y for 30 seconds or until hit again. This prevents your suit from flying out of control. When you activate the Suit Dash (A+B) in Strike mode the Strike Suit will quickly dash left then right.
Version1
AuthorSitava
Publish DateTue, 12 Aug 2014 - 13:14
Last UpdateTue, 12 Aug 2014 - 13:14
Downloads96
RATE


4

0

Code: Select all
/* Strike Suit Zero (Xbox One) Helper [AV8R Edition]
 
This script aims to make your controller last longer and automate a few things that you do often such as enabling thrusters and Suit Dash.
 
This is remapped for the Saitek AV8R Flightstick in mode 1.
A  -  Guns
B  -  Bombs
Y  -  Target closest
X  -  Transform
RT  - >50% is boost
RT  - <50% is brake
A+B - EMP | Suit Dash
Big Stick - Pitch control
Small stick - Yaw
Swapped LS <-> RS as it was near impossible to fly with that tiny stick.
 
The small thumbstick is used to manuver menus and X is used to make selections.
 
When RT (forward) is held full on for a second or more, thrusters automatically activate.
 
Hitting X (which transforms your craft) will block LB|LT|Y for 30 seconds or until hit again.
This prevents your suit from flying out of control. When you activate the Suit Dash
(A+B) in Strike mode the Strike Suit will quickly dash left then right.
 
*/

 
remap XB1_LX -> XB1_RX;
remap XB1_LY -> XB1_RY;
remap XB1_RX -> XB1_LX;
remap XB1_RY -> XB1_LY;
remap XB1_Y -> XB1_B;
remap XB1_RT -> XB1_LT;
remap XB1_B -> XB1_RB;
remap XB1_A -> XB1_RT;
remap XB1_X -> XB1_A;
remap XB1_LS -> XB1_Y;
unmap XB1_X;
unmap XB1_LS;
 
int Joy;
int Strike;
int time=30000;
 
main            {
    if (event_press(XB1_DOWN)) {Joy= !Joy;} // Remaps and throttle changes screw with menus and dashboard.
    if (Joy) {combo_run(AV8R);}
    if (!Joy) {combo_stop(AV8R);}
 
    if (event_press(XB1_X)) {Strike= !Strike;} // LT|LB Function differently between each mode. LED 1 blinks to show script is on
    if (Strike) {combo_run(Suit); set_led(LED_1, 2);}
    if (!Strike) {combo_stop(Suit); reset_leds ();}
}
 
combo AV8R      { // This works the throttle so front half is forward and back half is brake.
    if (get_val(XB1_RT) <50) {set_val(XB1_RT, 0);set_val(XB1_LB, 100);}
    if (get_val(XB1_RT) >=50) {set_val(XB1_RT, (get_val(XB1_RT)-50)*2);}
    if (get_val(XB1_B) && get_val(XB1_A)) {set_val(XB1_LS, 100);} // A+B (Guns& Bombs) will activate EMP
    if (get_val(XB1_RT) > 80 && get_ptime(XB1_RT) >= 1000) {set_val(XB1_RS, 100);} // If forward for 1 second, enable thrusters (RS)
}
 
combo DashON    {   // Dash left - pause - dash right
    wait (100);
    set_val(XB1_LEFT, 100);
    wait (100);
    set_val(XB1_LEFT, 0);
    wait (60);
    set_val(XB1_LEFT, 100);
    wait (100);
    set_val(XB1_LEFT, 0);
    wait (1000);
    set_val(XB1_RIGHT, 100);
    wait (100);
    set_val(XB1_RIGHT, 0);
    wait (60);
    set_val(XB1_RIGHT, 100);
    wait (100);
    set_val(XB1_RIGHT, 0);
    wait (1000);
}
 
combo Suit    {     // Strike mode (toggle with X)
    combo_stop(AV8R); // The settings for the throttle were messing with Strike Mode. This disables the throttle changes while Strike mode is on.
    if (get_val(XB1_B) && get_val(XB1_A)) {combo_run(DashON);} // A+B (Guns & Bombs) will activate Dash
    set_val(XB1_RT, 0); set_val(XB1_LB, 0); set_val(XB1_LS, 0); // Block LT|LB|Y while in Strike Mode
    wait (time); // wait 30 seconds or until you click X to re-enter Flight Mode.
    reset_leds ();
    combo_run(AV8R); // Re-run throttle and EMP changes.
}