Hi all,
I'm working on animating the non-animated switches in the default 737 Virtual Cockpit. So far so good in respect of animations.
At this point in time, I just want the animations triggered by simple on/off switches. No other functionality coded.
I've come up with the below code which works, but I'm very interested to find out if there is a more efficient method which I should adopt.
Any advice provided is gratefully received.
Trent
I'm working on animating the non-animated switches in the default 737 Virtual Cockpit. So far so good in respect of animations.
At this point in time, I just want the animations triggered by simple on/off switches. No other functionality coded.
I've come up with the below code which works, but I'm very interested to find out if there is a more efficient method which I should adopt.
Code:
<PartInfo>
<Name>switch_runway_turnoff_right</Name>
<AnimLength>50</AnimLength>
<Animation>
<Parameter>
<Code>
(L:Runway Turnoff Right, bool) 0 == if{ 0 } els{ 50 }
</Code>
<Lag>400</Lag>
</Parameter>
</Animation>
<MouseRect>
<Cursor>Hand</Cursor>
<MouseFlags>LeftSingle</MouseFlags>
<CallbackCode>
(M:Event) 'LeftSingle' scmp 0 == if{ (L:Runway Turnoff Right, bool) 0 == if{ 1 (>L:Runway Turnoff Right, bool) } els{ 0 (>L:Runway Turnoff Right, bool) } }
</CallbackCode>
</MouseRect>
</PartInfo>
Any advice provided is gratefully received.
Trent





