• 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 Animation autoplay only once?

Messages
23
Country
switzerland
Dear community.

I am nearly arrived at the final target with my animation that shall be played only between 0:00 and 0:01 time (it's a midnight ghost).

My animation is made in blender and 780 frames long (that is about 13 to 26 seconds long, depending on the framerates of the MSFS running fps).

The last question is: How can I make the animation only be triggered once and not repeated constantly between 0:00 and 0:01 LOCAL TIME?

My idea was to "cut" the <Visibility> condition to LOCAL TIME from 0:00 and 0:13. But if a gamer is running at lower fps than 60 the animation will be cutted somewhere because the <Visibility> condition makes it disappear.

Are there any variables other than "Autoplay", something like Autoplay only once?

Thanks a lot for any help and.... Merry Christmas to all of you and have a happy new year!

Here is my "tested and working" complete XML:

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

<ModelInfo version="1.1" guid="{65e7cdab-22ee-46bb-6990-bfc4c503ce68}">

<LODS>
<LOD MinSize="25" ModelFile="bfd_test.gltf"/>
<LOD MinSize="0" ModelFile="bfd_test_LOD01.gltf"/>
</LODS>

<Animation name="Ghost" guid="71fffad9-c36d-439e-8a39-fe3e4d362d90" type="Standard" typeParam="AutoPlay"/>

</ModelInfo>

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

</ModelBehaviors>
 
Thanks 614NLV, but still looping... have I placed that code wrongly:

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

<ModelInfo version="1.1" guid="{65e7cdab-22ee-46bb-6990-bfc4c503ce68}">

<LODS>
<LOD MinSize="25" ModelFile="bfd_test.gltf"/>
<LOD MinSize="0" ModelFile="bfd_test_LOD01.gltf"/>
</LODS>

<Animation name="Ghost" guid="71fffad9-c36d-439e-8a39-fe3e4d362d90" type="Standard" typeParam="AutoPlay" loop="False"/>

</ModelInfo>

<ModelBehaviors>
<Include Path="Asobo\Misc\SimObjects.xml"/>
<Component ID="Ghost" Node="Ghost">
<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>
 
and this is also still looping, what am I doing wrong? See:

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

<ModelInfo version="1.1" guid="{65e7cdab-22ee-46bb-6990-bfc4c503ce68}">

<LODS>
<LOD MinSize="25" ModelFile="bfd_test.gltf"/>
<LOD MinSize="0" ModelFile="bfd_test_LOD01.gltf"/>
</LODS>

<Animation name="Ghost" guid="71fffad9-c36d-439e-8a39-fe3e4d362d90" type="Standard" typeParam="AutoPlay"/>

<AnimGraph>
<DefaultState name="Ghost"/>
<BlendTreeState name="Ghost">
<Animations>
<Animation guid="71fffad9-c36d-439e-8a39-fe3e4d362d90" loop="False" speed="1.0"/>
</Animations>
</BlendTreeState>
</AnimGraph>

</ModelInfo>

<ModelBehaviors>
<Include Path="Asobo\Misc\SimObjects.xml"/>
<Component ID="Ghost" Node="Ghost">
<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>
 
I honestly don't know exactly
I have put this parameter in my animation and it works fine.
But I added it in a simple animation, without the visibility parameter.
In my xml file the loop parameter is inside <AnimGraph>
I think you will have to do some trying to find its right place if you want to use <ModelBehaviors>
I believe that if you remove <ModelBehaviors> as a test the loop will work ...

This is my simple animation, but I don't think it will help you much

XML:
<?xml version="1.1" encoding="utf-8"?>
<ModelInfo guid="{514a9e68-1699-4671-3b3c-8b2b7ec9f2a2}" version="1.1">
    <LODS>
        <LOD ModelFile="LIMBhangar.gltf" minSize="0"/>
    </LODS>
    <Animation guid="89687020-0184-45df-9174-32ab9631e013" name="P1Action" type="Standard"/>
        <Animation guid="6b452e50-8ee5-4385-9bcb-2d9fbdb9426d" name="P2Action" type="Standard"/>
        <Animation guid="06677982-d7f8-4a96-a7fb-b9bb3fccbb2e" name="P3Action" type="Standard"/>
        <Animation guid="cb67ea1a-3862-4a93-bd8a-585ff9001993" name="P4Action" type="Standard"/>
        <AnimGraph>
        <DefaultState name="LIMBhangar_blend"/>
        <BlendTreeState name="LIMBhangar_blend">
                <Animations>
                    <Animation guid="89687020-0184-45df-9174-32ab9631e013" loop="False" speed="1.0"/>
                    <Animation guid="6b452e50-8ee5-4385-9bcb-2d9fbdb9426d" loop="False" speed="1.0"/>
                    <Animation guid="06677982-d7f8-4a96-a7fb-b9bb3fccbb2e" loop="False" speed="1.0"/>
                    <Animation guid="cb67ea1a-3862-4a93-bd8a-585ff9001993" loop="False" speed="1.0"/>
                </Animations>
            </BlendTreeState>
        </AnimGraph>
    </ModelInfo>
 
Back
Top