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

Invisible Gauge

Messages
6
Country
unitedstates
Hi,

I'm new to gauge writing and want to know if it's possible to create an "invisible" gauge that will automatically "turn something on" as soon as somebody loads the aircraft in FSX?

If so, could someone please post an example of what the code for that type of gauge would look?


Thanks!
 
Any gauge may be made "invisible" simply by making the x,y size parameters in the gauge entry of the panel.cfg tiny:

gauge00=MyInvisibleGauge!Init, 0,0,1,1

Code:
<Update>
          (L:B737_Init,bool) !
          if{
          1 (>L:PowerAvailableNow,bool)
          1 (>L:B737_Init,bool)
          }
</Update>
 
Hi n4gix,

I think you may have misunderstood my question, what I was asking if there is any way to have a gauge automatically turn on / off something in the aircraft (A:var) when it's loaded, such as wing fold, exit open ect... without user input.


Thanks!
 
Hi n4gix,

I think you may have misunderstood my question, what I was asking if there is any way to have a gauge automatically turn on / off something in the aircraft (A:var) when it's loaded, such as wing fold, exit open ect... without user input.


Thanks!

OOPS ....... after posting my response, I re-read Bills reply above. He has your answer there. My response below is mostly redundant..........

If the action you want happens to have an associated K Event then you can add an Init sequence to any existing XML gauge, or new gauge if you prefer, in your aircraft's panel that will key that event - cause it to happen - when the aircraft is loaded and the gauge XML is first executed.

If your aircarft is suitably designed, then setting the Key Event SET_WING_FOLD to zero should unfold the wings.

The Init sequence would take the form of:

Code:
<Update>
  (L:Init_Sequence, bool) 0 ==
    if{
      0 (>K:SET_WING_FOLD)
      1 (>L:Init_Sequence, bool)
    }
</Update>

L:Vars are initially set to zero when the panel loads. When the gauge code is first run, L:Init_Sequence is zero and the conditional code that follows is executed. After 0 (>K:SET_WING_FOLD), then L:Init_Sequence is set to the value 1 and in all subsequent gauge update cycles, the conditional code will not be run again ... not until the panel is reloaded.

Hope this helps,

Bob

The list of Key Event IDs:

http://msdn.microsoft.com/en-us/library/cc526980.aspx
 
Last edited:
Hi rpmc,

You've given me just about what I was looking for! I'm not the well versed on writing gauges, but below is my attempt at the code for the invisible gauge.


Code:
<Gauge Name="Wing_Fold_INI" Version="1.0">
   <Element>
      <Select>
         <Value>                
                (A:FOLDING WING LEFT PERCENT)                   
         </Value>         
      </Select>
   </Element>
  <Update>
   (L:Init_Sequence, bool) 0 ==
     if{
       0 (>K:SET_WING_FOLD)
       1 (>L:Init_Sequence, bool)
     }
  </Update>  
</Gauge>

Am I putting the update code in the right section?

Thanks!
 
Hi n4gix,

I think you may have misunderstood my question...
No, you misunderstood my answer, probably because I didn't go far enough in my answer to explain that you can substitute any command you wish in-between this section:

Code:
<Update>
  (L:Init_Sequence, bool) 0 ==
    if{
      0 (>K:SET_WING_FOLD)
      (* put any commands you want here *)
    }
</Update>
 
I see, thanks for explaining further. Trying to do what I need through a gauge isn't working, I suppose I need to make an attempt on the modeling side, I will make a post in that thread.

Thanks guys!!
 
Try setting the K:event to 1 instead of 0...

1 (>K:SET_WING_FOLD)

Sets the wings into the folded position suitable for storage, typically on a carrier. Takes a value:

1 - fold wings,

0 - unfold wings
 
instead of the "something" you talking about, why dont you tell us what you want to accomplish. We can you the full code that has been tested and work. From there you can see how it is done and then you can do other setting yourself.

Always difficult to answer a question how do you write this or that for "something". I found that being to the point, is much easier to give answer for.

So for which plane do you want to set what. (that is so that we know if we working with A, K or Lvars etc etc etc..
 
Back
Top