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

P3D v4 P3D V4 visibility conditions

Messages
579
Country
france
Hello
i to make a simconnect app that set a var in the SIM and in the modeldif.xml i set the code to show if this var is true
well it didn't work , i got some problems but i think i know how to fix them

well, i wanted to make something native without custom vars, so i tried to make an obejct that shows when it rain (simobject not a scenery) but i can't know why it doesn't work

here's my code
Code:
  <PartInfo>
    <Name>test</Name>
        <Visibility>
            <Parameter>
                    <Code>
                    (A:AMBIENT PRECIP STATE, mask) 0x0004 == if{ 1 } els { 0 }
                    </Code>
            </Parameter>
        </Visibility>
  </PartInfo>

i tried this too but same result :(


Code:
  <PartInfo>
    <Name>test</Name>
        <Visibility>
            <Parameter>
                    <Code>
                    (A:AMBIENT PRECIP STATE, number) 4 == if{ 1 } els { 0 }
                    </Code>
            </Parameter>
        </Visibility>
  </PartInfo>

hope you help me with it :)

and yeah, Can we apply those vis conditions to scenery obejcts in BGLs ? and what about the somconnect set custom var, does it exist

thnx in advance :)
 
XML:
    <PartInfo>
    <Name>rain</Name>
    <Visibility>
      <Parameter>
        <Code>
          (O:Weather.AmbientPrecipState, mask) 4.0 == if{ 1 } els{ 0 }
        </Code>
      </Parameter>
    </Visibility>
  </PartInfo>
 
XML:
    <PartInfo>
    <Name>rain</Name>
    <Visibility>
      <Parameter>
        <Code>
          (O:Weather.AmbientPrecipState, mask) 4.0 == if{ 1 } els{ 0 }
        </Code>
      </Parameter>
    </Visibility>
  </PartInfo>
can you explain why did you use the O: instead of A please :)
 
Pay attention to the slightest difference in what is written in the xml.
Yours says, for instance, els { 0 } where it should be els{ 0 }.
Also, see the sticky where you will find more info. If not, everything will have to be explained twice (although for me to get to the bottom of it, it would be better three times:)).
 
here is again the code just copied it from @rhumbaflappy


XML:
    <PartInfo>
    <Name>bpw_test</Name>
    <Visibility>
      <Parameter>
        <Code>
          (O:Weather.AmbientPrecipState, mask) 4.0 == if{ 1 } els{ 0 }
        </Code>
      </Parameter>
    </Visibility>
  </PartInfo>
 
Back
Top