snomhf
30th March 2009, 03:46 AM
This script illustrates how to do a bunch of things (macro) with a single button press in a critically timed sequence.
In Aces High, we do a lot of JABO (dive bombing) missions using the P-51D. The load-out we use consists of six rockets and two 1,000 lb bombs. That ordinance is sufficient to destroy an aircraft or vehicle hangar in a single pass. The process we use works like this:
1. Set ordinance salvo to 2 (causes two rockets or two bombs to release with a single press of the secondary weapon command 'b key'). This step is not included in the macro and is assumed to be set prior.
2. Set secondary weapon to rockets ('Backspace' key). This step is not included in the macro and is assumed to be set prior.
3. Fire off three salvos of rockets (6 rockets) with a timing of "one-one thousand" between each salvo. This is actually the first step of the macro.
4. Set secondary weapon to bombs ('Backspace' key twice).
5. Immediately salvo the two bombs (single press of secondary weapon)
6. Return the secondary weapon to guns ('Backspace' key) in preparation for dogfighting.
This script will execute this macro when the "side trigger" (B3) on the FighterStick and the "pinky button" (B4) of the Pro Throttle are pressed at the same time:
%DEFINE FS_SideTrig JS1.B3 // Assumes FighterStick is controller 1
%DEFINE PT_PinkyFngr JS2.B4 // Assumes Pro Throttle is controller 2
%DEFINE SecFire CMS.B1 // Weapon_Fire_Secondary (use: "NULL b")
%DEFINE SecSelect CMS.B2 // Weapon_Select_Secondary (use: "BKSPC")
script
// JABO Salvo (Assumes ".salvo 2" and secondary weapon set to rockets)
SEQUENCE
WAIT (PT_PinkyFngr AND FS_SideTrig);
// Salvo three rocket pairs
SecFire = TRUE; // Press the "Secondary Weapon" button
DELAY(1);
SecFire = FALSE; // Release the "Secondary Weapon" button
DELAY(10); // Delay about "one-one thousand" count
// Repeat two more times to fire the other two rocket pairs
SecFire = TRUE;
DELAY(1);
SecFire = FALSE;
DELAY(10);
SecFire = TRUE;
DELAY(1);
SecFire = FALSE;
DELAY(4); // Delay just long enough to allow switch to bombs
// Select Bombs
SecSelect = TRUE; // Press "Secondary Weapons Select" button
DELAY(1);
SecSelect = FALSE; // Release "Secondary Weapons Select" button
DELAY(4);
// Press and release "Secondary Weapons Select" button again to get to bombs
SecSelect = TRUE;
DELAY(1);
SecSelect = FALSE;
DELAY(4);
// Release one pair of bombs
SecFire = TRUE;
DELAY(1);
SecFire = FALSE;
DELAY(10);
// Select Guns
SecSelect = TRUE;
DELAY(1);
SecSelect = FALSE;
ENDSEQUENCE
endscript
In Aces High, we do a lot of JABO (dive bombing) missions using the P-51D. The load-out we use consists of six rockets and two 1,000 lb bombs. That ordinance is sufficient to destroy an aircraft or vehicle hangar in a single pass. The process we use works like this:
1. Set ordinance salvo to 2 (causes two rockets or two bombs to release with a single press of the secondary weapon command 'b key'). This step is not included in the macro and is assumed to be set prior.
2. Set secondary weapon to rockets ('Backspace' key). This step is not included in the macro and is assumed to be set prior.
3. Fire off three salvos of rockets (6 rockets) with a timing of "one-one thousand" between each salvo. This is actually the first step of the macro.
4. Set secondary weapon to bombs ('Backspace' key twice).
5. Immediately salvo the two bombs (single press of secondary weapon)
6. Return the secondary weapon to guns ('Backspace' key) in preparation for dogfighting.
This script will execute this macro when the "side trigger" (B3) on the FighterStick and the "pinky button" (B4) of the Pro Throttle are pressed at the same time:
%DEFINE FS_SideTrig JS1.B3 // Assumes FighterStick is controller 1
%DEFINE PT_PinkyFngr JS2.B4 // Assumes Pro Throttle is controller 2
%DEFINE SecFire CMS.B1 // Weapon_Fire_Secondary (use: "NULL b")
%DEFINE SecSelect CMS.B2 // Weapon_Select_Secondary (use: "BKSPC")
script
// JABO Salvo (Assumes ".salvo 2" and secondary weapon set to rockets)
SEQUENCE
WAIT (PT_PinkyFngr AND FS_SideTrig);
// Salvo three rocket pairs
SecFire = TRUE; // Press the "Secondary Weapon" button
DELAY(1);
SecFire = FALSE; // Release the "Secondary Weapon" button
DELAY(10); // Delay about "one-one thousand" count
// Repeat two more times to fire the other two rocket pairs
SecFire = TRUE;
DELAY(1);
SecFire = FALSE;
DELAY(10);
SecFire = TRUE;
DELAY(1);
SecFire = FALSE;
DELAY(4); // Delay just long enough to allow switch to bombs
// Select Bombs
SecSelect = TRUE; // Press "Secondary Weapons Select" button
DELAY(1);
SecSelect = FALSE; // Release "Secondary Weapons Select" button
DELAY(4);
// Press and release "Secondary Weapons Select" button again to get to bombs
SecSelect = TRUE;
DELAY(1);
SecSelect = FALSE;
DELAY(4);
// Release one pair of bombs
SecFire = TRUE;
DELAY(1);
SecFire = FALSE;
DELAY(10);
// Select Guns
SecSelect = TRUE;
DELAY(1);
SecSelect = FALSE;
ENDSEQUENCE
endscript