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

MSFS MSFS Visibility conditions

Messages
578
Country
france
Hello
I'm trying to implement visibility conditions into my simobjects

I've tried many codes with many structures (old p3d/fsx partinfo sections and new behavior/component sections) but nothing seems to work
I've read a topic showcasing the code structure but still no result

here is my test model, a simple ball over a box, I'm trying to hide the ball on july

so I've taken the liberty to copy / paste your code @Christian Bahr because you said it worked (I'm just testing, there is no intent to distribute what so ever)

XML:
<?xml version="1.0" encoding="utf-8"?>
<ModelInfo guid="{4bf4cfcc-51dc-4158-bc46-fd6992fdadec}" version="1.1">
    <LODS>
        <LOD minSize="0" ModelFile="box.gltf"/>
    </LODS>
<Component ID="ball" Node="ball">
        <Visibility>
            <Parameter>
                <Code>
                    (E:LOCAL MONTH OF YEAR, Number) 7 == if{ 0 } els{ 1 }
                </Code>
            </Parameter>
        </Visibility>
    </Component>
   
</ModelInfo>

still, nothing works
I also tried to use the time of day var but no luck
here is my simobject attached, please help!

thnx in advance :)
 

Attachments

  • sosampletry.zip
    15.3 KB · Views: 57
  • blend file.zip
    135.7 KB · Views: 54
Messages
255
Country
germany
I assume, that the reason why it doesn't work is, that you have to us ID="box" NODE="ball" because the names correspondent to the blender content names.
So give that a try. If it's not working, export the box and the ball into two different exports and use the visabilty only for the ball object.
 
Messages
767
Country
italy
Your component section must be inside Behaviors section

( @GuidoH The id is just and internal Id and it is not required to match the node name)

(Never tried with simobject type Animal, only with Landmarks or Airplanes, but should work as well)



&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;ModelInfo guid="{4bf4cfcc-51dc-4158-bc46-fd6992fdadec}" version="1.1"&gt;
&lt;LODS&gt;
&lt;LOD minSize="0" ModelFile="box.gltf"/&gt;
&lt;/LODS&gt;
&lt;Behaviors&gt;
&lt;Component ID="ball" Node="ball"&gt;
&lt;Visibility&gt;
&lt;Parameter&gt;
&lt;Code&gt;
(E:LOCAL MONTH OF YEAR, Number) 7 == if{ 0 } els{ 1 }
&lt;/Code&gt;
&lt;/Parameter&gt;
&lt;/Visibility&gt;
&lt;/Component&gt;
&lt;/Behaviors&gt;

&lt;/ModelInfo&gt;





[/CODE]









Some instructions about Simboject



Inviato dal mio Mi 9 Lite utilizzando Tapatalk
 
Messages
767
Country
italy
Thank you soo much!
Hint: in the export settings, look at the copyright, Mamudesign
That youtuber it's me

Inviato dal mio Mi 9 Lite utilizzando Tapatalk
 
Top