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

Tint Switch; Enum Button Loop; Problem

Messages
10,163
Country
us-arizona
Hey all,

On my PFD screen, I have 3 'tint' Rectangles that appear. I have a 3D object switch in Gmax which I wish to run/operate the tinting control.

*Click one, tint is one is on,
*Click two, tint one is off, tint two is on
*Click three, tint two is off, tint three is on
*Click four, tint three is off
*Click five, reset to enum 0


This is what I have. It works fine until click 2, then stops.

What have I done wrong?



Code:
[B][COLOR="Blue"]<part>
   <name>ave_lcd_tint</name>
      <animation>
	<parameter>
	  <code>(L:AVElcdTINTbutton, bool) 100 *</code>
 	  <lag>70</lag>
	</parameter>
      </animation>
   <mouserect>
	<cursor>Hand</cursor>
   <tooltip_text>LCD SCREEN TINT</tooltip_text>
  <mouse_flags>LeftSingle</mouse_flags>
   <callback_code>
  (M:Event) 'LeftSingle' scmp 0 ==
      if{ (L:AVElcdTINTbutton, enum) ++ 4 min (>L:AVElcdTINTbutton, enum) }
  (L:AVElcdTINTbutton,enum) 4 == if{ 0 (>L:AVEhudSCROLL,enum) } (* reset to zero *)
  (L:AVElcdTINTbutton,enum) 0 == if{ 0 (>L:AVElcdDISPLYtintONE,bool)
                                                   0 (>L:AVElcdDISPLYtintTWO,bool)
                                                   0 (>L:AVElcdDISPLYtintTHREE,bool)
                                                 }
  (L:AVElcdTINTbutton,enum) 1 == if{ 1 (>L:AVElcdDISPLYtintONE,bool)
                                                    0 (>L:AVElcdDISPLYtintTWO,bool)
                                                    0 (>L:AVElcdDISPLYtintTHREE,bool)
                                                  }
  (L:AVElcdTINTbutton,enum) 2 == if{ 0 (>L:AVElcdDISPLYtintONE,bool)
                                                    1 (>L:AVElcdDISPLYtintTWO,bool)
                                                    0 (>L:AVElcdDISPLYtintTHREE,bool)
                                                 }
  (L:AVElcdTINTbutton,enum) 3 == if{ 0 (>L:AVElcdDISPLYtintONE,bool)
                                                   0 (>L:AVElcdDISPLYtintTWO,bool)
                                                   1 (>L:AVElcdDISPLYtintTHREE,bool)
                                                 }
   </callback_code>
   </mouserect>
</part>
[/COLOR][/B]

Enum 0 starts out nuetral, no selections are active, no tint rectangles appear
Enum 1 starts the loop of tinting
Enum 3 should be the last operation

I did place resetters at each 'if' so that nothing would be left on. Is this correct procedure, or does the 'L:Var' turn off when the enum is no longer active? My thoughts are that they have to be turned 'off' as well as on with each Enum operation.


Bill
 
Last edited:
Found it.. Spelling error.. <sigh... >


(L:AVElcdTINTbutton,enum) 4 == if{ 0 (>L:AVEhudSCROLL,enum) } (* reset to zero *)
(L:AVElcdTINTbutton,enum) 0 == if{ 0 (>L:AVElcdDISPLYtintONE,bool)
 
I rewired it as well.

This is pretty cool for Screen style gauges. I am including the 2D gauge work for the tinting rectangles.

Supposedly you can also do circles and ellipses (fill zones) which would then work as tinters for regular everyday analogue round 'steam' gauges. :) (Just remember that for them, you would want to tint them at night, and use the same L:Var for each gauge tint level, universal).



3D Switch in Gmax;
Code:
[COLOR="Blue"][B]<part>
   <name>ave_lcd_tint</name>
      <animation>
	<parameter>
	  <code>(L:AVElcdTINTbutton, bool) 100 *</code>
 	  <lag>70</lag>
	</parameter>
      </animation>
   <mouserect>
	<cursor>Hand</cursor>
   <tooltip_text>LCD SCREEN TINT</tooltip_text>
  <mouse_flags>LeftSingle</mouse_flags>
   <callback_code>
  (M:Event) 'LeftSingle' scmp 0 ==
      if{ (L:AVElcdTINTbutton, enum) 4 ==
           if{ 0 (>L:AVElcdTINTbutton, enum) }
           els{ (L:AVElcdTINTbutton, enum) ++ (>L:AVElcdTINTbutton, enum) }
      }
  (L:AVElcdTINTbutton,enum) 4 == if{ 0 (>L:AVElcdTINTbutton,enum) } (* reset to zero *)
  (L:AVElcdTINTbutton,enum) 0 == if{ 0 (>L:AVElcdDISPLYtintONE,bool)
                                                              0 (>L:AVElcdDISPLYtintTWO,bool)
                                                              0 (>L:AVElcdDISPLYtintTHREE,bool)
                                                            }
  (L:AVElcdTINTbutton,enum) 1 == if{ 1 (>L:AVElcdDISPLYtintONE,bool)
                                                              0 (>L:AVElcdDISPLYtintTWO,bool)
                                                              0 (>L:AVElcdDISPLYtintTHREE,bool)
                                                            }
  (L:AVElcdTINTbutton,enum) 2 == if{ 0 (>L:AVElcdDISPLYtintONE,bool)
                                                              1 (>L:AVElcdDISPLYtintTWO,bool)
                                                              0 (>L:AVElcdDISPLYtintTHREE,bool)
                                                            }
  (L:AVElcdTINTbutton,enum) 3 == if{ 0 (>L:AVElcdDISPLYtintONE,bool)
                                                              0 (>L:AVElcdDISPLYtintTWO,bool)
                                                              1 (>L:AVElcdDISPLYtintTHREE,bool)
                                                            }
   </callback_code>
   </mouserect>
</part>
[/B][/COLOR]






2D Element sections for tinting in 3 levels.


Code:
[COLOR="blue"][B]<!--  ======================================================  SCREEN LCD DIMMER THREE STAGES  -->

           <Element>
              <Position X="0" Y="0"/>
                 <Visible>
                        (L:AVElcdDISPLYtintONE,bool)
                 </Visible>
              <Rectangle Width="1400" Height="531" LineWidth="1" Color="Black" FillColor="Black" Bright="Yes" Fixed="Yes" Transparency="0.8"/>
           </Element>

           <Element>
              <Position X="0" Y="0"/>
                 <Visible>
                        (L:AVElcdDISPLYtintTWO,bool)
                 </Visible>
              <Rectangle Width="1400" Height="531" LineWidth="1" Color="Black" FillColor="Black" Bright="Yes" Fixed="Yes" Transparency="0.6"/>
           </Element>

           <Element>
              <Position X="0" Y="0"/>
                 <Visible>
                        (L:AVElcdDISPLYtintTHREE,bool)
                 </Visible>
              <Rectangle Width="1400" Height="531" LineWidth="1" Color="Black" FillColor="Black" Bright="Yes" Fixed="Yes" Transparency="0.4"/>
           </Element>
[/B][/COLOR]
 
Bill
ya talking to yaself mate ...time to put down the mouse and take a nice walk outside :)
 
Back
Top