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

XML Script throwing errors on SDK variables.

Messages
6
Country
unitedkingdom
Currently creating a basic hangar door animation. As there is no variable that allows me to check the distance between the aircraft and a static object, I've created a transition BlendTreeState script that checks if the plane is within a certain latitude and longitude or not. Currently the script is using the 'Plane Latitude' and 'Plane Longitude' variables. I remember reading that 'A;' (Aircraft) Variables are not accessible. Though SDK says that the Plane Latitude and Plane Longitude is both Settable and Writeable.

Current Script;

<?xml version="1.0" encoding="utf-8" ?>
<ModelInfo version="1.1" guid="{3768dfce-6cb0-4f31-93e9-61298068f9ab}">

<Animation name="DoorOpen1" guid="E4E8018C-38FD-4246-A811-4BE7EEA90B7B" type="Standard"/> <!-- Door Open Animation -->
<Animation name="DoorClose1" guid="0539b1cc-3d0b-4425-b9f3-4a5d9b0efa6c" type="Standard"/> <!-- Door Close Animation -->
<Animation name="DoorOpenedStandby1" guid="567b65cb-04d6-4af3-b360-4125a9275b2a" type="Standard"/> <!-- Door Transition Animation -->
<Animation name="DoorClosedStandby1" guid="73ed0403-fe84-4609-b6a4-5cf6012c5aaf" type="Standard"/> <!-- Door Transition Animation -->

<AnimGraph>

<DefaultState name="DoorClosedStandby"/>

<BlendTreeState name="DoorClosedStandby"/>
<Animations>
<Animation guid="73ed0403-fe84-4609-b6a4-5cf6012c5aaf" loop ="True" speed="1"/>
</Animations>

<BlendTreeState name="DoorOpenedStandby"/>
<Animations>
<Animation guid="73ed0403-fe84-4609-b6a4-5cf6012c5aaf" loop ="True" speed="1"/>
</Animations>

<BlendTreeState name="DoorClose"/>
<Animations>
<Animation guid="73ed0403-fe84-4609-b6a4-5cf6012c5aaf" loop ="True" speed="1"/>
</Animations>

<BlendTreeState name="DoorOpen"/>
<Animations>
<Animation guid="73ed0403-fe84-4609-b6a4-5cf6012c5aaf" loop ="True" speed="1"/>
</Animations>

<Transition name="DoorClosedStandby to DoorOpen" start="DoorClosedStandby" end ="DoorOpen" duration="1.0">
<Condition>
(A: PLANE LATITUDE) 0.60317980207113097713 &gt;
(A: PLANE LATITUDE) 0.60316811367606859573 &lt;
(A: PLANE LONGITUDE) 2.6317747681133729643 &gt;
(A: PLANE LONGITUDE) 2.6317880625657732452 &lt;
and
and
and
</Condition>
</Transition>




</AnimGraph>


</ModelInfo>


(SPACE BETWEEN 'A:' and 'PLANE LATITUDE/LONGITUDE' set for example to stop emojis. No space in orginal code.)

When running that code I get these errors;
1629138380813.png


I'm clearly missing something here. I'm a 3D artist mainly, so coding is not my forte so looking for a big brain to either help me piece this together, or help me figure out an alternative method.
All help would be greatly appreciated.
 
Last edited:
XML:
(A:PLANE LATITUDE, degrees) 0.60317980207113097713 &gt;

 (A:PLANE LATITUDE, degrees) 0.60316811367606859573 &lt; and

 (A:PLANE LONGITUDE, degrees) 2.6317747681133729643 &gt; and

 (A:PLANE LONGITUDE, degrees) 2.6317880625657732452 &lt; and

Spaces in
XML:
(A:variables, units)
after the colon are not allowed and the values in which the variables are measured are required. (There is a special insert for code in the post editor)
 
Changed the code to your adjustments and I'm still getting the same errors. I took the code structure from Asobo's Marsheller animation XML. Here is a snippet;

