• 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 LOCAL DAY OF WEEK variable refuses to work during the weekend

Messages
53
Country
netherlands
Hello fellow dev's!

I'm currently working on an animation for opening hangar doors. After a lot of struggles I've had a small victory today. I got the code to work! Except for... during the weekend. Everything works perfectly. I've got the code set so the doors open at different times on different days to make it more life-like. To achieve this, I’m using the environment variable LOCAL DAY OF WEEK plus a couple of other variables to create certain conditions for the doors to open.

I’ve already found a major issue with the SDK, stating that the week starts as 0 on Monday. After testing I’ve found that Monday are 1, Tuesdays are 2, etc. When using (E: LOCAL DAY OF WEEK, Number) 1 < > 0 == or 6 == for that matter, the code doesn’t work. Not stand alone, not in combination with any other code.

Is Asobo assuming that weekends don’t count as day of the week? Does anyone have any suggestion, or preferably, a solution?
 
Why not include your XML file so no one needs to guess?
 
Well, I'm back at the office and I've even tried to see if changing LOCAL DAY OF WEEK to ZULU DAY OF WEEK changes anything. The thing is, it doesn't! To me it seems that Asobo is so bureaucratic that the game refuses to work during the weekend. I just wonder if it’s so French that if we’re demanding too much of our add-ons, the game is going to strike! ;-)

But here's the xml: (it's the line in bold that has the weekend in it)

<?xml version="1.0" encoding="utf-8"?>
<ModelInfo guid="{ad348217-e86a-4a97-8b27-ad8e7ca95ec5}" version="1.1">
<LODS>
<LOD minSize="60" ModelFile="PH_SimObject_EHLE_03_Vliegclub_Flevo_Hangar_Doors_LOD00.gltf"/>
<LOD minSize="30" ModelFile="PH_SimObject_EHLE_03_Vliegclub_Flevo_Hangar_Doors_LOD01.gltf"/>
<LOD minSize="20" ModelFile="PH_SimObject_EHLE_03_Vliegclub_Flevo_Hangar_Doors_LOD02.gltf"/>
<LOD minSize="0" ModelFile="PH_SimObject_EHLE_03_Vliegclub_Flevo_Hangar_Doors_LOD03.gltf"/>
</LODS>

<Animation guid="2d831548-5539-42b9-bb50-085b0a72decb" length="1000" name="EHLE_03_Vliegclub_Flevo_Garage_Door_Divider_3-4" type="Sim" typeParam="AutoPlay" typeParam2="EHLE_03_Vliegclub_Flevo_Garage_Door_Divider_3-4"/>
<Animation guid="9d444f36-acab-4d2c-9cc4-3009b6aed656" length="1650" name="EHLE_03_Vliegclub_Flevo_Garage_Door_Divider_5-6" type="Sim" typeParam="AutoPlay" typeParam2="EHLE_03_Vliegclub_Flevo_Garage_Door_Divider_5-6"/>
<Animation guid="86ec8cc5-6091-4280-87a7-d8428e0a4122" length="1000" name="EHLE_03_Vliegclub_Flevo_Garage_Door_3" type="Sim" typeParam="AutoPlay" typeParam2="EHLE_03_Vliegclub_Flevo_Garage_Door_3"/>
<Animation guid="eeb6b104-708e-4fc4-8304-079bf0a4f79d" length="1000" name="EHLE_03_Vliegclub_Flevo_Garage_Door_4" type="Sim" typeParam="AutoPlay" typeParam2="EHLE_03_Vliegclub_Flevo_Garage_Door_4"/>
<Animation guid="0757ad17-2231-4176-be87-893f90a1003f" length="1650" name="EHLE_03_Vliegclub_Flevo_Hangar_Door_5" type="Sim" typeParam="AutoPlay" typeParam2="EHLE_03_Vliegclub_Flevo_Hangar_Door_5"/>
<Animation guid="8228811a-df34-43fe-8f80-4694565e5321" length="1650" name="EHLE_03_Vliegclub_Flevo_Hangar_Door_6" type="Sim" typeParam="AutoPlay" typeParam2="EHLE_03_Vliegclub_Flevo_Hangar_Door_6"/>

<DefaultState name="PH_SimObject_EHLE_03_Vliegclub_Flevo_Hangar_Doors"/>

