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

FSXA Simple timer based visibility

Messages
236
Country
australia
Hi gents, I am putting together a gauge and I simply want a bmp to load with the screen and then disappear after 12 seconds or so but every permutation I have tried does not seem to work. My last iteration displayed below was a copy and paste job from the WIKI page which does exactly what it was advertised to do-blink. But I dont want it to blink, All I want it to do is load, stay on for 12 seconds and then go to heaven. Could somebody please help.
XML:
              <Element id="test">
                        <FloatPosition>284.000,150.000</FloatPosition>
                        <Visibility>(P:Absolute time,seconds) 12 % 0.7 12 * > !</Visibility>
                        <SizeScale>0.900</SizeScale>
                        <Image id="test.bmp" Name="test.bmp">
                            <Transparent>True</Transparent>
                            <Bright>True</Bright>
                        </Image>

              </Element>
Many thanks in advance,
regards,
TJ
 
This would be one way:

Code:
<Element id="time init"><Select><Value>(L:TimeInit) 0 == if{ (P:Absolute time,seconds) (>L:AbsTime0, seconds) 1 (>L:TimeInit) }</Value></Select></Element>
       
<Element id="test">
    <FloatPosition>284.000,150.000</FloatPosition>
    <Visibility>(P:Absolute time,seconds) (L:AbsTime0, seconds) 12 + &gt; !</Visibility>
    <SizeScale>0.900</SizeScale>
    <Image id="test.bmp" Name="test.bmp">
        <Transparent>True</Transparent>
        <Bright>True</Bright>
    </Image>
</Element>

or with this <Visibility> without the need of the separate "time init" Element:

<Visibility>(L:TimeInit) 0 == if{ (P:Absolute time,seconds) (>L:AbsTime0, seconds) 1 (>L:TimeInit) } (P:Absolute time,seconds) (L:AbsTime0, seconds) 12 + &gt; !</Visibility>


Bob
 
Bob, just a question, with your code, it works perfectly for me except, it only works once. Once per flight that is. Is there any way to have this triggered every time a particular event occurs and on multiple times in the same session?
Many thanks
Regards, TJ
 
Easy to do that. The key is to do (P:Absolute time,seconds) (>L:AbsTime0, seconds) - one time only (i.e., not uncontrolled repetition) - but any time you want.

That can be accomplished as part of a mouse click or when a certain Event occurs.

Mouse click example (note that FS9 XML format is shown below, not FSX format that you are using, so make necessary adjustments for FSX format):

XML:
<Area Name="TEST BUTTON 4" Left="365" Top="6" Width="35" Height="15">
    <Cursor Type="Hand"/>
    <Click Kind="LeftSingle">
        (P:Absolute time, seconds) (>L:AbsTime, seconds)
    </Click>
</Area>


To see how this can be done when an Event occurs, please take a look at the Events and Traps wiki.

Also, remember to use this <Visibility> statement: <Visibility>(P:Absolute time,seconds) (L:AbsTime0, seconds) 12 + &gt; !</Visibility>

There may be other conditions or situations you want to trigger the time init, but take care to avoid uncontrolled repetition of it.

Bob
 
Last edited:
Thanks for the reply Bob, have not had a chance to test it out as both my kids have had bad bouts of the flu resulting in several sleepless nights. But I will test it out when things return to normal and report back. Thanks again, regards TJ
 
Back
Top