- Messages
- 468
- Country

I have been working on converting some working FS9 code found here http://www.aerodynamika.com/cgi-bin/yabb2/YaBB.pl?num=1189954045 so that it will work in FSX. I do intend on updating that thread if/when I get all my changes done so that there will be code available for FSX modellers.
I have currently hit a show stopper with some new code though and I can't seem to find a way around the problem. The original code did not cover buttons for incrementing/decrementing the altitude setting and I couldn't find existing code in the modeldef file despite deep searches. I have also searched in 2D gauges I have for clues.
I tried to solve the issue with the following code but when I export the model the button the code is applied to does not show in game so I am guessing an error in the code is preventing the button from showing in the sim.
The above code is for the 'UP' button on the autopilot and is supposed to increment the 'target' altitude used by the altitude hold function. I will have to write similar code for the 'DOWN' button to decrement the target altitude.
I also intend to add a 'mousewheel' feature once I get the code working.
Can anyone see why the code is not working and/or why the button doesn't show in sim (animations/scale etc. have all been triple-checked and are OK)?
I have currently hit a show stopper with some new code though and I can't seem to find a way around the problem. The original code did not cover buttons for incrementing/decrementing the altitude setting and I couldn't find existing code in the modeldef file despite deep searches. I have also searched in 2D gauges I have for clues.
I tried to solve the issue with the following code but when I export the model the button the code is applied to does not show in game so I am guessing an error in the code is preventing the button from showing in the sim.
Code:
<PartInfo>
<Name>ap_switch_alt_inc</Name>
<AnimLength>50</AnimLength>
<Animation>
<Parameter>
<Sim>
<Variable>AP ALT VAR INC</Variable>
<Units>bool</Units>
<Scale>50</Scale>
</Sim>
<Lag>400</Lag>
</Parameter>
</Animation>
<MouseRect>
<Cursor>Hand</Cursor>
<EventID>AP_ALT_VAR_INC</EventID>
</MouseRect>
</PartInfo>
The above code is for the 'UP' button on the autopilot and is supposed to increment the 'target' altitude used by the altitude hold function. I will have to write similar code for the 'DOWN' button to decrement the target altitude.
I also intend to add a 'mousewheel' feature once I get the code working.
Can anyone see why the code is not working and/or why the button doesn't show in sim (animations/scale etc. have all been triple-checked and are OK)?

