• 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.

FS2004 String Disappearing act

Messages
1,468
Country
italy
The code I have does its job perfectly ie. it displays text if the gauge is clicked on and then hides the text when clicked on again whilst on the ground. What I'm looking for as an extra feature is for the text to disappear by itself if the FO forgets to click to hide the text. But not to reappear until clicked on again but only after landing. Any suggestions welcome.
Code:
<Element>
   <FormattedText X="236" Y="310" Font="Arial" FontSize="100" LineSpacing="120" Adjust="Center" Color="#661914" Bright="Yes">>
   <String>
   %((L:scratchpadz,bool) 0 !=)
  %{if}
% Set TPI to%\n
  %((L:TailTrim, number))%!7.1f!%
  %{else}
  %{end}
  </String>
   </FormattedText>
</Element>

<Mouse>   
      <Cursor Type="Hand"/>
      <Click>(A:SIM ON GROUND, bool) 1 == if{ (L:scratchpadz,bool) 0 != if{ 0 (&gt;L:scratchpadz,bool) } els{ 1 (&gt;L:scratchpadz,bool) } }</Click>
   </Mouse>
 
Hi Volo,

If I understand correctly, you need an elapsed time timer that starts whenever (L:scratchpadz,bool) is initially set to 1, and then sets (L:scratchpadz,bool) to 0 after some amount of time?

If that's what you need, then you might try initializing it by recording the start time in the mouse click, in the same els{ statement as 1 (>L:scratchpadz, bool). Then in your Element or in Update, do a 0 (>L:scratchpadz, bool) after some amount of elapsed time. Make sense?

Bob
 
Last edited:
Hi Volo,

If I understand correctly, you need an elapsed time timer that starts whenever (L:scratchpadz,bool) is initially set to 1, and then sets (L:scratchpadz,bool) to 0 after some amount of time?

Bob
That's an idea Bob. As it's currently set one just clicks the gauge area to toggle the text on and off. And, when in the air no text shows up. But, if the text is showing when the a/c takes-off it stays on. So parhaps I could incorporate your idea so that once airborne it turns off after a short period.
 
If you just need text off when airborne, then in Update

(L:scratchpadz, bool) 1 == (A:SIM ON GROUND, bool) 0 == and if{ 0 (>L:scratchpadz, bool) }
 
Back
Top