- Messages
- 10,158
- Country

Hey all,
This is for a XML parts code (ModelDef.xml) that would be a fuel selector, LBRAO (Left, Both, Right, Aux, Off).
The stock DC3 has two, which have A in the code, but it means 'All', not Aux.
Does anyone know how to code into the mix the AUX selection? This is the DC3 code;
This is the standard, stock XML for LBRO...
This is the core of the code above...
(M:Event) 'LeftSingle' scmp 0 ==
if{ (M:X) (>G:Var1) 2 0 1 3 1 5 (A:FUEL TANK SELECTOR:1, enum) ++ case (>G:Var2) }
els{ (M:X) (G:Var1) - 40 / int (G:Var2) + 0 max 3 min s0 2 0 1 3 1 5 (A:FUEL TANK SELECTOR:1, enum) ++ case !=
if{ l0 0 == if{ (>K:FUEL_SELECTOR_LEFT) } l0 1 == if{ (>K:FUEL_SELECTOR_ALL) } l0 2 == if{ (>K:FUEL_SELECTOR_RIGHT) } l0 3 == if{ (>K:FUEL_SELECTOR_OFF) } }
Could simply putting in a different set of codes take out 'all' and put in 'both' as well as adding AUX to the system?
Here, it is 2 0 1 3 1 5.
Many thanks for any help. Perhaps its already been covered in a post somewhere else. A link to it would be so much appreciated. I did some searches on this late last night with no joy.
Bill
LHC
This is for a XML parts code (ModelDef.xml) that would be a fuel selector, LBRAO (Left, Both, Right, Aux, Off).
The stock DC3 has two, which have A in the code, but it means 'All', not Aux.
Does anyone know how to code into the mix the AUX selection? This is the DC3 code;
Code:
<!-- RLAO2 = Right/Left/All/Off #1. They are different and used for DC3 -->
<PartInfo>
<Name>lever_fuel_selector_RLAO1</Name>
<AnimLength>75</AnimLength>
<Animation>
<Parameter>
<Code>3 3 3 1 2 2 0 7 (A:FUEL TANK SELECTOR:1, enum) case 25 *</Code>
<Lag>100</Lag>
</Parameter>
</Animation>
<MouseRect>
<Cursor>Hand</Cursor>
<HelpID>HELPID_GAUGE_FUEL_SELECTOR</HelpID>
<TooltipID>TOOLTIPTEXT_DC3_LEFT_FUEL_SELECTOR</TooltipID>
<MouseFlags>LeftSingle</MouseFlags>
<CallbackCode>
0 0 0 2 6 6 3 7 (A:FUEL TANK SELECTOR:1, enum) case (>K:FUEL_SELECTOR_SET)
</CallbackCode>
</MouseRect>
</PartInfo>
This is the standard, stock XML for LBRO...
Code:
<PartInfo>
<Name>switch_fuel_selector_LBRO</Name>
<AnimLength>75</AnimLength>
<Animation>
<Parameter>
<Code>2 0 1 3 1 5 (A:FUEL TANK SELECTOR:1, enum) ++ case 25 *</Code>
<Lag>100</Lag>
</Parameter>
</Animation>
<MouseRect>
<Cursor>Hand</Cursor>
<HelpID>HELPID_GAUGE_FUEL_SELECTOR</HelpID>
<TooltipID>TOOLTIPTEXT_FUEL_SELECTOR</TooltipID>
<MouseFlags>LeftSingle+LeftDrag+Wheel</MouseFlags>
<CallbackCode>(M:Event) 'LeftSingle' scmp 0 ==
if{ (M:X) (>G:Var1) 2 0 1 3 1 5 (A:FUEL TANK SELECTOR:1, enum) ++ case (>G:Var2) }
els{ (M:X) (G:Var1) - 40 / int (G:Var2) + 0 max 3 min s0 2 0 1 3 1 5 (A:FUEL TANK SELECTOR:1, enum) ++ case !=
if{ l0 0 == if{ (>K:FUEL_SELECTOR_LEFT) } l0 1 == if{ (>K:FUEL_SELECTOR_ALL) } l0 2 == if{ (>K:FUEL_SELECTOR_RIGHT) } l0 3 == if{ (>K:FUEL_SELECTOR_OFF) } }</CallbackCode>
</MouseRect>
</PartInfo>
This is the core of the code above...
(M:Event) 'LeftSingle' scmp 0 ==
if{ (M:X) (>G:Var1) 2 0 1 3 1 5 (A:FUEL TANK SELECTOR:1, enum) ++ case (>G:Var2) }
els{ (M:X) (G:Var1) - 40 / int (G:Var2) + 0 max 3 min s0 2 0 1 3 1 5 (A:FUEL TANK SELECTOR:1, enum) ++ case !=
if{ l0 0 == if{ (>K:FUEL_SELECTOR_LEFT) } l0 1 == if{ (>K:FUEL_SELECTOR_ALL) } l0 2 == if{ (>K:FUEL_SELECTOR_RIGHT) } l0 3 == if{ (>K:FUEL_SELECTOR_OFF) } }
Could simply putting in a different set of codes take out 'all' and put in 'both' as well as adding AUX to the system?
Here, it is 2 0 1 3 1 5.
Many thanks for any help. Perhaps its already been covered in a post somewhere else. A link to it would be so much appreciated. I did some searches on this late last night with no joy.
Bill
LHC

)