<AnimGraph>
<DefaultState name="PH_SimObject_EHLE_03_Vliegclub_Flevo_Hangar_Doors"/>
<BlendTreeState name="PH_SimObject_EHLE_03_Vliegclub_Flevo_Hangar_Doors"/>
<Animations>
<Animation guid="2d831548-5539-42b9-bb50-085b0a72decb" loop="False" speed="1"/>
<Animation guid="9d444f36-acab-4d2c-9cc4-3009b6aed656" loop="False" speed="1"/>
<Animation guid="86ec8cc5-6091-4280-87a7-d8428e0a4122" loop="False" speed="1"/>
<Animation guid="eeb6b104-708e-4fc4-8304-079bf0a4f79d" loop="False" speed="1"/>
<Animation guid="0757ad17-2231-4176-be87-893f90a1003f" loop="False" speed="1"/>
<Animation guid="8228811a-df34-43fe-8f80-4694565e5321" loop="False" speed="1"/>
</Animations>
</AnimGraph>

<!-- DOORS 3-4 -->
<!-- MONDAY & TUESDAY -->
<PartInfo>
<Name>EHLE_03_Vliegclub_Flevo_Garage_Door_Divider_3-4</Name>
<AnimLength>1000</AnimLength>
<Animation>
<Parameter>
<Code>
(E:ZULU DAY OF WEEK, Number) 0 &gt; (E:ZULU DAY OF WEEK, Number) 3 &lt; (E:TIME OF DAY, Enum) 0 &gt; (E:TIME OF DAY, Enum) 2 &lt; (E:LOCAL TIME, Seconds) 46799 &gt; (E:LOCAL TIME, Seconds) 55800 &lt; (A:AMBIENT PRECIP STATE, Enum) 4 &lt; and and and and and and
(E:ZULU DAY OF WEEK, Number) 2 &gt; (E:ZULU DAY OF WEEK, Number) 4 &lt; (E:TIME OF DAY, Enum) 0 &gt; (E:TIME OF DAY, Enum) 3 &lt; (E:LOCAL TIME, Seconds) 42299 &gt; (E:LOCAL TIME, Seconds) 64800 &lt; (A:AMBIENT PRECIP STATE, Enum) 4 &lt; and and and and and and
or
(E:ZULU DAY OF WEEK, Number) 3 &gt; (E:ZULU DAY OF WEEK, Number) 5 &lt; (E:TIME OF DAY, Enum) 0 &gt; (E:TIME OF DAY, Enum) 2 &lt; (E:LOCAL TIME, Seconds) 44999 &gt; (E:LOCAL TIME, Seconds) 61200 &lt; (A:AMBIENT PRECIP STATE, Enum) 4 &lt; and and and and and and
or
(E:ZULU DAY OF WEEK, Number) 4 &gt; (E:ZULU DAY OF WEEK, Number) 6 &lt; (E:TIME OF DAY, Enum) 0 &gt; (E:TIME OF DAY, Enum) 3 &lt; (E:LOCAL TIME, Seconds) 43199 &gt; (E:LOCAL TIME, Seconds) 66600 &lt; (A:AMBIENT PRECIP STATE, Enum) 4 &lt; and and and and and and
or
(E:ZULU DAY OF WEEK, Number) 5 &gt; (E:ZULU DAY OF WEEK, Number) 1 &lt; (E:TIME OF DAY, Enum) 0 &gt; (E:TIME OF DAY, Enum) 3 &lt; (E:LOCAL TIME, Seconds) 32399 &gt; (E:LOCAL TIME, Seconds) 70200 &lt; (A:AMBIENT PRECIP STATE, Enum) 4 &lt; and and and and and and
or if{ 1000 } els{ 0 }
</Code>
<Lag>25</Lag>
</Parameter>
</Animation>
</PartInfo>
<PartInfo>
<Name>EHLE_03_Vliegclub_Flevo_Garage_Door_3</Name>
<AnimLength>1000</AnimLength>
<Animation>
<Parameter>
<Code>
(E:ZULU DAY OF WEEK, Number) 0 &gt; (E:ZULU DAY OF WEEK, Number) 3 &lt; (E:TIME OF DAY, Enum) 0 &gt; (E:TIME OF DAY, Enum) 2 &lt; (E:LOCAL TIME, Seconds) 46799 &gt; (E:LOCAL TIME, Seconds) 55800 &lt; (A:AMBIENT PRECIP STATE, Enum) 4 &lt; and and and and and and
(E:ZULU DAY OF WEEK, Number) 2 &gt; (E:ZULU DAY OF WEEK, Number) 4 &lt; (E:TIME OF DAY, Enum) 0 &gt; (E:TIME OF DAY, Enum) 3 &lt; (E:LOCAL TIME, Seconds) 42299 &gt; (E:LOCAL TIME, Seconds) 64800 &lt; (A:AMBIENT PRECIP STATE, Enum) 4 &lt; and and and and and and
or
(E:ZULU DAY OF WEEK, Number) 3 &gt; (E:ZULU DAY OF WEEK, Number) 5 &lt; (E:TIME OF DAY, Enum) 0 &gt; (E:TIME OF DAY, Enum) 2 &lt; (E:LOCAL TIME, Seconds) 44999 &gt; (E:LOCAL TIME, Seconds) 61200 &lt; (A:AMBIENT PRECIP STATE, Enum) 4 &lt; and and and and and and
or
(E:ZULU DAY OF WEEK, Number) 4 &gt; (E:ZULU DAY OF WEEK, Number) 6 &lt; (E:TIME OF DAY, Enum) 0 &gt; (E:TIME OF DAY, Enum) 3 &lt; (E:LOCAL TIME, Seconds) 43199 &gt; (E:LOCAL TIME, Seconds) 66600 &lt; (A:AMBIENT PRECIP STATE, Enum) 4 &lt; and and and and and and
or
(E:ZULU DAY OF WEEK, Number) 5 &gt; (E:ZULU DAY OF WEEK, Number) 1 &lt; (E:TIME OF DAY, Enum) 0 &gt; (E:TIME OF DAY, Enum) 3 &lt; (E:LOCAL TIME, Seconds) 32399 &gt; (E:LOCAL TIME, Seconds) 70200 &lt; (A:AMBIENT PRECIP STATE, Enum) 4 &lt; and and and and and and
or if{ 1000 } els{ 0 }
</Code>
<Lag>25</Lag>
</Parameter>
</Animation>
</PartInfo>
<PartInfo>
<Name>EHLE_03_Vliegclub_Flevo_Garage_Door_4</Name>
<AnimLength>1000</AnimLength>
<Animation>
<Parameter>
<Code>
(E:ZULU DAY OF WEEK, Number) 0 &gt; (E:ZULU DAY OF WEEK, Number) 3 &lt; (E:TIME OF DAY, Enum) 0 &gt; (E:TIME OF DAY, Enum) 2 &lt; (E:LOCAL TIME, Seconds) 46799 &gt; (E:LOCAL TIME, Seconds) 55800 &lt; (A:AMBIENT PRECIP STATE, Enum) 4 &lt; and and and and and and
(E:ZULU DAY OF WEEK, Number) 2 &gt; (E:ZULU DAY OF WEEK, Number) 4 &lt; (E:TIME OF DAY, Enum) 0 &gt; (E:TIME OF DAY, Enum) 3 &lt; (E:LOCAL TIME, Seconds) 42299 &gt; (E:LOCAL TIME, Seconds) 64800 &lt; (A:AMBIENT PRECIP STATE, Enum) 4 &lt; and and and and and and
or
(E:ZULU DAY OF WEEK, Number) 3 &gt; (E:ZULU DAY OF WEEK, Number) 5 &lt; (E:TIME OF DAY, Enum) 0 &gt; (E:TIME OF DAY, Enum) 2 &lt; (E:LOCAL TIME, Seconds) 44999 &gt; (E:LOCAL TIME, Seconds) 61200 &lt; (A:AMBIENT PRECIP STATE, Enum) 4 &lt; and and and and and and
or
(E:ZULU DAY OF WEEK, Number) 4 &gt; (E:ZULU DAY OF WEEK, Number) 6 &lt; (E:TIME OF DAY, Enum) 0 &gt; (E:TIME OF DAY, Enum) 3 &lt; (E:LOCAL TIME, Seconds) 43199 &gt; (E:LOCAL TIME, Seconds) 66600 &lt; (A:AMBIENT PRECIP STATE, Enum) 4 &lt; and and and and and and
or
(E:ZULU DAY OF WEEK, Number) 1 &lt; (E:ZULU DAY OF WEEK, Number) 5 &gt; (E:TIME OF DAY, Enum) 0 &gt; (E:TIME OF DAY, Enum) 3 &lt; (E:LOCAL TIME, Seconds) 32399 &gt; (E:LOCAL TIME, Seconds) 70200 &lt; (A:AMBIENT PRECIP STATE, Enum) 4 &lt; and and and and and and
or if{ 1000 } els{ 0 }
</Code>
<Lag>25</Lag>
</Parameter>
</Animation>
</PartInfo>
</ModelInfo>
 
Back
Top