Conditional Display When Using Max and FS2002/FS2004

After reading a request for information recently in one of the forums, I did some experimenting into how to make an object in an aircraft display only under certain conditions when using Max. The question was "How do I make my pilot disappear when the engine(s) is/are off."

There have been discussions on part display depending on altitude or light states at the gMax support forum and this requires some additional lines.

At first I started with the aircraft variables used in the past like 50h or 000000050h but with no luck. Then I looked at the code for the props and found what was making the them display at certain times and found they all had this in common. "dict_engineX+2" where X is the number of the engine. So I first tried an IFIN1 statement with the pilot seeming to pop in and out... not what I wanted. Next I tried some reverse logic and low and behold it worked.

In the _0.asm file I found the drawing code for the pilot and added a couple of lines like so:


Electra_L10e_Male01_2 label BGLCODE
     IFNOTIN1 NO_PILOT, dict_engine0+2, 0, 0  ; line added here
     MATERIAL 1 ; <27,27,27,255>  
     DRAW_TRI_BEGIN 10779, 90
     DRAW_TRI   27,  25,  40 ; poly=16309 part=150
     DRAW_TRI   34,  35,  41 ; poly=16342 part=150
at the end of the drawing code I added this line:
     DRAW_TRI   21,  18,  27 ; poly=15862 part=150
     DRAW_TRI   32,   7,  22 ; poly=15879 part=150
     DRAW_TRI    7,  32,   9 ; poly=15880 part=150
     NO_PILOT label BGLCODE ; line added here

Electra_L10e_l_tire_still_3 label BGLCODE
     MATERIAL 2 ; <28,28,28,255>  
     DRAW_TRI_BEGIN 6383, 162
     DRAW_TRI   63,  68,  18 ; poly=8062 part=92


Here is how it looks now:
Remember,  you'd have to edit the _0.asm file after each export.  
If you look at the MDL_FORMAT_SDK document there are several "Parameter Dictionary GUIDs". I believe these are the keys to be used now instead of the old local aircraft variable forms.