//Elite Dangerous Saitek X52 HOTAS on XBOX One GPC script //v1.1 //Purpose: Enable additional buttons on X52 HOTAS to perform commands that require combination of button presses on XBOX One controller //Prequisites: Lots of remapping of XBOX One controller buttons in Elite Dangerous (eg Left Analogue Stick to Throttle, //L&R bumper and trigger buttons to thrusters and analogue stick clicks to primary and secondary fire //Approach: Used Cronusmax Max Combo to record button combos on Xbox One controller and mapped these to CEMU_EXTRA buttons //Caveats: Getting power dropouts resulting in loss of calibration. Problem with the ChronosMax I think //To Do: Not happy with the headlook solution. Can't control flight and look at the same time due to lack of axis on Xbox One controller //1. Headlook Toggle main { if(event_press(CEMU_EXTRA6)) { combo_run(Headlook); } } combo Headlook { set_val(XB1_B, 100); wait(200); set_val(XB1_RB, 100); set_val(XB1_B, 100); wait(200); set_val(XB1_RB, 0); set_val(XB1_B, 100); wait(200); set_val(XB1_B, 0); set_val(XB1_LX, 0); set_val(XB1_RY, 0); set_val(XB1_RX, 0); } //2. Flight Assist Toggle main { if(event_press(CEMU_EXTRA7)) { combo_run(Flight_Assist); } } combo Flight_Assist { set_val(XB1_A, 100); wait(200); set_val(XB1_RB, 100); set_val(XB1_A, 100); wait(200); set_val(XB1_RB, 0); set_val(XB1_A, 100); wait(100); set_val(XB1_A, 0); set_val(XB1_LX, 0); set_val(XB1_RY, 0); set_val(XB1_RX, 0); } //3. Landing gear main { if(event_press(CEMU_EXTRA5)) { combo_run(Landing_gear); } } combo Landing_gear { set_val(XB1_B, 100); wait(300); set_val(XB1_DOWN, 100); set_val(XB1_B, 100); wait(200); set_val(XB1_DOWN, 0); set_val(XB1_B, 100); wait(100); set_val(XB1_B, 0); } //4. Cargo hatch main { if(event_press(CEMU_EXTRA8)) { combo_run(Cargo_hatch); } } combo Cargo_hatch { set_val(XB1_B, 100); wait(300); set_val(XB1_UP, 100); set_val(XB1_B, 100); wait(200); set_val(XB1_UP, 0); set_val(XB1_B, 100); wait(100); set_val(XB1_B, 0); } //5. Slient Running main { if(event_press(CEMU_EXTRA4)) { combo_run(Silent_running); } } combo Silent_running { set_val(XB1_A, 100); wait(700); set_val(XB1_LB, 100); set_val(XB1_A, 100); wait(200); set_val(XB1_LB, 0); set_val(XB1_A, 100); wait(300); set_val(XB1_A, 0); } //6. Next weapon main { if(event_press(CEMU_EXTRA9)) { combo_run(Next_weapon); } } combo Next_weapon { set_val(XB1_X, 100); wait(700); set_val(XB1_LB, 100); set_val(XB1_X, 100); wait(300); set_val(XB1_LB, 0); set_val(XB1_X, 100); wait(200); set_val(XB1_X, 0); } //7. Previous weapon main { if(event_press(CEMU_EXTRA3)) { combo_run(Prev_weapon); } } combo Prev_weapon { set_val(XB1_X, 100); wait(700); set_val(XB1_RB, 100); set_val(XB1_X, 100); wait(300); set_val(XB1_RB, 0); set_val(XB1_X, 100); wait(200); set_val(XB1_X, 0); } //8. Next Target main { if(event_press(CEMU_EXTRA1)) { combo_run(Next_target); } } combo Next_target { set_val(XB1_A, 100); wait(700); set_val(XB1_LEFT, 100); set_val(XB1_A, 100); wait(200); set_val(XB1_LEFT, 0); set_val(XB1_A, 100); wait(300); set_val(XB1_A, 0); } //9. Previous Target main { if(event_press(CEMU_EXTRA2)) { combo_run(Previous_target); } } combo Previous_target { set_val(XB1_A, 100); wait(700); set_val(XB1_DOWN, 100); set_val(XB1_A, 100); wait(200); set_val(XB1_DOWN, 0); set_val(XB1_A, 100); wait(300); set_val(XB1_A, 0); }