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

Animations Question

Messages
7
Country
us-southcarolina
Hi Gents
I am almost done with the animations of my models under Max2012 before exporting to FSX.
However how do I assign the animations for the engine's exhaust, the afterburner and the slats in FSX animations manager?
Is there a code to write?
If so where could I find the template of the code please.
Thanks for your answers
 
Look into the modeldef.xml. I think it might just have an entry for everything you want (nozzle, afterburner, slats).

If the slats extend with the flaps, you can also just use the flap animation for tagging.
 
For the slats use the variable "LEADING EDGE FLAPS LEFT PERCENT" and "LEADING EDGE FLAPS RIGHT PERCENT"

For the engine smoke you need to make a small one sided poly at the end of each engine and then attach some effects to it.

Read more here:
http://msdn.microsoft.com/en-us/library/cc526974.aspx#AddingLights

The example is for lights, but it's the same procedure for other effects.
You will also need to make a new visible code in your modeldef.xml to trigger the effect or else it will be turned on all the time.

The same goes for the afterburner.

It just depends on what you are after.
You can also make a cone behind the engine and add some transparent texture to it and use some visible code to it so it will only show when the afterburner is engaged.

Play around :)

And for the code check your default modeldef.xml and look for "Afterburner_Engine1_Stage1"
You will find all the codes from there and down.

For them to work you also need your aircraft.cfg to read
afterburner_available = 1

You find it under
[TurbineEngineData]
 
Last edited:
Only grammar gurus. ;)


In case a default afterburner tag does not exist:

Code:
<PartInfo>
	<Name>Engine 1 Afterburner</Name>
	<Visibility>
	  <Parameter>
		<Code>
		  (A:TURB ENG AFTERBURNER:1,bool) 1 == if{ 1 } els { 0 }
		</Code>
	  </Parameter>
	</Visibility>
  </PartInfo>

<PartInfo>
	<Name>Engine 2 Afterburner</Name>
	<Visibility>
	  <Parameter>
		<Code>
		  (A:TURB ENG AFTERBURNER:2,bool) 1 == if{ 1 } els { 0 }
		</Code>
	  </Parameter>
	</Visibility>
  </PartInfo>

1) Create textured afterburner model.
2) Add above code to modeldef.xml
3) Tag afterburner models with the above code by using the visibility tool.



If you have a multistage afterburner, there's also (A:TURB ENG AFTERBURNER STAGE ACTIVE, number) and (A:TURB ENG AFTERBURNER PCT ACTIVE, percent), but I don't know how FSX defines the available stages or percentages for afterburners.


- Edit: Or what Daniel said.
 
Hi Gents
No I'm trying to create a convergent/divergent nozzle for my jet. I'm attempting to perform the following function:
1/Idle power and below: Nozzle fully open (100deg)
2/Idle to Mil: Nozzle converge to 0 deg from 100 deg
3/Afterburner: Nozzle opens to 100 deg

I entered the following xml data:
<PartInfo>
<name>Nozzle</name>
<AnimLength>100</AnimLength>
<Animation>
<Parameter>
<Code>
(A:GENERAL ENG THROTTLE LEVER POSITION:1, Percent) 10 &lt; if{
100
} els{
(A:GENERAL ENG THROTTLE LEVER POSITION:1, Percent) 85 &lt; if{
(A:GENERAL ENG THROTTLE LEVER POSITION:1, Percent) 10 - 75 / 100 *
} els{
100
}
}
</Code>
<Lag>100</Lag>
</Parameter>
</Animation>
</PartInfo>

But the effect is that the nozzle opens and closes by itself.
Where did I fail in the coding please?
 
I guess the easiest way of achieving this is to just make the animation look like this:

KF : 0 Nozzle fully open
KF : 40 Nozzle at it's smallest diameter.
KF : 50 Nozzle fully open

Of course you need to play around the keyframes so it matches when the afterburner kicks in.

Code:
    <PartInfo>
        <Name>lever_throttle</Name>
        <AnimLength>50</AnimLength>
        <Animation>
            <Parameter>
                <Code>
            (A:GENERAL ENG THROTTLE LEVER POSITION:1, part) s0 0 &gt;= if{ l0 -50 * 50 + } els{ l0 (A:THROTTLE LOWER LIMIT, part) / 1 + 50 * }
          </Code>
            </Parameter>
        </Animation>
        <MouseRect>
            <Cursor>Hand</Cursor>
            <HelpID>HELPID_GAUGE_THROTTLE_THROTTLE</HelpID>
            <TooltipID>TOOLTIPTEXT_THROTTLE_THROTTLE_PERCENT</TooltipID>
            <MouseFlags>LeftSingle+LeftDrag+Wheel</MouseFlags>
            <CallbackDragging>
                <Variable>GENERAL ENG THROTTLE LEVER POSITION:1</Variable>
                <Units>percent</Units>
                <Scale>163.84</Scale>
                <YScale>-163.84</YScale>
                <MinValue>-16384</MinValue>
                <MaxValue>16384</MaxValue>
                <EventID>THROTTLE1_SET</EventID>
            </CallbackDragging>
        </MouseRect>
    </PartInfo>

Btw, when you are posting there is a button that looks like "#" that makes a code section for you to post your code in.
Makes it much more easier to read :)
 
Back
Top