• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

3 Function Font; LandingGear

Messages
10,163
Country
us-arizona
Hey all,

I am trying to do a font string that says one of three things;
1. Lower Gear (Gear is up, lower it by clicking here. Color is green)
2. Gr Transition (Gear is between up and down, blinky mode in progress. Color mode is red).
3. Raise Gear (Gear is down and locked, font is green).

Normally I would write three font strings that would 'appear' in the same zones, activated by states. But there is a way to write these into a single string 'assembly' (if I am correct) and I am curious to learn how its done.

So far, from my experiments, I had no joy. So... Here I am. Anyone care to show me how its done?


The top one shows a blinking red font; 'GR TRANSITIONLOWER GEAR

The second one down shows proper green font, stating 'LOWER GEAR'.

Code:
     <Element>
     <Element>
// LANDING GEAR
          <Position X="72" Y="391"/>
                  <Visible>(L:SWITCHES SCROLL,bool) 0 == </Visible>
    <FormattedText X="700" Y="374" Font="Arial Black" FontSize="26" LineSpacing="32" Adjust="Left" Color="Red" Bright="Yes">
          <Color Value="#0X00FF00"/>
      <String>
        %( 1 99 (A:GEAR RIGHT POSITION, percent) rng )
        %{if}\{blnk}
        %GR TRANSITION
        %( 1 99 (A:GEAR RIGHT POSITION, percent) 100 )
        %{if}\{clr}
        %LOWER GEAR
        %((A:GEAR RIGHT POSITION, percent) 0 )
        %{if}
        %\{clr}
        %RAISE GEAR
      </String>
         </FormattedText>
     </Element>
      </Element>
<!-- //////////////////////////////////////////////////////////////
     <Element>
     <Element>
// LANDING GEAR
          <Position X="72" Y="391"/>
                  <Visible>(L:SWITCHES SCROLL,bool) 0 == </Visible>
    <FormattedText X="700" Y="374" Font="Arial Black" FontSize="26" LineSpacing="32" Adjust="Left" Color="Red" Bright="Yes">
          <Color Value="#0X00FF00"/>
      <String>
        %( 1 99 (A:GEAR RIGHT POSITION, percent) rng )
        %{if}\{clr2}\{blnk}
        %TRANSITION
        %{else}
        %\{clr2}
        %DEPLOY GEAR  
      </String>
         </FormattedText>
     </Element>
      </Element>

     <Element>
     <Element>
// LANDING GEAR
          <Position X="72" Y="391"/>
                  <Visible>(L:SWITCHES SCROLL,bool) 0 == </Visible>
    <FormattedText X="700" Y="374" Font="Arial Black" FontSize="26" LineSpacing="32" Adjust="Left" Color="Red" Bright="Yes">
          <Color Value="#0X00FF00"/>
      <String>
        %( 1 99 (A:GEAR RIGHT POSITION, percent) rng )
        %((A:GEAR RIGHT POSITION, percent) 0 ==)
        %{if}\{clr2}\{blnk}
        %TRANSITION
        %{else}
        %\{clr2}
        %DEPLOY GEAR  
      </String>
         </FormattedText>
     </Element>
      </Element>

     <Element>
     <Element>
// LANDING GEAR
          <Position X="72" Y="391"/>
                  <Visible>(L:SWITCHES SCROLL,bool) 0 == </Visible>
    <FormattedText X="700" Y="374" Font="Arial Black" FontSize="26" LineSpacing="32" Adjust="Left" Color="#0X00FF00" Bright="Yes">
          <Color Value="#RED"/>
          <Color Value="#0X00FF00"/>
      <String>
        %((A:GEAR RIGHT POSITION, percent) 0 ==)
        %{if}
        %LOWER GEAR
        %( 1 99 (A:GEAR RIGHT POSITION, percent) rng )
        %{if}\{clr2}\{blnk}
        %LOWER GEAR
        %((A:GEAR RIGHT POSITION, percent) 100 ==)
        %{if}
        %\{clr3}
        %RAISE GEAR
      </String>
         </FormattedText>
     </Element>
      </Element>

     <Element>
     <Element>
// LANDING GEAR
          <Position X="72" Y="391"/>
                  <Visible>(L:SWITCHES SCROLL,bool) 0 == </Visible>
    <FormattedText X="700" Y="374" Font="Arial Black" FontSize="26" LineSpacing="32" Adjust="Left" Color="#0X00FF00" Bright="Yes">
          <Color Value="#99999999"/>
          <Color Value="#RED"/>
      <String>
        %((A:GEAR HANDLE POSITION, bool) 0 ==)
        %{if}
        %LOWER GEAR
        %{else}
        %\{clr2}
        %RAISE GEAR
      </String>
         </FormattedText>
     </Element>
      </Element>

     <Element>
     <Element>
