- Messages
- 542
- Country
I have the following formatted text in an instrument.
This portion gives the distance between the user aircraft and the selected AI target aircraft in NM.
What I now want is this line to read as follows:
if distance is greater than 1.6NM then readout in NM.
else distance is less than 1.6 NM then readout in ft.
I tried the following , but it does not work .
Any ideas on getting this conditional statement to work in formatted text ?
Cheers
Karol
HTML:
<!--Target-->
<Element id="Target_Data">
<FloatPosition>0.000,30.000</FloatPosition>
<Visibility>(L:TGTscript, number) 1 ==</Visibility>
<GaugeText id="target">
<BackgroundColorScript>0x000000</BackgroundColorScript>
<FontColorScript>0xFFFFAA</FontColorScript>
<FontHeight>16</FontHeight>
<Tabs>0L,5L,275L</Tabs>
<GaugeString>\t%Brg %(@ClosingSpeed (>L:ClosingSpeed,number))%(@AspectAngle (>L:AspectAngle,number))
%((L:Target_Bearing, number))%!4d!\{dplo= }
\t\t%Cls %((L:ClosingSpeed,number))%!4d!
\n\n\t%Gs %((L:Target_Groundspeed, number) 10 / near 10 *)%!4d!%kt%
\t\t%Alt %((L:Target_Altitude, number) 100 / near)%!4d!\{dpl=FL}
\n\n\t%Hdg%((L:Target_Heading, number))%!4d!%\{dplo= }
\t\t%Dst %((L:Target_Distance, number))%!4.1f!\{dpl=nm}
\n\n\t%VSI: %((L:Target_VSI, feet per minute))%!d!
%</GaugeString>
<Length>350</Length>
<Size>350,160</Size>
<Bright>True</Bright>
</GaugeText>
</Element>
This portion gives the distance between the user aircraft and the selected AI target aircraft in NM.
HTML:
\t\t%Dst %((L:Target_Distance, number))%!4.1f!\{dpl=nm}
What I now want is this line to read as follows:
if distance is greater than 1.6NM then readout in NM.
else distance is less than 1.6 NM then readout in ft.
I tried the following , but it does not work .
HTML:
%((L:Target_Distance, number) 1.6 >)%{if}%((L:Target_Distance, number))%!4d!\{dpl=nm}%{els}%((L:Target_Distance, number) 6076 *)%!4d!%
Any ideas on getting this conditional statement to work in formatted text ?
Cheers
Karol