Hi all,
I've been scratching my head over this problem for a couple of days now.
I'm editing the default FSX 737 virtual cockpit and I have separated the Panel Lights knob and the Circuit Breaker knob. I've created animations for both knobs which when tested in MCX rotate as desired.
I've created the Part Info entries in the modeldef.xml and both mouse rectangles work, toggling the panel lights and avionics master switches respectively (tested by compiling the model and testing within FSX).
However, the animation works for the Panel Lights switch, but not for the Circuit Breaker switch?
I'd really appreciate someone reviewing the code above and letting me know if I'm missing anything really obvious?
Thank you!
Trent
I've been scratching my head over this problem for a couple of days now.
I'm editing the default FSX 737 virtual cockpit and I have separated the Panel Lights knob and the Circuit Breaker knob. I've created animations for both knobs which when tested in MCX rotate as desired.
Code:
<Anim name="switch_panel_light" guid="291d4355-100b-449d-a7bb-c54dafb8e025" length="100.000" type="Sim" typeParam="AutoPlay" typeParam2="switch_panel_light">
<AnimStream name="Rotation" id="0" partName="node1107" length="50.000">
<Keyframe time="0.000" type="Quaternion" data="0;-0.171141;-0.342282;0.92388"/>
<Keyframe time="50.000" type="Quaternion" data="0;0.171141;0.342282;0.92388"/>
</AnimStream>
</Anim>
<Anim name="switch_circuit_breaker" guid="632fce65-8426-46cb-bae2-b4f79d8037ec" length="100.000" type="Sim" typeParam="AutoPlay" typeParam2="switch_circuit_breaker">
<AnimStream name="Rotation" id="0" partName="node1108" length="50.000">
<Keyframe time="0.000" type="Quaternion" data="0;-0.413171;-0.826343;0.382683"/>
<Keyframe time="50.000" type="Quaternion" data="0;0.171141;0.342282;0.92388"/>
</AnimStream>
</Anim>
I've created the Part Info entries in the modeldef.xml and both mouse rectangles work, toggling the panel lights and avionics master switches respectively (tested by compiling the model and testing within FSX).
Code:
<Animation name="switch_panel_light" guid="291d4355-100b-449d-a7bb-c54dafb8e025" length="50" type="Sim" typeParam2="switch_panel_light" typeParam="AutoPlay" />
<Animation name="switch_circuit_breaker" guid="632fce65-8426-46cb-bae2-b4f79d8037ec" length="50" type="Sim" typeParam2="switch_circuit_breaker" typeParam="AutoPlay" />
<PartInfo>
<Name>switch_panel_light</Name>
<AnimLength>50</AnimLength>
<Animation>
<Parameter>
<Sim>
<Variable>LIGHT PANEL</Variable>
<Units>bool</Units>
<Scale>50</Scale>
</Sim>
<Lag>400</Lag>
</Parameter>
</Animation>
<MouseRect>
<Cursor>Hand</Cursor>
<HelpID>HELPID_GAUGE_LIGHT_SWITCH_PANEL</HelpID>
<TooltipID>TOOLTIPTEXT_LIGHT_SWITCH_PANEL</TooltipID>
<CallbackCode>(>K:PANEL_LIGHTS_TOGGLE)</CallbackCode>
</MouseRect>
</PartInfo>
<PartInfo>
<Name>switch_circuit_breaker</Name>
<AnimLength>50</AnimLength>
<Animation>
<Parameter>
<Sim>
<Variable>AVIONICS MASTER SWITCH</Variable>
<Units>bool</Units>
<Scale>50</Scale>
</Sim>
<Lag>400</Lag>
</Parameter>
</Animation>
<MouseRect>
<Cursor>Hand</Cursor>
<HelpID>HELPID_GAUGE_AVIONICS_SWITCH</HelpID>
<TooltipID>TOOLTIPTEXT_AVIONICS_SWITCH</TooltipID>
<EventID>TOGGLE_AVIONICS_MASTER</EventID>
</MouseRect>
</PartInfo>
However, the animation works for the Panel Lights switch, but not for the Circuit Breaker switch?
I'd really appreciate someone reviewing the code above and letting me know if I'm missing anything really obvious?
Thank you!
Trent





