Guys,
I'm hoping someone can help me out with this bit of code. Fisrt of all, the aircraft I'm working on is the F82E Twin Mustang that had a unique fuel tank set up, basicly a pump for each tank (2 per engine) and a fuel valve for each engine that were all controlled by electric switches. The current code that I have now allows each tank to be activated seperately and works great, but the problem is when I select both tanks for engine 1 FSX defaults to FUEL_SELECTOR_LEFT (using Doug Dawson's event logger). What I need to happen is when both switches are activated is FSX to show FUEL_SELECTOR_ALL for each engine since this was the way that the aircraft was set up.
Here is my code...
I have this tagged as a visibility part only for preloading with no animantion or mouse rect attached. Using gmax with FSXA. Any suggestions? This has me stumped!
Thanks,
Mark
I'm hoping someone can help me out with this bit of code. Fisrt of all, the aircraft I'm working on is the F82E Twin Mustang that had a unique fuel tank set up, basicly a pump for each tank (2 per engine) and a fuel valve for each engine that were all controlled by electric switches. The current code that I have now allows each tank to be activated seperately and works great, but the problem is when I select both tanks for engine 1 FSX defaults to FUEL_SELECTOR_LEFT (using Doug Dawson's event logger). What I need to happen is when both switches are activated is FSX to show FUEL_SELECTOR_ALL for each engine since this was the way that the aircraft was set up.
Here is my code...
Code:
<!-- Fuel Tank Logic -->
<PartInfo>
<Name>F82_Fuel_Initializer</Name>
<Visibility>
<Parameter>
<Code>
(L:F82_init, bool) 0 ==
if{
0 (>K:FUEL_SELECTOR_SET) 0 (>K:FUEL_SELECTOR_2_SET) AND
1 (>L:F82_INIT, BOOL)
}
<!-- Engine 1 Fuel tank selectors -->
(L:LeftOutbd, number) 0 ==
(L:LeftInbd, number) 0 ==
and if{ (>K:FUEL_SELECTOR_OFF) }
(L:LeftOutbd, number) 1 ==
(L:LeftInbd, number) 0 ==
and if{ (>K:FUEL_SELECTOR_LEFT) }
(L:LeftOutbd, number) 0 ==
(L:LeftInbd, number) 1 ==
and if{ (>K:FUEL_SELECTOR_LEFT_AUX) }
(L:LeftOutbd, number) 1 ==
(L:LeftInbd, number) 1 ==
and if{ (>K:FUEL_SELECTOR_ALL) }
<!-- Engine 2 Fuel tank selectors -->
(L:RightOutbd, number) 0 ==
(L:RightInbd, number) 0 ==
and if{ (>K:FUEL_SELECTOR_2_OFF) }
(L:RightOutbd, number) 1 ==
(L:Rightnbd, number) 0 ==
and if{ (>K:FUEL_SELECTOR_2_RIGHT) }
(L:RightOutbd, number) 0 ==
(L:RightInbd, number) 1 ==
and if{ (>K:FUEL_SELECTOR_2_RIGHT_AUX) }
(L:RightOutbd, number) 1 ==
(L:RightInbd, number) 1 ==
and if{ (>K:FUEL_SELECTOR_2_ALL) }
</Code>
</Parameter>
</Visibility>
</PartInfo>
Thanks,
Mark

