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

Custom Animations

Messages
64
Country
us-texas
I'm wanting to convert the following fs9 code to fsx. If possable could somebody explane in detail and mabe show me the conversion process. The following code is Nick Blacks (MAIW) canopy animation. This is the way I have it set up in modeldef. and yes I've read the sdk etc.(I'm still confused)

<Animation name="anim_canopy_fresh_air" guid="1C8F5326-BE77-4a51-A496-CF2889292504" length="50" type="Sim" typeParam2="anim_canopy_fresh_air" typeParam="AutoPlay" />

-------------------------------------------------------------
<part>
<name>anim_canopy_fresh_air</name>
<animation>
<parameter>
<code>
(A:LIGHT NAV, bool)
if{ (A:ENG1 COMBUSTION, bool)
if{ (A:LIGHT STROBE, bool) if{ 0 } els{ 25 } }
els{ 50 }
}
els{ 0 }
</code>
<lag>20</lag>
</parameter>
</animation>
</part>
--------------------------------------------------------------------
Also do you have to go through the animations manager in gmax for the xtomdl to reconize the animation?
Any help would be greatly appreciated !!
James
 
I'm wanting to convert the following fs9 code to fsx. If possable could somebody explane in detail and mabe show me the conversion process. The following code is Nick Blacks (MAIW) canopy animation. This is the way I have it set up in modeldef. and yes I've read the sdk etc.(I'm still confused)

--------------------------------------------------------------------
Also do you have to go through the animations manager in gmax for the xtomdl to reconize the animation?
Any help would be greatly appreciated !!
James

What is so difficult about Capitalizing the <Tags> and correcting them to FSX standard (i.e., <part> becomes <PartInfo>, etc.)?

Add one new line for <AnimLength> to specify the total keyframes used.

And yes, you must use the Animation Manager in GMax to assign the XML script to the selected part.
Code:
<Animation name="anim_canopy_fresh_air" guid="1C8F5326-BE77-4a51-A496-CF2889292504" length="50" type="Sim" typeParam2="anim_canopy_fresh_air" typeParam="AutoPlay" />

<PartInfo>
  <Name>anim_canopy_fresh_air</Name>
  <AnimLength>50</AnimLength>
  <Animation>
    <Parameter>
      <Code>
        (A:LIGHT NAV, bool)
        if{ (A:ENG1 COMBUSTION, bool)
          if{ (A:LIGHT STROBE, bool) if{ 0 } els{ 25 } }
          els{ 50 }
        }
        els{ 0 }
      </Code>
      <Lag>20</Lag>
    </Parameter>
  </Animation>
</PartInfo>
 
Thank you Bill. just ignore the email I sent asking the same question.

Oh, I did - just as soon as I saw you'd asked the question here as well.

I always prefer to make my replies in a forum so others can see the answer, plus script is displayed "prettier" in a forum than it is in an email. :D
 
Re: Custom anim

Thank you Bill. However I've made the changes in my script but it still is'nt working. Could it have to something to do with the variables etc. I;m still playing with it trying to figure it out.(just a matter of time).

By the way Love your work, your planes are very nice.
James Abbott
 
Hi James,

Bill has made a perfect conversion. I am still wondering why the engine combustion and Nav light have to do with fresh air. Why not use a mouse
to open the canopy for fresh air and speed above 10 knots to produce sound. Although that takes a sound module.

So you need to post here what you want this canopy to do. Because i am
confused and agree it is your parameter.

Another suggestion is to try converting a simple switch to make sure you
are in fact using your Gmax animation manager correctly.

DG:eek:
 
Re: Custom anim

Hey fellas, sorry for the confusion, I should have stated that this script is for a AI model etc. "Sorry" I did'nt even think about it. The purpose for this script is so the canopy will open however far you have it anim to at(50) and when it leaves the parking spot the canopy will close however far you have it anim to at(25) until it gets to the hold short/runway and then closes before it gos to the start position.

Sorry I did'nt state that this is for an AI model. My mistake !!
James
 
I have been trying to get a key-frame animation to work for over a month now. Finding it a bit difficult.

I wonder if AI has all L:var's turned off? However, I do note that my own planes, set up as AI in flight plans will have the passengers show up when the engine starts, etc, so maybe it still has L:var's functioning, (in AI planes).



Bill
 
Your code is working. I was wonder, when does the AI turn the strobe light on? Because i have no idea what the AI does for lights. I updated your code
to close the canopy when the speed is above 20 knots. But if the AI turns the
strobe on at the runway. Well then your code is fine.

Code:
<PartInfo>
  <Name>anim_canopy_fresh_air</Name>
  <AnimLength>50</AnimLength>
  <Animation>
    <Parameter>
      <Code>
        (A:LIGHT NAV, bool)
        if{ (A:ENG1 COMBUSTION, bool)
          if{ (A:AIRSPEED INDICATED, knots) 20 &gt; if{ 0 } els{ 25 } }
          els{ 50 }
        }
        els{ 0 }
      </Code>
      <Lag>20</Lag>
    </Parameter>
  </Animation>
</PartInfo>

DG:eek:
 
Bill O,

AI aircraft do not use gauge code. L:vars originate in gauge code.

AI aircraft use A:vars, but not all. They appear to not use any A:var that is there primarily to be used in gauge code. You can access the A:vars AI use by making it the Selected aircraft within map C: variables, they are then known as S:vars. You can get a value for throttle position, but not a value for RPM. For example: (C:ITrafficInfo:S:GENERAL ENG THROTTLE LEVER POSITION:1,PERCENT) will tell you where the throttle is, but if you try (C:ITrafficInfo:S:GENERAL ENG RPM:0,rpm) you get a big fat Zero.

You can get all values to do with aerodynamic values like pitch, bank, roll, AOA, speed, etc, so you can monitor an AI in flight. See

http://www.fsdeveloper.com/forum/showthread.php?t=49157

Since L:vars are only initiated within gauge code that AI do not use, my conclusion is that L:vars and AI are a NO NO.

Roy
 
Re: Custom anim

Thanks to all of you. It has been a learning process (never ending).
Needless to say I'm still confused, but I'm working on it.

James
 
Bill O,

AI aircraft do not use gauge code. L:vars originate in gauge code.

<snipped for brevity>

Since L:vars are only initiated within gauge code that AI do not use, my conclusion is that L:vars and AI are a NO NO.

Actually, that's not entirely accurate. We can include XML scripts in the AI's .mdl file(s) if we wish...

In fact, it's entirely possible to create a "nearly gaugeless" (as in panel.cfg gauged) flyable model by simply embedding all of the XML script in the model(s).

I use the condition "nearly gaugeless" simply because all user flown a/c require at least a minimal ..\panel folder and panel.cfg to be seen in FSX's menu of aircraft!

For AI a/c, all one needs is a single, tiny polygon to which one might assign a <Visibility> tag.

Here is an example. I place this script into a very minimal "xxx_interior.mdl" file, and a companion bit of script into the xxx.mdl file (exterior). The aim is to make it difficult for anyone to try aliasing another yyy_interior.mdl file and convert the AI exterior model into a "flyable" one... :rotfl:

Code:
  <PartInfo>
    <Name>IntLoaded</Name>
    <Visibility>
      <Parameter>
        <Code>
          <!-- INITIALIZATION ROUTINE(S) -->
          (L:Init6,bool) 0 ==
          if{
          a90d74 (>L:ffb128e17,enum)
          1 (>L:Init6,bool)
          }
          <!-- END INITIALIZATION ROUTINE(S) -->
        </Code>
      </Parameter>
    </Visibility>
  </PartInfo>
 
Back
Top