Asobo's Marsheller Code Extract:

XML:
<!-- ANIMGRAPH --> 
     <AnimGraph>
 
        <DefaultState name="Idle"/>
     
        <BlendTreeState name="Idle">
          <Animations>
            <Animation guid="6AD2CE61-7652-4D20-B290-353AD68F2C73" loop ="True" speed="1"/>
          </Animations>       
        </BlendTreeState>
     
        <BlendTreeState name="StandBy">
          <Animations>
            <Animation guid="6AD2CE61-7652-4D20-B290-353AD68F2C73" loop ="True" speed="1"/>
          </Animations>       
        </BlendTreeState>
     
        <BlendTreeState name="Facing">
          <Animations>
            <Animation guid="E4E8018C-38FD-4246-A811-4BE7EEA90B7B" loop ="True" speed="1"/>
          </Animations>       
        </BlendTreeState>
     
        <BlendTreeState name="TurnLeft">
          <Animations>
            <Animation guid="8ACE3329-F923-4995-ADE4-60DB93955D69" loop ="True" speed="1"/>
          </Animations>       
        </BlendTreeState>
     
        <BlendTreeState name="TurnRight">
          <Animations>
            <Animation guid="0CC62F2E-85A9-4A24-A66E-154D526D108D" loop ="True" speed="1"/>
          </Animations>       
        </BlendTreeState>
     
        <BlendTreeState name="MoveAhead">
          <Animations>
            <Animation guid="39E0189E-310B-45CD-8AAC-02295C2B8530" loop ="True" speed="1"/>
          </Animations>       
        </BlendTreeState>
     
        <BlendTreeState name="SlowDown">
          <Animations>
            <Animation guid="E535EDC6-4F64-4BDC-8F14-34697E72FB65" loop ="True" speed="1"/>
          </Animations>       
        </BlendTreeState>
     
        <BlendTreeState name="Stop">
          <Animations>
            <Animation guid="D1ACD09E-89A1-45B5-9B68-1D011F94A6F3" loop ="True" speed="1" threshold="0.0"/>
            <Animation guid="074AE60A-26C4-4324-A7A6-2AD81700B03A" loop ="True" speed="1" threshold="0.25"/>
            <Animation guid="4378ED30-CEA3-4AD1-A480-633FA294F8EA" loop ="True" speed="1" threshold="0.5"/>
            <Animation guid="ABC3876F-7132-42DB-932B-B086D53BA893" loop ="True" speed="1" threshold="0.75"/>
          </Animations>       
          <Value>1 (A:MARSHALLER AIRCRAFT DISTANCE DIRECTION Z PARKINGSPACE, METERS) 5 / -</Value>
        </BlendTreeState>
     
        <BlendTreeState name="StopEngine">
          <Animations>
            <Animation guid="E2DA1248-9913-4096-A470-32F747C07557" loop ="True" speed="1"/>
          </Animations>       
        </BlendTreeState>
     
        <BlendTreeState name="End">
          <Animations>
            <Animation guid="E4E8018C-38FD-4246-A811-4BE7EEA90B7B" loop ="True" speed="1"/>
          </Animations>       
        </BlendTreeState>
     
        <!-- Transition -->
     
        <!-- Idle
     
        -->
     
            <!-- to StandBy
                0m < Dir Z < 500m
            -->
     
            <Transition name="Idle to StandBy" start="Idle" end ="StandBy" duration="0.5">
              <Condition>
                (A:MARSHALLER AIRCRAFT DISTANCE DIRECTION Z PARKINGSPACE, METERS) 500 &lt;
                (A:MARSHALLER AIRCRAFT DISTANCE DIRECTION Z PARKINGSPACE, METERS) 0 &gt;
                and
              </Condition>
            </Transition>
         
        <!-- StandBy
     
        -->
     
            <!-- to Idle
                0m > Dir Z || Dir Z > 500m
            -->
     
            <Transition name="StandBy to Idle" start="StandBy" end ="Idle" duration="0.5">
              <Condition>
                (A:CUBE AIRCRAFT DISTANCE DIRECTION Z PARKINGSPACE, METERS) 500 &gt;
                (A:MARSHALLER AIRCRAFT DISTANCE DIRECTION Z PARKINGSPACE, METERS) 0 &lt;
                or
              </Condition>
            </Transition>
             
            <!-- to Facing
                    0m < Dir Z < 300m && abs(Dir X) < 50m && abs(Alpha) < 95°
            -->
             
            <Transition name="StandBy to Facing" start="StandBy" end ="Facing" duration="0.5">
              <Condition>
                (A:MARSHALLER AIRCRAFT DISTANCE DIRECTION Z PARKINGSPACE, METERS) 300 &lt;
                (A:MARSHALLER AIRCRAFT DISTANCE DIRECTION Z PARKINGSPACE, METERS) 0 &gt;
                (A:MARSHALLER AIRCRAFT DISTANCE DIRECTION X PARKINGSPACE, METERS) abs 50 &lt;
                (A:MARSHALLER AIRCRAFT HEADING PARKINGSPACE, DEGREES) abs 95 &lt;
                and
                and
                and     
              </Condition>
            </Transition>



