I used the SimObject animation posted on Youtube as a reference, but it did not work well.
Please see the XML code I pasted and the Blender image.
Are there any flaws in this code or blender?
Please comment if you have any other images or codes you need.
Please see the XML code I pasted and the Blender image.
Are there any flaws in this code or blender?
Please comment if you have any other images or codes you need.
XML:
<?xml version="1.0" ?>
<ModelInfo guid="{4f2268af-215e-4a17-a8c9-cf0a5a193631}" version="1.1">
<LODS>
<LOD minSize="0" ModelFile="kakunouko"/>
</LODS>
<Animation guid="d05e84db-7da3-477f-abd7-7a307f2c61f3" length="250" name="door1" type="Sim" typeParam="AutoPlay" typeParam2="door1" />
<Animation guid="5ed0b426-613a-41c3-9d4b-375f752afeaa" length="250" name="door2" type="Sim" typeParam="AutoPlay" typeParam2="door2" />
<Animation guid="edc1bab0-37c7-4797-a149-ce5989b6f6eb" length="250" name="door3" type="Sim" typeParam="AutoPlay" typeParam2="door3"/>
<Animation guid="a7a80774-56e8-47e5-a1f2-2c2debb562d3" length="250" name="door4" type="Sim" typeParam="AutoPlay" typeParam2="door4"/>
<Animation guid="59231251-b910-423f-86cc-012b014f392a" length="250" name="door5" type="Sim" typeParam="AutoPlay" typeParam2="door5"/>
<DefaultState name="kakunouko"/>
<AnimGraph>
<DefaultState name="kakunouko"/>
<BlendTreeState name="kakunouko">
<Animations>
<Animation guid="d05e84db-7da3-477f-abd7-7a307f2c61f3" loop="False" speed="1"/>
<Animation guid="5ed0b426-613a-41c3-9d4b-375f752afeaa" loop="False" speed="1"/>
<Animation guid="edc1bab0-37c7-4797-a149-ce5989b6f6eb" loop="False" speed="1"/>
<Animation guid="a7a80774-56e8-47e5-a1f2-2c2debb562d3" loop="False" speed="1"/>
<Animation guid="59231251-b910-423f-86cc-012b014f392a" loop="False" speed="1"/>
</Animations>
</BlendTreeState>
</AnimGraph>
<!--
IF
(E:LOCAL TIME, Seconds) > 28800
AND
(E:LOCAL TIME, Seconds) < 64800
OR
(L:XMLVAR_YokeHidden1) = 1
(28800 / 60 / 60) = 8 AM
(64800 / 60 / 60) = 6 PM
THEN
PLAY ANIMATION TO 250
ELSE
PLAY ANIMATION TO 0
-->
<!-- old legacy code-->
<PartInfo>
<Name>door1</Name>
<AnimLength>250</AnimLength>
<Animation>
<Parameter>
<Code>
(E:LOCAL TIME, Seconds) 28800 > (E:LOCAL TIME, Seconds) 64800 < and (L:XMLVAR_YokeHidden1) 1 == or if{ 250 } els{ 0 }
</Code>
<Lag>10</Lag>
</Parameter>
</Animation>
</PartInfo>
<PartInfo>
<Name>door2</Name>
<AnimLength>250</AnimLength>
<Animation>
<Parameter>
<Code>
(E:LOCAL TIME, Seconds) 28800 > (E:LOCAL TIME, Seconds) 64800 < and (L:XMLVAR_YokeHidden1) 1 == or if{ 250 } els{ 0 }
</Code>
<Lag>10</Lag>
</Parameter>
</Animation>
</PartInfo>
<PartInfo>
<Name>door3</Name>
<AnimLength>250</AnimLength>
<Animation>
<Parameter>
<Code>
(E:LOCAL TIME, Seconds) 28800 > (E:LOCAL TIME, Seconds) 64800 < and (L:XMLVAR_YokeHidden1) 1 == or if{ 250 } els{ 0 }
</Code>
<Lag>10</Lag>
</Parameter>
</Animation>
</PartInfo>
<PartInfo>
<Name>door4</Name>
<AnimLength>250</AnimLength>
<Animation>
<Parameter>
<Code>
(E:LOCAL TIME, Seconds) 28800 > (E:LOCAL TIME, Seconds) 64800 < and (L:XMLVAR_YokeHidden1) 1 == or if{ 250 } els{ 0 }
</Code>
<Lag>10</Lag>
</Parameter>
</Animation>
</PartInfo>
<PartInfo>
<Name>door5</Name>
<AnimLength>250</AnimLength>
<Animation>
<Parameter>
<Code>
(E:LOCAL TIME, Seconds) 28800 > (E:LOCAL TIME, Seconds) 64800 < and (L:XMLVAR_YokeHidden1) 1 == or if{ 250 } els{ 0 }
</Code>
<Lag>10</Lag>
</Parameter>
</Animation>
</PartInfo>
</ModelInfo>
<!-- new non working msfs code-->
<!--
<Behaviors>
<Component ID="door1">
<UseTemplate Name="ASOBO_GT_Anim_Code">
<ANIM_NODE_ID>portDXEst</ANIM_NODE_ID>
<ANIM_NAME>door1</ANIM_NAME>
<ANIM_CODE>(E:LOCAL TIME, Seconds) 28800 > (E:LOCAL TIME, Seconds) 64800 < and if{ 250 } els{ 0 }</ANIM_CODE>
<ANIM_WRAP>1</ANIM_WRAP>
<ANIM_LENGTH>250</ANIM_LENGTH>
</UseTemplate>
</Component>
<Component ID="door2" Node="door2">
<Animation>
<Parameter>
<Code>
(E:LOCAL TIME, Seconds) 28800 > (E:LOCAL TIME, Seconds) 64800 < and if{ 250 } els{ 0 }
</Code>
<Lag>10</Lag>
</Parameter>
</Animation>
</Component>
<Component ID="door3" Node="door3">
<Animation>
<Parameter>
<Code>
(E:LOCAL TIME, Seconds) 28800 > (E:LOCAL TIME, Seconds) 64800 < and if{ 250 } els{ 0 }
</Code>
<Lag>10</Lag>
</Parameter>
</Animation>
</Component>
<Component ID="door4" Node="door4">
<Animation>
<Parameter>
<Code>
(E:LOCAL TIME, Seconds) 28800 > (E:LOCAL TIME, Seconds) 64800 < and if{ 250 } els{ 0 }
</Code>
<Lag>10</Lag>
</Parameter>
</Animation>
</Component>
<Component ID="door5" Node="door5">
<Animation>
<Parameter>
<Code>
(E:LOCAL TIME, Seconds) 28800 > (E:LOCAL TIME, Seconds) 64800 < and if{ 250 } els{ 0 }
</Code>
<Lag>10</Lag>
</Parameter>
</Animation>
</Component>
</Behaviors>
-->