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

FSXA HSI Nav Flag

Messages
468
Country
ca-ontario
I spent all weekend trying to get a nav flag working on my 3D modelled HSI gauge and failed miserably. I tried to do it as an animated part (rotary animation dropping down out of the gauge body) and then as a visibility item so that it instantly displayed when the conditions were met (i.e. no tuned nav station in range) but neither method worked.

Robert (N2056) even gave me some animation code that works for him but it does not work for me, in fact when I try to use his code Gmax chokes during the export process and fails to export giving a long error message. His code is below:

Code:
<Animation name="NAV_Flag" guid="61846b31-3f34-71b2-627c-d04451d7c31a" type="Sim" typeParam2="NAV_Flag" length="50" typeParam="AutoPlay" />

<PartInfo>
  <Name>NAV_Flag</Name> 
   <AnimLength>50</AnimLength> 
     <Animation>
       <Parameter>
         <Code>(A:NAV HAS NAV:1,bool) 50 *</Code> 
        <Lag>300</Lag>
       </Parameter>
    </Animation>
  </PartInfo>

When I tag my animated part with that code and try to export I get the following error message:

ERROR:
Failed processing animation file!!
ERROR:
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.FlightSimulator.XAnimToAnimLib.ANIMProcessor.WriteSimAnimation(XPartInfo_Animation PInfo)
at Microsoft.FlightSimulator.XAnimToAnimLib.ANIMProcessor.WriteANIM(XmlNode node)
at Microsoft.FlightSimulator.XAnimToAnimLib.ANIMProcessor.WriteANIMLib(XmlNode node)
at Microsoft.FlightSimulator.XAnimToAnimLib.ANIMProcessor.GenerateOutput(FileExporter Exporter)
at Microsoft.FlightSimulator.XAnimToAnimLib.XAnimToAnimLib.Process(Stream OutputStream)

If I un-tag the part it exports perfectly (with no animation of course). The above is fully repeatable in that with the code the export chokes, without it the export works as expected.

Googling the error message gives hundreds of hits all relating to different issues so nothing is clear as to what the problem might be.

Does anyone have a clue what is happening here or maybe have either working animation code or working visibility tags that I can try? I have searched through the SDK and all my installed 2D gauges for clues as to what to use to solve the issue but not had much luck.
 
Last edited:
Try changing the GUID.

Says that it is having a referencing error. Check all spelling as well. Might be one single small mistake in the code....
 
Try changing the GUID.

Says that it is having a referencing error. Check all spelling as well. Might be one single small mistake in the code....

I changed the GUID as you suggested Bill and that stopped the export error even though I had checked everything was correct multiple times.

Unfortunately I still don't have an animated part in the sim as the flag refuses to move. I have animated it twice now (in both directions) in case I had the animation reversed (i.e. flag down at frame 0 and flag up at frame 0). I've also double-checked the part scale and that it is a linear rotation (both correct).

Baffled still. :confused::rolleyes:
 
Here is the script I use for my mechanical HSI for the NAV and GS flags:

Code:
  <PartInfo>
    <Name>B737_NAV_GS_FLAG</Name>
    <AnimLength>50</AnimLength>
    <Animation>
      <Parameter>
        <Code>
          (A:NAV GS FLAG:1,bool) 50 *
        </Code>
        <Lag>60</Lag>
      </Parameter>
    </Animation>
  </PartInfo>

  <PartInfo>
    <Name>B737_HSI_NavFlag</Name>
    <AnimLength>50</AnimLength>
    <Animation>
      <Parameter>
        <Code>
          (A:NAV HAS LOCALIZER:1,bool) 50 *
        </Code>
        <Lag>100</Lag>
      </Parameter>
    </Animation>
  </PartInfo>
 
Thanks for the code Bill. I finally have the nav flag animating correctly but I could not get the flags for 'no glide slope signal' to animate no matter what I did.

I tried to animate the glide slope flags as sliding animations initially and then rotating animations and neither method worked. I now have them working as visibility tags and I can live with that.
 
Back
Top