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

Messages
60
Country
germany
Thank you for this!

Here is the code if you want, for example, that something is only visible between 10 and 18 o'clock every day. Maybe it helps someone
XML:
<Visibility>
<Parameter>
<Code>(E:LOCAL TIME, Seconds) 36000 &gt;= (E:LOCAL TIME, Seconds) 64800 &lt;= and if{ 1 } els{ 0 }</Code>

</Parameter>
</Visibility>
 

Christian Bahr

Resource contributor
Messages
837
Country
germany
Here is the code if you want, for example, that something is only visible between 10 and 18 o'clock every day. Maybe it helps someone
Very very nice. Thanks a lot for this. I am currently trying to assign a code to a number of animated people so that they are displayed or not shown at certain outside temperatures, time of day and time of year, as well as the weather. Your code is just right for me!
 
Messages
104
Country
pakistan
Short feedback, it worked!!!

The parasol can only be seen in month 4 (April). In the other months it is hidden:

This is great news. I think this will open up many more possibilities to play with the various variables and do some amazing stuff. Most of the variables listed in FSX SDK seem to be working in MSFS as well.
 

Christian Bahr

Resource contributor
Messages
837
Country
germany
This is great news. I think this will open up many more possibilities to play with the various variables and do some amazing stuff. Most of the variables listed in FSX SDK seem to be working in MSFS as well.
I see it that way too.

The possibilities in the MFS in particular and also with regard to character animation are not entirely foreseeable yet. They will be huge in my conservative estimate. Everything that one would have liked to have done in Microsoft's old flight simulator is now possible. That seems to be an endless field of activity. I'm really looking forward to it :)
 

Christian Bahr

Resource contributor
Messages
837
Country
germany
I would like to program the wind direction indicators on the tower so that the different direction indicators are displayed for different wind directions:

mfs_edle_tower_signs.jpg


Unfortunately, I don't know what the visibility code should look like, so that when the wind comes from a direction of 240 °, the sign 24 is displayed. And vice versa, if the wind comes from 060 °, the sign 06 is displayed.
With seasons I know that the code has to be designed with "greater than" and "less than", which also works very well:
(E:ZULU MONTH OF YEAR, number) 4.0 &gt;= (E:ZULU MONTH OF YEAR, number) 10.0 &lt;= and if{ 1 } els{ 0 }

Does anyone have any advice?
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
30,444
Country
netherlands
Did you check the default windsock? I'm not sure if it uses visibility conditions as well, but you might be able to see which variable drives the animation.
 

Christian Bahr

Resource contributor
Messages
837
Country
germany
Did you check the default windsock? I'm not sure if it uses visibility conditions as well, but you might be able to see which variable drives the animation.
No, I didn't look at the default windsock code. The default windsock is animated and the signs on the tower are not. That's why I need code that does without animation.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
30,444
Country
netherlands
The animation of the windsock uses this variable if I look at the template used, so I would assume you can make a similar visibility condition with it. like you do in the sample above for the month.

Code:
(A:AMBIENT WIND DIRECTION,degrees)
 

Christian Bahr

Resource contributor
Messages
837
Country
germany
I am currently trying out a code I made myself:
(E:AMBIENT WIND DIRECTION, Degrees) 336 &gt;= (E:AMBIENT WIND DIRECTION, Degrees) 156 &lt;= and if{ 1 } els{ 0 }
But first the object (a planter) has to be changed into a SimObject.
 
Messages
39
Country
peru
Hello , these animated objects need to go to a SimObjects type of project or can go just to regular modelLib project?
 
Messages
6
Country
germany
Did someone ever try to hide and show a object by local day of week? The following code wont work for my object. The object doesn’t show up at all

(E:LOCAL DAY OF WEEK, Number) 2 == if{ 1 } els{ 0 }
 
Messages
6
This could be awesome for things like an Oshkosh EAA AirVenture scenery pack, only having it up for a specific month or something.
 
Messages
39
Country
peru
<?xml version="1.0" ?> <ModelInfo guid="{320d5199-c134-406c-9555-85e6414b8e3f}" version="1.1"> <Animation name="Walk" guid="5439520a-b246-4236-9921-e8d0e54ef072" type="Standard" typeParam="AutoPlay" /> <PartInfo> <Name>test</Name> <Visibility> <Parameter> <Code>(E:LOCAL TIME, hours) 6 &gt;= (E:LOCAL TIME, hours) 18 &lt;= and if{ 1 } els{ 0 }</Cod </Parameter> </Visibility> </PartInfo> </ModelInfo>

Hello this is my code, in my case it does not work

any idea where Im messing it up?

thanks
 
Messages
39
Country
peru
edit:
Ive made the change and it still does not work

could there be any other problem?
animation is playing nicely but visibility control does not work

thanks

Code:
<?xml version="1.0" ?>
<ModelInfo guid="{320d5199-c134-406c-9555-85e6414b8e3f}" version="1.1">
        <Animation name="Walk" guid="5439520a-b246-4236-9921-e8d0e54ef072"  type="Standard" typeParam="AutoPlay" />       
        <PartInfo>
            <Name>Test</Name>
            <Visibility>
                <Parameter>
                    <Code>(E:LOCAL TIME, Seconds) 36000 &gt;= (E:LOCAL TIME, Seconds) 64800 &lt;= and if{ 1 } els{ 0 }</Code>
                </Parameter>
            </Visibility>
        </PartInfo>
</ModelInfo>
 
Last edited:
Top