- Messages
- 468
- Country

I have a working fuel cock in my wingtip model that was covered towards the end of this thread:
http://www.fsdeveloper.com/forum/showthread.php?t=20116&page=2
I am now trying to adapt that code so that I can use the same switch in my tip tank version but something is wrong with the XML code and I can't seem to fix it. If anyone can point me in the right direction I would really appreciate it.
This is the working code that operates as OFF-MAINS-AUX:
I now need it to operate as OFF-MAINS-TIPS. I have tried this:
and I have tried this:
In both the above cases the engine dies whenever the TIPS position is selected on the fuel cock. I have the tip tanks set up correctly in the aircraft.cfg file and the correct volume shows on the tip tank fuel gauges so I can only think it's an XML code issue for the fuel cock but I can't see what.
Can anyone see where I goofed up?
http://www.fsdeveloper.com/forum/showthread.php?t=20116&page=2
I am now trying to adapt that code so that I can use the same switch in my tip tank version but something is wrong with the XML code and I can't seem to fix it. If anyone can point me in the right direction I would really appreciate it.
This is the working code that operates as OFF-MAINS-AUX:
Code:
<PartInfo>
<Name>XYZ_fuel_selector</Name>
<!-- OFF - MAIN - AUX -->
<AnimLength>100</AnimLength>
<Animation>
<Parameter>
<Code>
50 (L:fuelKnob, enum) 50 * +
</Code>
<Lag>300</Lag>
</Parameter>
</Animation>
<MouseRect>
<Cursor>Hand</Cursor>
<TooltipID>TOOLTIPTEXT_FUEL_SELECTOR</TooltipID>
<MouseFlags>LeftSingle+RightSingle+Wheel</MouseFlags>
<CallbackCode>
(M:Event) 'RightSingle' scmp 0 ==
if{ (L:fuelKnob, enum) ++ 1 min (>L:fuelKnob, enum) }
(M:Event) 'LeftSingle' scmp 0 ==
if{ (L:fuelKnob, enum) -- -1 max (>L:fuelKnob, enum) }
(L:fuelKnob,enum) -1 == if{ 0 (>K:FUEL_SELECTOR_SET) } (* off *)
(L:fuelKnob,enum) 0 == if{ 16 (>K:FUEL_SELECTOR_SET) } (* both *)
(L:fuelKnob,enum) 1 == if{ 6 (>K:FUEL_SELECTOR_SET) } (* aux *)
</CallbackCode>
</MouseRect>
</PartInfo>
I now need it to operate as OFF-MAINS-TIPS. I have tried this:
<CallbackCode>
(M:Event) 'RightSingle' scmp 0 ==
if{ (L:fuelKnob, enum) ++ 1 min (>L:fuelKnob, enum) }
(M:Event) 'LeftSingle' scmp 0 ==
if{ (L:fuelKnob, enum) -- -1 max (>L:fuelKnob, enum) }
(L:fuelKnob,enum) -1 == if{ 0 (>K:FUEL_SELECTOR_SET) } (* off *)
(L:fuelKnob,enum) 0 == if{ 16 (>K:FUEL_SELECTOR_SET) } (* both *)
(L:fuelKnob,enum) 1 == if{ 11 and 12 (>K:FUEL_SELECTOR_SET) } (* both tips *)
</CallbackCode>
and I have tried this:
Code:
<CallbackCode>
(M:Event) 'RightSingle' scmp 0 ==
if{ (L:fuelKnob, enum) ++ 1 min (>L:fuelKnob, enum) }
(M:Event) 'LeftSingle' scmp 0 ==
if{ (L:fuelKnob, enum) -- -1 max (>L:fuelKnob, enum) }
(L:fuelKnob,enum) -1 == if{ 0 (>K:FUEL_SELECTOR_SET) } (* off *)
(L:fuelKnob,enum) 0 == if{ 16 (>K:FUEL_SELECTOR_SET) } (* both *)
(L:fuelKnob,enum) 1 == if{ 11 (>K:FUEL_SELECTOR_SET) } and (* right tip *)
(L:fuelKnob,enum) 1 == if{ 12 (>K:FUEL_SELECTOR_SET) } (* left tip *)
</CallbackCode>
In both the above cases the engine dies whenever the TIPS position is selected on the fuel cock. I have the tip tanks set up correctly in the aircraft.cfg file and the correct volume shows on the tip tank fuel gauges so I can only think it's an XML code issue for the fuel cock but I can't see what.
Can anyone see where I goofed up?
