I used to run fsx some 6 years ago and as I have time to spare age 78 I started again!!
I am attempting my first gauge mod - its on the G1000 pfd in the baron
I have a number of elements working as gauges with gaugestrings, radio height, ap, nav, hdg, gear handle position etc.as a second bar below the top bar where it shows dist to waypoint etc.
I decided to add gauge with 2 images for the gear handle position -up as red image, down in green to place elsewhere.
This I cannot get it to change when raise or lower the gear at any height although the gaugestring in the second bar - gear handle position does change from 0 to 1 and vice versa. It is obviously the syntax in the image gauge. My code is below, I would welcome corrections or if on the wrong track entirely the code to achieve it. I have tried other variations using "value" to get a result instead of expression but still fail. I have seached google but all just seem to point to the sdk variables but not the syntax to use and have never used xml coding.
regards
Brian B
I am attempting my first gauge mod - its on the G1000 pfd in the baron
I have a number of elements working as gauges with gaugestrings, radio height, ap, nav, hdg, gear handle position etc.as a second bar below the top bar where it shows dist to waypoint etc.
I decided to add gauge with 2 images for the gear handle position -up as red image, down in green to place elsewhere.
This I cannot get it to change when raise or lower the gear at any height although the gaugestring in the second bar - gear handle position does change from 0 to 1 and vice versa. It is obviously the syntax in the image gauge. My code is below, I would welcome corrections or if on the wrong track entirely the code to achieve it. I have tried other variations using "value" to get a result instead of expression but still fail. I have seached google but all just seem to point to the sdk variables but not the syntax to use and have never used xml coding.
Code:
<Element id="Gear Status">
<FloatPosition>800.000,20.000</FloatPosition>
<Expression id="Expression">
<Script>(Gear Handle Position,Bool) 0 == if</Script>
</Expression>
<Select>
<Case id="Case0">
<ExpressionResult>0</ExpressionResult>
<Image id="g1000_gear_u.bmp" Name="g1000_gear_u.bmp">
<Transparent>True</Transparent>
</Image>
</Case>
<Case id="Case1">
<ExpressionResult>1</ExpressionResult>
<Image id="g1000_gear_d.bmp" Name="g1000_gear_d.bmp">
<Transparent>True</Transparent>
</Image>
</Case>
</Select>
</Element>
regards
Brian B







