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

FSXA [Solved]Gauge to ModelDef, any XML changes required?

Here you go, then, purely playful stuff for concept testing. Note, have reduced anim length to 50, kept some of your vars, made some assignments and logic, introduced a new var that holds the animation, which is trivial. Forgive me for being sparing with the indentations. The explanation for the final "reminder" line can be found in this thread https://www.fsdeveloper.com/forum/threads/why-wont-this-rotate.444116/post-810600
Code:
<Animation name="Pelicandrome_Guidage_anim1" guid="994959c3-90d4-4f94-b229-8ef5ba9d5c91" length="50" type="Sim" typeParam2="Pelicandrome_Guidage_anim1" typeParam="AutoPlay" />
<PartInfo>
<Name>Pelicandrome_Guidage_anim1</Name>
<AnimLength>50</AnimLength>
<Animation><Parameter>
<Code>
  (L:Peli_Timer, number) 0 &gt;= if{ (L:Peli_CurrentStatus, number) ++ (>L:Peli_CurrentStatus, number) }
  (L:Peli_CurrentStatus, number)      300 &gt; if{ 50 (>L:animcheck,enum) }
  els{ (L:Peli_CurrentStatus, number) 200 &gt; if{ 25 (>L:animcheck,enum) }
  els{ (L:Peli_CurrentStatus, number) 100 &gt; if{ 10 (>L:animcheck,enum) } } }
  (L:animcheck,enum) d
</Code>
</Parameter></Animation></PartInfo>
 
Last edited by a moderator:
Hello,

It finally occurred to me yesterday evening that I want to add this specific animation not to the user’s airplane, but to a ground vehicle added by FireFighterX.
So I assigned mjahn’s test code to my MDL and used the MDL as the external model of the current airplane. The animation ran as expected.
But when I used the very same MDL for the ground vehicle, the animation didn’t run. I’ll double-check that tonight (I’m pretty mistake-prone as this thread suggests).
This might be the key of all this!
 
L: variables usually do not work for AI aircraft, and it might be similar for this as well?
 
So now I am positive : the test code kindly posted by mjahn runs when the MDL is the current airplane's model, but not if used for a ground vehicle.
That was it all along... Happy to have found out why.

I guess I have to go the "gauge" route then. Not optimal, but it works! @tgibson : Lvars can be used for defining the anim keyframes (this very anim does work indeed with "100 (L: peli_CurrentStatus, number) * (L: peli_Timer, number) +"), but it seems that "complex" calculations will fail.

Anyway, thanks to all of you for your kind help and instructive feedback!
 
How about if it loop animation using "ambient" script, I use this for my airport, it work well, dunno if it apply in AI.
 
Back
Top