My Adjusted Script:

XML:
<?xml version="1.0" encoding="utf-8" ?>
<ModelInfo version="1.1" guid="{3768dfce-6cb0-4f31-93e9-61298068f9ab}">

<Animation name="DoorOpen1" guid="E4E8018C-38FD-4246-A811-4BE7EEA90B7B" type="Standard"/>  <!-- Door Open Animation -->
<Animation name="DoorClose1" guid="0539b1cc-3d0b-4425-b9f3-4a5d9b0efa6c" type="Standard"/> <!-- Door Close Animation -->
<Animation name="DoorOpenedStandby1" guid="567b65cb-04d6-4af3-b360-4125a9275b2a" type="Standard"/> <!-- Door Transition Animation -->
<Animation name="DoorClosedStandby1" guid="73ed0403-fe84-4609-b6a4-5cf6012c5aaf" type="Standard"/> <!-- Door Transition Animation -->

   <AnimGraph>

   <DefaultState name="DoorClosedStandby"/>

   <BlendTreeState name="DoorClosedStandby"/>
   <Animations>
   <Animation guid="73ed0403-fe84-4609-b6a4-5cf6012c5aaf" loop ="True" speed="1"/>
   </Animations>

   <BlendTreeState name="DoorOpenedStandby"/>
   <Animations>
   <Animation guid="73ed0403-fe84-4609-b6a4-5cf6012c5aaf" loop ="True" speed="1"/>
   </Animations>

   <BlendTreeState name="DoorClose"/>
   <Animations>
   <Animation guid="73ed0403-fe84-4609-b6a4-5cf6012c5aaf" loop ="True" speed="1"/>
   </Animations>

   <BlendTreeState name="DoorOpen"/>
   <Animations>
   <Animation guid="73ed0403-fe84-4609-b6a4-5cf6012c5aaf" loop ="True" speed="1"/>
   </Animations>

     <Transition name="DoorClosedStandby to DoorOpen" start="DoorClosedStandby" end ="DoorOpen" duration="1.0">
              <Condition>
              (A:PLANE LATITUDE, degrees) 0.60317980207113097713 &gt;

              (A:PLANE LATITUDE, degrees) 0.60316811367606859573 &lt; and

              (A:PLANE LONGITUDE, degrees) 2.6317747681133729643 &gt; and

              (A:PLANE LONGITUDE, degrees) 2.6317880625657732452 &lt; and        
              </Condition>
            </Transition>



 
   </AnimGraph>


</ModelInfo>



Any other thoughts? Am I doing anything in this script that is not possible?
 
Back
Top