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

XML code - specifying the opposite

Messages
158
Country
unitedkingdom
I'm building an AI Avro Vulcan for FS9 and FSX. In the tail cone is a brake chute housing with a cover on top. In fact there are two covers, one in the down position and one up.

chutexml.jpg


The chute and the up cover deploys (become visible) on touch down when two conditions are met:

1. The flaps are down (the Vulcan doesn't have flaps but the entry is in the aircraft.cfg for this purpose only).

2. The aircraft is on the ground.

I could choose to have one animated cover that rotates upwards to 45 degrees, but since the chute deploys instantaneously, the cover movement should be instantaneous too. The simplest solution is to tag a single cover as a "spoiler" and that works well in that function. However, the cover tends to flap around when the spoilers are actually used in flight. I've dropped that method.

This is the FSX xml code to show the cover up and the chute deployed (the chute is linked to the up cover) and it works fine:

<PartInfo>
<Name>drag_chute</Name>
<Visibility>
<Parameter>
<Code>
(A:SIM ON GROUND,bool)
(A:TRAILING EDGE FLAPS RIGHT PERCENT,PERCENT) 1 &gt; &amp;&amp;
</Code>
</Parameter>
</Visibility>
</PartInfo>

What I need is the reverse of the code to apply to the cover down part, ie when the two conditions are not true and the down cover is visible. I've done that successfully in the FS9 version with the following two lines:

<minvalue>-1</minvalue>
<maxvalue>0</maxvalue>

I've tried that in FSX but it doesn't work. Maybe it needs an "else" statement. I'm sure the answer is very simple. Could someone put me right please?

John
 
Code:
<PartInfo>
 <Name>drag_chute</Name>
 <Visibility>
 <Parameter>
 <Code>
 (A:SIM ON GROUND,bool) 0 !=
 (A:TRAILING EDGE FLAPS RIGHT PERCENT,PERCENT) 1 &gt;
 and
 if{ 1 }
els{ 0 }
 </Code>
 </Parameter>
 </Visibility>
 </PartInfo>

Code:
<PartInfo>
 <Name>drag_chute_cover_down</Name>
 <Visibility>
 <Parameter>
 <Code>
 (A:SIM ON GROUND,bool) 1 !=
 (A:TRAILING EDGE FLAPS RIGHT PERCENT,PERCENT) 1 &lt;
 and
 if{ 1 }
els{ 0 }
 </Code>
 </Parameter>
 </Visibility>
 </PartInfo>


Don't forget to tag both with the Visibility tool.
 
Thanks Heretic. The chute cover displays correctly in the up position on touchdown using the code I had, but when I use the second block of your code for the cover in the down position, the cover doesn't show at all at any time. I copied and pasted the text directly so I think that's right and the indentation looks OK:

code.jpg


The attachpoint tool finds the tag OK and I have confirmed it is there in the part properties. Not sure what to try next.

John
 
Indentation does not matter at all.


Try this:

Code:
<PartInfo>
 <Name>cover_drag_chute_down</Name>
 <Visibility>
 <Parameter>
 <Code>
 (A:SIM ON GROUND,bool) 0 !=
 (A:TRAILING EDGE FLAPS RIGHT PERCENT,PERCENT) 1 &gt;
 and
 if{ 0 }
els{ 1 }
 </Code>
 </Parameter>
 </Visibility>
 </PartInfo>

The second code is actually unnecessary, as the "cover down" part just needs to display when the conditions for displaying the "cover up" part are NOT met.
Hence, just inverting the result for the same conditions should do the trick.
 
Um, those conditions are not correct at all. You want the cover down to display at all times except when the chute is deployed.

Since the only time the chute would be deployed is when the a/c is on the ground and flaps are greater than 1%...

Code:
  <PartInfo>
    <Name>drag_chute_cover_down</Name>
    <Visibility>
      <Parameter>
        <Code>
          (A:SIM ON GROUND,bool)
          (A:TRAILING EDGE FLAPS RIGHT PERCENT,PERCENT) 1 &gt;
          and
          if{ 0 }
          els{ 1 }
        </Code>
      </Parameter>
    </Visibility>
  </PartInfo>

The above will only cause the cover to "disappear" if both conditions are TRUE, meaning that by default the cover will appear...
 
Back
Top