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

FS2004 Conditional (random) display of model elements

Hi All - It's been a while and things have moved on. Except for me, I'm still on FS2004.

I'm wrapping up a model and am interested in hiding elements on a random basis (either per flight or per sim session, I don't mind). I've checked the wiki for XML approaches and thought that I could hide parts by generating a random number, dividing it by 2 and multiplying it by 2 - and if the result is the same, the number was even, otherwise odd. That gives me a binary random number and makes my choice for me. Obviously this calculation would not be continually evaluated and would need to be tied either to the AI spawning, or the aircraft coming out of sleep (for a per-flight hiding). It would also I assume use L-vars to avoid affecting AI based on the same model. It's ten years since I last did this XML stuff.

Which leads me also to a more specific query about AI traffic state from the SDK. The only one I can find online is on the P3D site, but the variables seem familiar and I assume are available in FS9 as they're shown below (without things like preflight and postflight support). If hiding the crew when the a/c is asleep, it seems that I would need to check for the strings "sleep" and "Sleep" capitalized so that it appears the same at all airports. I assume that "sleep" under ATC control actually means the aircraft is sleeping at a towered airport and not at an airport without ATC.

It also looks as though "init" is nothing to do with the aircraft spawning, which I had hoped, since init isn't an option for AI outside ATC control.

AI TRAFFIC STATE English string describing an AI object's state. If the object is an aircraft under ATC control the string will be one of:
"flt plan"
"preflight support"
"push back 1"
"push back 2"
"pre taxi out"
"taxi out"
"takeoff 1"
"takeoff 2"
"T&G depart"
"go around"
"taxi in"
"postflight support"

If the AI object is not an aircraft under ATC control, the string is one of:


This string also appears in the State column of the Traffic Explorer tool dialog. See Note 1.
Last edited: