- Messages
- 2,385
- Country

After quite a long time I have another question about panel modelling:
I have a flap rocker that increments/decrements flaps when pushed up/down. As it is a rocker it should automatically flip back to 0-position after switching.
I couldn't get this done in the modeldef.xml, it seems quite tricky.
I tried this code, but it doesn't seem to work:
Anyone an idea how to achieve this?
I have a flap rocker that increments/decrements flaps when pushed up/down. As it is a rocker it should automatically flip back to 0-position after switching.
I couldn't get this done in the modeldef.xml, it seems quite tricky.
I tried this code, but it doesn't seem to work:
<PartInfo>
<Name>fw_flaps_rocker</Name>
<AnimLength>100</AnimLength>
<Animation>
<Parameter>
<Code>
(L:FW Flaps Rocker,number) 50 * 50 +
</Code>
<Lag>300</Lag>
</Parameter>
</Animation>
<MouseRect>
<Cursor>Hand</Cursor>
<HelpID>HELPID_GAUGE_FLAPS_SWITCH</HelpID>
<TooltipID>TOOLTIPTEXT_FLAPS_ROCKER</TooltipID>
<MouseFlags>LeftSingle+LeftDrag+LeftRelease</MouseFlags>
<CallbackCode>
(M:Event) 'LeftSingle' scmp 0 == if{ (L:FW Flaps Rocker, number) ++ (K:KEY_FLAPS_INCR) quit }
(M:Event) 'LeftRelease' scmp 0 == if{ (L:FW Flaps Rocker, number) -- (K:KEY_FLAPS_DECR) quit }
</CallbackCode>
</MouseRect>
</PartInfo>
Anyone an idea how to achieve this?

