- Messages
- 1
- Country

Hi all,
I'm new to writing gauges, but have got stuck. I am trying to create a gauge that will switch off the autopilot when the aircraft descends lower than 500'. The gauge is working with RADIO HEIGHT and, seems to work fine, but can not get the code right for switching off the AP, in fact I'm not even sure I have put the evaluation in the right place. Below is my code.
I would be grateful for any pointers, and if someone could let me know where I can find simple and easy examples of interacting with FS, and some simple tutorials, that would be great, as I am new to not only XML, but this backward polish thingy as well!
I'm new to writing gauges, but have got stuck. I am trying to create a gauge that will switch off the autopilot when the aircraft descends lower than 500'. The gauge is working with RADIO HEIGHT and, seems to work fine, but can not get the code right for switching off the AP, in fact I'm not even sure I have put the evaluation in the right place. Below is my code.
Code:
<?xml version="1.0" encoding="UTF-16"?>
<SimGauge.Gauge id="Radio Height Gauge" ArtDirectory="C:\Program Files\Games\Microsoft Flight Simulator X\Gauges\TestGauges">
<FloatPosition>0.000,0.000</FloatPosition>
<Element id="Fixed Text">
<FloatPosition>5.000,10.000</FloatPosition>
<GaugeText id="GaugeText">
<FontColor>gold</FontColor>
<FontFace>Arial</FontFace>
<FontHeight>13</FontHeight>
<GaugeString>Radio Height</GaugeString>
<Size>90,15</Size>
<Transparent>True</Transparent>
</GaugeText>
</Element>
<Element id="Output Box">
<FloatPosition>5.000,40.000</FloatPosition>
<Rectangle id="Rectangle">
<LineWidth>1</LineWidth>
<Width>90</Width>
<Height>24</Height>
<LineColor>darkslateblue</LineColor>
<FillColor>black</FillColor>
</Rectangle>
</Element>
<Element id="Display Text">
<FloatPosition>10.000,44.000</FloatPosition>
<GaugeText id="GaugeText">
<FontColor>red</FontColor>
<FontFace>Courier</FontFace>
<FontHeight>16</FontHeight>
<GaugeString>%( (A:RADIO HEIGHT, feet) )%!5d!</GaugeString>
<Size>90,16</Size>
<Transparent>True</Transparent>
<VerticalAlign>CENTER</VerticalAlign>
</GaugeText>
</Element>
<Update id="Update">
<Frequency>1</Frequency>
<Script>%(A:RADIO HEIGHT, feet) (200) <= if{ >A:AUTOPILOT MASTER,bool)0 } </Script>
</Update>
</SimGauge.Gauge>
I would be grateful for any pointers, and if someone could let me know where I can find simple and easy examples of interacting with FS, and some simple tutorials, that would be great, as I am new to not only XML, but this backward polish thingy as well!
Last edited:
