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

FS2004 Chute XML script

Messages
246
Country
southafrica
Does anyone have a neat script for Gmax MakeMDL.xml for a drag chute that deploy with the tail hook, and only open once the gear touch the ground? and then be invisible if under 35 or 40 kts ?

That would be really appreciated.

Jakes:) I am starting to learn this XML script magic!!
 
For FSX? In that case you'll need a visibility condition. I don't know how to make it for FSX yet, I'm still learning, I knew for FS2004, but it doesn't work the same way...
 
For FSX? In that case you'll need a visibility condition. I don't know how to make it for FSX yet, I'm still learning, I knew for FS2004, but it doesn't work the same way...

I am modelling for FS9 in Gmax at this moment. once the model is complete, I will worry about FSX. so for FS9 would be great!
 
Here's the code.
I'm going to have to test it, I'm not sure:
Code:
      <part>
      <name>chute</name>

      <visible_in_range>
         <parameter>
            <code>
(A:VELOCITY BODY Z,knots) 50 &gt; 
(A:SPOILERS Position,percent) 90 &gt; 
(A:Plane alt above ground,feet) 1 &lt; 
and
</code>
         </parameter>
    <minvalue>-1</minvalue>  
    <maxvalue>0</maxvalue>  
      </visible_in_range>
   </part>

This will make the chute appear if the spoilers are on, the plane is on ground and if the speed is greater than 50 kts... Below 50 kts it will disappear...


We'll have to wait for n4gix... He's the expert on XML... Meanwhile, I'll keep trying...
 
Last edited:
:) what's wrong?
I already have spoilers on the Cheetah. any way I can activate it with the tailhook? maybe just replace the SPOILERS HANDLE POSITION with TAILHOOK_POSITION ?
 
Yeah, you can put that tailhook position and eliminate the Plane alt above ground condition... The problem is that with one condition it runs fine, but with the three it doesn't... But when I do this for animations it works fine...
 
There aren't enough "and"s in the <code> section above:

Code:
<code>
    (A:VELOCITY BODY Z,knots) 50 &gt; 
    (A:SPOILERS Position,percent) 90 &gt; 
    and
    (A:Plane alt above ground,feet) 1 &lt; 
    and
</code>

For tailhook use this:

Code:
<code>
    (A:VELOCITY BODY Z,knots) 50 &gt; 
    (A:TAILHOOK POSITION,percent) 90 &gt; 
    and
    (A:Plane alt above ground,feet) 1 &lt; 
    and
</code>

By the way, (A:SIM ON GROUND,bool) is the actual variable to detect if the a/c is actually on the ground... :D
 
Ok, tere is a few terms in XML scripting I don't understand:

&gt;

&lt;

the A: in (A:VELOCITY BODY Z,knots)

in the following term I understand that the tailhook have to be extended at least 90% for the rest of the actions to take place?

(A:TAILHOOK POSITION,percent) 90 &gt;

I don't just want to copy and paste scripts, without understanding them....
 
The &gt means "greater than";
The &lt means "less than";
The A: is an aircraft variable (I guess);

(A:TAILHOOK POSITION,percent) 90 &gt;

For the action to take place the tailhook must be 90% or greater extended.
 
Thank you all for the help so far!

at this moment, I get my chute to work with the following script:

Code:
<part>
      <name>chute</name>
      <visible_in_range>
         <parameter>
			<code>
(A:VELOCITY BODY Z,knots) 50 &gt;
(A:SIM on GROUND, bool) 
and
			</code>
         </parameter>
        <minvalue>1</minvalue>  
      </visible_in_range>
   </part>

However, I cannot add another trigger to the script, such as tailhook, or even spoilers. I've tried the scripts above, but no luck. Also tried to eliminate the problems by trying out Just the velocity and tailhook and Velocity and sim on ground, as well as the tailhook and sim on ground. The problem is with the tailhook or spoiler part.
maybe a IF variable with this script? lik IF tailhook is extended or something similar?
 
Last edited:
You want to put three variables, right?

Code:
<code>
(A:SIM ON GROUND, bool) 1;
(A:TAILHOOK POSITION, percent) 90 &gt;
and
(A:velocity body z, knots) 50 &gt;
and
</code>
You need to ad a semi-colon at the end of every variable value or fsx will pass through it without reading that variable. Like this:
(A:velocity body z, knots) 50 &gt;
 
Last edited:
Thanks, the only thing changed here are the sequence in which the are placed. does that matter? i am learning a lot today! :)
 
You need to ad a semi-colon at the end of every variable value or fsx will pass through it without reading that variable. Like this:
(A:velocity body z, knots) 50 &gt;

Maybe that is the problem... I am modelling for FS9, not FSX...
 
You need to ad a semi-colon at the end of every variable value or fsx will pass through it without reading that variable. Like this:
(A:velocity body z, knots) 50 &gt;

Actually, that isn't quite accurate. The semi-color is an integral part of the expression, not a delimiter. See the SDK for exact convention.

Code:
(A:SIM ON GROUND, bool) 1;

The semi-colon above is essentially meaningless, and in fact may cause the script evaluation to fail. ;)
 
maybe a IF variable with this script? lik IF tailhook is extended or something similar?

Jakes, everything contained within a <Visibility>xxx</Visibility> section is one "IF" statement... :D
 
Actually, that isn't quite accurate. The semi-color is an integral part of the expression, not a delimiter. See the SDK for exact convention.

Code:
(A:SIM ON GROUND, bool) 1;

The semi-colon above is essentially meaningless, and in fact may cause the script evaluation to fail. ;)

Really!? Wow, this is a bit diferent of C++ coding... I learned that the semi-colon was what told the program that the expression had finished so it wouldn't confuse it with the next expression...
 
Back
Top