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

MSFS20 ModelBehaviors Animation starting at a specific hour

Messages
23
Country
switzerland
Dear wise programmers,

I have now found out how to make an animation visible only at a specific time (midnight 0:00 to 0:01), but...
...the animation simply loops within this period. But my animation "tells a story" it has a beginning and an end and I do not want to start it somewhere randomly in between (depending on the moment, MSFS has started) and the loop of the animation is in when time comes to 00:00 midnight! I want to start my animation (first frame) at 0:00 and end the "animation storyline" at 0:01.

Who has an idea on how this could be done?

Thanks a lot for any kind of help.

Here my code up to now with the never ending and looping animation:
<?xml version="1.0" encoding="utf-8" ?>

<ModelInfo version="1.1" guid="{c9c287ec-bfec-44ad-6e11-0cda278f610d}">

<LODS>
<LOD MinSize="0" ModelFile="bfd_animation.gltf"/>
</LODS>

<Animation name="animation" guid="1bdbf674-d473-4f56-a0f9-490d95b0aa9e" type="Standard" typeParam="AutoPlay"/>

<AnimGraph>
<DefaultState name="animation"/>
<BlendTreeState name="animation">
<Animations>
<Animation guid="1bdbf674-d473-4f56-a0f9-490d95b0aa9e" speed="1.0"/>
</Animations>
</BlendTreeState>
</AnimGraph>

</ModelInfo>

<ModelBehaviors>
<Include Path="Asobo\Misc\SimObjects.xml"/>
<Component ID="animation" Node="animation">
<Visibility>
<Parameter>
<Code>(E:LOCAL TIME, Seconds) 0 &gt;= (E:LOCAL TIME, Seconds) 60 &lt;= and if{ 1 } els{ 0 }</Code>
</Parameter>
</Visibility>
</Component>

</ModelBehaviors>
 
Last edited:
Unfortunately not, in the Model behaviour setu of simobjects loop="False" is not working... loops and loops and loops...
 
ah I didn't know!
for SceneryObjects it works
I don't know how to do then .. :rolleyes:
I would have put it here

XML:
<AnimGraph>
<DefaultState name="animation"/>
<BlendTreeState name="animation">
<Animations>
<Animation guid="1bdbf674-d473-4f56-a0f9-490d95b0aa9e"  loop="False" speed="1.0"/>
</Animations>
</BlendTreeState>
</AnimGraph>

not into <ModelBehaviors> but into <Animations>
 
Last edited:
Hello,
@BfDelight : Have you find a solution ? I have exactly the same problem. How can the animation starts at frame 01 instead of random ?
@614NLV : is it possible to transform a SIMOBJECT into SCENERYOBJECT and how to do that ?
I am very interested for my canoe animation for NTTE Tetiaroa scenery
Thanks :)
https://fr.flightsim.to/file/20134/ntte-tetiaroa-captainfrag

Edit : @614NLV
I've tried to insert your code as you propose in the animation. arrived at 08:00 the object appears in the scene but doesn't animate.
is there a specific way to start the animation ?


XML:
<?xml version="1.0" encoding="utf-8" ?>

<ModelInfo version="1.1" guid="{ad17c6cc-8563-4ced-3fa6-5ced13aa9565}">

    <AnimGraph>
        <DefaultState name="pirogue"/>
        <BlendTreeState name="pirogue">
            <Animations>
                <Animation name="pirogue" guid="274126ab-7256-48ba-a5a0-12f19eeeb64d" loop="False" speed="1.0"/>
            </Animations>
        </BlendTreeState>
    </AnimGraph>

    <LODS>
        <LOD MinSize="0" ModelFile="pirogue.gltf"/>
    </LODS>

</ModelInfo>


<ModelBehaviors>

    <Component ID="pirogue" Node="pirogue">
            <Visibility>  
                    <Parameter>          
                        <Code> (E:LOCAL TIME, Seconds) 28800 &gt; (E:LOCAL TIME, Seconds) 64800 &lt; and if{ 1 } els{ 0 } </Code>  
                    </Parameter>
            </Visibility>
    </Component>

</ModelBehaviors>
 
Last edited:
Hello frag:),
I'm a bit rusty because i haven't opened the sdk for months
I try to answer you
is it possible to transform a SIMOBJECT into SCENERYOBJECT and how to do that?
sure, use the same gltf as a normal sceneryObj (put in the ModelLib folder)
however, you can't set conditions. You can animate it but if you want to trigger a condition you have to use as simObj

I don't have my files here now to check and my memory is not that good :D
but it seems that your xml file is wrong
is there a specific way to start the animation ?
the animation starts with the parameter
Code:
typeparam = "AutoPlay, Random"
and other parameters are missing in the xml file (type and typeparam2)
it seems that you have merged code of a sceneryObj with a simOBj... :rolleyes:

the best and also very simple thing to do is to look at the code of an other airport with simOb
the simObj folder is not compiled and you can see and study the code to get yours
this is one with S.O.
donwload it and look at the xml in the SimObjects folder
(or any other from flightsim.to)

Sorry if I'm no longer accurate, but I haven't opened mfs in months and I don't have my files here now to check
but I'm sure you will solve ;)
 
Hello 614NLV
Thanks for your answer.
I've downloaded BAHROMETRIX's scenery as you propose to unsderstand the way to use XML files and SIMOBJECTS.
I now can use simobjects and use xml script. just bocked while using several simobjects ... but I wanna find why ;)
Wish U the best.
 
Back
Top