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

2 Variable XML part code

Messages
549
Country
nicaragua
Hi!
Is it possible to make an XML animation for a part with two variables? For example I want to make two small air admissions pop out when the speed is greater than 250kts and the altitude is greater than 25000 ft.
I only seem to be capable of making them pop out with only on of the variables:
Code:
<part>
    <name>aux_intake_flaps</name>
<animation>
<parameter>
<code>(A:VELOCITY BODY Z,knots) 250 &gt; 
if{ 100 }
els{ 0 }
</code>
<lag>60</lag>      
</parameter>
	</animation>
</part>
 
You can specify multiple conditions easily. Simply add the new conditional check followed by the conjunction desired:
'and' if both must be true
'or' if either must be true

Code:
<code>
      (A:VELOCITY BODY Z,knots) 250 &gt; 
      (A:Indicated Altitude,feet) 25000 &gt;
      and
      if{ 100 }
      els{ 0 }
</code>
 
Ahhhh.....

Thanks. I learned from this as well.

It all makes sense when you stack strings instead of one continuous string....

<--- copies this and stashes it away in my gauge code reference folder....


Bill
 
Well, I've certainly always thought it makes more sense to use the Enter and Tab keys to format code or script to make it easier on the eyes! :D
 
Hi, can someone tell me what's the code for "smaller", because I want a certain part to animate when the speed is smaller than 200 kts...
I know "greater" is "gt"
 
Hi, can someone tell me what's the code for "smaller", because I want a certain part to animate when the speed is smaller than 200 kts...
I know "greater" is "gt"

Er, not quite:

&gt; is "greater than"

&lt; is "less than"

You know, all of this is in the SDK in the XML Gauges chapter... ;)
 
Ok, thanks! I won't bother you very often now!:D
Anyways this community is always my first resort...
 
Back
Top