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

FSX On load xml code

Messages
71
Country
switzerland
Hello,

I know to have a true Cold and Dark cockpit one should save the situation and then, when starting it, one get the airplane as one saved it... But... It doesn't work when one changes airplanes in game. Well...

I programmed a little gauge that put all switches off when... RESET... :

<Element>
<Select>
<Value>
(A:RELOAD_USER_AIRCRAFT,bool) ! (L:ColdAndDark,bool) ! &amp;
if{ (>K:MAGNETO_OFF) 1 (&gt;L:ColdAndDark) 0 (&gt;K:PARKING_BRAKES)
(>K:MIXTURE_LEAN) 0 (>K:PROP_PITCH_SET) }
</Value>
</Select>
</Element>

It works very well, BUT... I have to reset the airplane. I

I tried to find out a kind of "A:ON_AIRCRAFT_LOAD") but no chance.

Knows someone if it exists ? Thanks
 
Create an initialization routine that will only be executed once when first loading the aircraft. Put it in an <Update> section of any of your gauges:
Code:
  <Update Hidden="Yes">
    <!-- PRIMARY INIT SECTION TO DO ONCE ON A/C LOAD! -->
    (L:MyAircraft_Init,bool) 0 ==
    if{
          (* put your stuff here that you want to set to specific conditions *)
           1 (&gt;L:ColdAndDark)
           0 (>K:PROP_PITCH_SET)
 
          (* now, set your init variable to true *)
          1 (>L:MyAircraft_Init,bool)
      }
  </Update>
 
Do you mean (>K:RELOAD_USER_AIRCRAFT)? You cannot use this in an initial load gauge, since if you do then it will endlessly reload the aircraft, over and over.
On initial load you can switch on one of the rarely used lights (like recognition lights) and then force a reload (after a one second delay to allow things to settle down first). Then on the next load you test if the recognition lights are turned on and turn them off (and no reload).

Hope this helps,
 
Last edited:
Bills initialisation routine is a good way to do this.

On refinement of the process can be to use (A:SIM ON GROUND,bool) to test if the aircraft is on the ground when it is reloaded. The last thing you want is to load a new aircraft at 5,000' in the air in a cold and dark state (unless you have a really short startup checklist).
 
I actually have to do precisely this for the time being in P3Dv2.2, as not all of the "lights" will load the first time around... o_O
 
BTW, "Reload User Aircraft" is a command, not an A: variable...
 
Back
Top