n4gix
Resource contributor
- Messages
- 11,674
- Country
...or, how to spend the entire day in utter frustration...
1. Engine Start Sequence
FWIW, after five hours of head-banging, I finally got the bloody "air starter" working in the T-38A. Have I ever mentioned just how annoying -not to mention FUBARed- FS's starter system is?
There is only one TOGGLE_STARTERn command, click once and the starter engages, and won't disengage automatically after engine start.
It's especially a PITA when one only presses the starter button momentarialy, because it's difficult to stop the starter that way.
Anyway, I remembered having written code in C++ for just this type of system, I had to "translate" it into XML ass-backwards syntax...
Here then is the XML Kung-Fu necessary:
1. Engine Start Sequence
FWIW, after five hours of head-banging, I finally got the bloody "air starter" working in the T-38A. Have I ever mentioned just how annoying -not to mention FUBARed- FS's starter system is?
There is only one TOGGLE_STARTERn command, click once and the starter engages, and won't disengage automatically after engine start.
It's especially a PITA when one only presses the starter button momentarialy, because it's difficult to stop the starter that way.
Anyway, I remembered having written code in C++ for just this type of system, I had to "translate" it into XML ass-backwards syntax...
Here then is the XML Kung-Fu necessary:
Code:
[COLOR="Red"]<!-- ENGINE STARTER SYSTEM LOGIC -->[/COLOR]
<Update>
[COLOR="red"]<!-- LEFT ENGINE -->[/COLOR]
(A:TURB ENG CORRECTED N2:1,percent) 23 <
(L:StarterLeft,bool) 1 == and
(L:StartLeftLatch,bool) 0 == and
(A:ELECTRICAL MASTER BATTERY,bool) 1 == and
if{ (>K:TOGGLE_STARTER1) 1 (>L:StartLeftLatch,bool) }
els{
(A:TURB ENG CORRECTED N2:1,percent) 23 >
(L:StartLeftLatch,bool) 1 == and
if{ (>K:TOGGLE_STARTER1) 0 (>L:StarterLeft,bool) 0 (>L:StartLeftLatch,bool) }
(L:StarterLeft,bool) 0 ==
(A:GENERAL ENG STARTER ACTIVE:1,bool) and
if{ (>K:TOGGLE_STARTER1) 0 (>L:StartLeftLatch,bool) }
[COLOR="Red"]<!-- RIGHT ENGINE -->[/COLOR]
(A:TURB ENG CORRECTED N2:2,percent) 23 <
(L:StarterRight,bool) 1 == and
(L:StartRightLatch,bool) 0 == and
(A:ELECTRICAL MASTER BATTERY,bool) 1 == and
if{ (>K:TOGGLE_STARTER2) 1 (>L:StartRightLatch,bool) }
els{
(A:TURB ENG CORRECTED N2:2,percent) 23 >
(L:StartRightLatch,bool) 1 == and
if{ (>K:TOGGLE_STARTER1) 0 (>L:StarterRight,bool) 0 (>L:StartRightLatch,bool) }
(L:StarterRight,bool) 0 ==
(A:GENERAL ENG STARTER ACTIVE:2,bool) and
if{ (>K:TOGGLE_STARTER2) 0 (>L:StartRightLatch,bool) }
</Update>
[COLOR="red"]<!-- END ENGINE STARTER SYSTEM LOGIC -->
<!-- LEFT STARTER BUTTON -->[/COLOR]
<PartInfo>
<Name>T38_switch_starter_left</Name>
<AnimLength>50</AnimLength>
<Animation>
<Parameter>
<Code>(L:StarterLeft_reset) (P:local time, seconds) > if{ 50 } els{ 0 }</Code>
<Lag>400</Lag>
</Parameter>
</Animation>
<MouseRect>
<Cursor>Hand</Cursor>
<HelpID>HELPID_GAUGE_STARTER_SWITCH</HelpID>
<TooltipID>TOOLTIPTEXT_STARTER_SWITCH</TooltipID>
<CallbackCode>
1 (>L:StarterLeft,bool)
(P:local time, seconds) 0.5 + (>L:StarterLeft_reset)
</CallbackCode>
</MouseRect>
</PartInfo>
[COLOR="red"]<!-- RIGHT STARTER BUTTON -->[/COLOR]
<PartInfo>
<Name>T38_switch_starter_right</Name>
<AnimLength>50</AnimLength>
<Animation>
<Parameter>
<Code>(L:StarterRight_reset) (P:local time, seconds) > if{ 50 } els{ 0 }</Code>
<Lag>400</Lag>
</Parameter>
</Animation>
<MouseRect>
<Cursor>Hand</Cursor>
<HelpID>HELPID_GAUGE_STARTER_SWITCH</HelpID>
<TooltipID>TOOLTIPTEXT_STARTER_SWITCH</TooltipID>
<CallbackCode>
1 (>L:StarterRight,bool)
(P:local time, seconds) 0.5 + (>L:StarterRight_reset)
</CallbackCode>
</MouseRect>
</PartInfo>
Last edited: