- Messages
- 10,163
- Country

Hey all,
This is a working ModelDef for a 6 position selector. This one is for selecting fuel tanks. This has sound file inserts, but you will need a sound system for working sounds and clicks.
This also has a tooltip text that shows positions name call outs. 100 KF, 5 save KF points. It also runs with right/left clicks as well as mouse wheeling.
This is a working ModelDef for a 6 position selector. This one is for selecting fuel tanks. This has sound file inserts, but you will need a sound system for working sounds and clicks.
This also has a tooltip text that shows positions name call outs. 100 KF, 5 save KF points. It also runs with right/left clicks as well as mouse wheeling.
Code:
<!--learjet24_fuel_level_selector-->
<PartInfo>
<Name>learjet24_fuel_level_selector</Name>
<AnimLength>100</AnimLength>
<Animation>
<Parameter>
<Code> (L:LEARJET24 FUEL LEVEL SEL, enum) 0 == if{ 0 }
(L:LEARJET24 FUEL LEVEL SEL, enum) 1 == if{ 20 }
(L:LEARJET24 FUEL LEVEL SEL, enum) 2 == if{ 40 }
(L:LEARJET24 FUEL LEVEL SEL, enum) 3 == if{ 60 }
(L:LEARJET24 FUEL LEVEL SEL, enum) 4 == if{ 80 }
(L:LEARJET24 FUEL LEVEL SEL, enum) 5 == if{ 100 }
</Code>
<Lag>400</Lag>
</Parameter>
</Animation>
<MouseRect>
<Cursor>Hand</Cursor>
<TooltipText>
%((L:LEARJET24 FUEL LEVEL SEL, enum))%{case}%{:5}Left Tip%{:4}Left Wing%{:3}Fuselage Tank%{:2}Right Wing%{:1}Right Tip%{:0}Total Fuel%{End}
</TooltipText>
<MouseFlags>LeftSingle+RightSingle+WheelUp+WheelDown</MouseFlags>
<CallbackCode>
(M:Event) 'LeftSingle' scmp 0 ==
(M:Event) 'WheelUp' scmp 0 == or
if{ (L:LEARJET24 FUEL LEVEL SEL, enum) -- 0 max (>L:LEARJET24 FUEL LEVEL SEL, enum)
1 (>L:XMLSND7,enum) }
(M:Event) 'RightSingle' scmp 0 ==
(M:Event) 'WheelDown' scmp 0 == or
if{ (L:LEARJET24 FUEL LEVEL SEL, enum) ++ 5 min (>L:LEARJET24 FUEL LEVEL SEL, enum)
1 (>L:XMLSND7,enum) }
</CallbackCode>
</MouseRect>
</PartInfo>