// LANDING GEAR
          <Position X="72" Y="391"/>
                  <Visible>(L:SWITCHES SCROLL,bool) 0 == </Visible>
    <FormattedText X="700" Y="374" Font="Arial Black" FontSize="30" LineSpacing="32" Adjust="Left" Color="#999999" Bright="Yes">
          <Color Value="#0X00FF00"/>
          <Color Value="Red"/>
      <String>
        %((A:GEAR HANDLE POSITION, bool) 0 ==)
        %{if}
        %LOWER GEAR
        %{else}
        %\{clr2}
        %ACTIVE
      </String>
         </FormattedText>
     </Element>
      </Element>


[Yes... I am a code hoarder... I hate to delete them in case there is something revolutionary in there I might need later, lol... ]
 
Try the following ,
Code:
// LANDING GEAR Text colour Red=Gear is retracted  White=Gear in transition  Green= Gear in lowered position
     <Element>
          <Position X="72" Y="391"/>
                  <Visible>(L:SWITCHES SCROLL,bool) 0 == </Visible>
    <FormattedText X="700" Y="374" Font="Arial Black" FontSize="26" LineSpacing="32" Adjust="Left" Color="Red" Bright="Yes">
          <Color Value="#0XFFFFFF"/>
          <Color Value="#0X00FF00"/>
      <String>
        %((A:Gear left position,percent) 95 &lt; (A:Gear left position,percent) 5 &gt; &amp;&amp;)
        %{if}
        %\{clr2}%\{blnk}%GR TRANSITION
        %{end}
        %((A:Gear left position,percent) 5 &lt;)
        %{if}
        %\{clr1}%LOWER GEAR
        %{end}
        %((A:Gear left position,percent) 95 &gt;)
        %{if}
        %\{clr3}%RAISE GEAR
        %{end}
      </String>
         </FormattedText>
     </Element>

Cheers
Karol
 
A slight correction , this places the Visibility in it's correct location in the first Element shell ,
Code:
// LANDING GEAR Text colour Red=Gear is retracted  White=Gear in transition  Green= Gear in lowered position
     <Element>
                  <Visible>(L:SWITCHES SCROLL,bool) 0 == </Visible>
     <Element>
          <Position X="72" Y="391"/>
    <FormattedText X="700" Y="374" Font="Arial Black" FontSize="26" LineSpacing="32" Adjust="Left" Color="Red" Bright="Yes">
          <Color Value="#0XFFFFFF"/>
          <Color Value="#0X00FF00"/>
      <String>
        %((A:Gear left position,percent) 95 &lt; (A:Gear left position,percent) 5 &gt; &amp;&amp;)
        %{if}
        %\{clr2}%\{blnk}%GR TRANSITION
        %{end}
        %((A:Gear left position,percent) 5 &lt;)
        %{if}
        %\{clr1}%LOWER GEAR
        %{end}
        %((A:Gear left position,percent) 95 &gt;)
        %{if}
        %\{clr3}%RAISE GEAR
        %{end}
      </String>
         </FormattedText>
     </Element>
     </Element>
 
Here is another option that does not use {blnk} , but flashes without the background block .
Code:
// LANDING GEAR Text colour Red=Gear is retracted  White=Gear in transition  Green= Gear in lowered position
     <Element>
                  <Visible>(L:SWITCHES SCROLL,bool) 0 == </Visible>
     <Element>
          <Position X="72" Y="391"/>
    <FormattedText X="700" Y="374" Font="Arial Black" FontSize="26" LineSpacing="32" Adjust="Left" Color="Red" Bright="Yes">
          <Color Value="#0XFFFFFF"/>
          <Color Value="#0X00FF00"/>
      <String>
        %((A:Gear left position,percent) 95 &lt; (A:Gear left position,percent) 5 &gt; &amp;&amp; (P:Local time,seconds) 0.4 % 0.25 &lt; *)
        %{if}
        %\{clr2}%GR TRANSITION
        %{end}
        %((A:Gear left position,percent) 5 &lt;)
        %{if}
        %\{clr1}%LOWER GEAR
        %{end}
        %((A:Gear left position,percent) 95 &gt;)
        %{if}
        %\{clr3}%RAISE GEAR
        %{end}
      </String>
         </FormattedText>
     </Element>
     </Element>

Both of above codes have been tested and work .

Cheers
Karol
 
Dang, nicely done, Karol!

I didnt know that you could stack two versions of the same Parameter string in the same logic grouping or Element... I used rng. That must be where I went wrong, why it wouldnt work. I was so close, lolol...

Thanks again for pointing that out. Nice feature on the new version blinky tech. I like that one better. I also didnt know you could insert the blink string section at the back of an element group. Learn new things daily...! Nice...
 
Back
Top