• 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 display modes

Messages
1,749
Country
unitedstates
Hi everyone,

I am trying to make my three way switch. And I want to show one mode at a time.
I made 3 windows for each gauge. So I have mode1 mode2 and mode3.
And my switch is SWITCH_RMT. here's my code so far. i know how to make
this in the regular hide yoke. But I need help on this.

also can i use only one mode1 window and use three display gauges
on a single window. tell the switch to toggle the three gauges?

What I wrote is to make only one window show up at a time.
But it does not work right.



<part>
<name>SWITCH_RMT</name>
<animation>
<parameter>
<code>50 (L:RMTSWITCH,enum) 50 * +</code>
<lag>100</lag>
</parameter>
</animation>
<mouserect>
<cursor>Hand</cursor>
<mouse_flags>LeftSingle+RightSingle</mouse_flags>
<callback_code>
(M:Event) 'RightSingle' scmp 0 ==
if{ (L:RMTSWITCH, enum) -- -1 max (>L:RMTSWITCH, enum) }
(M:Event) 'LeftSingle' scmp 0 ==
if{ (L:RMTSWITCH, enum) ++ 1 min (>L:RMTSWITCH, enum) }
(L:RMTSWITCH,enum) -1 == if{ (&gt;K:MODE1) }
(L:RMTSWITCH,enum) 0 == if{ (&gt;K:MODE2) }
(L:RMTSWITCH,enum) 1 == if{ (&gt;K:MODE3) }
</callback_code>
</mouserect>
</part>




<part>
<name>MODE1</name>
<visible_in_range>
<parameter>
<code>(L:RMTSWITCH,enum)</code>
</parameter>
<minvalue>1</minvalue>
</visible_in_range>
</part>


<part>
<name>MODE2</name>
<visible_in_range>
<parameter>
<code>(L:RMTSWITCH,enum)</code>
</parameter>
<minvalue>1</minvalue>
</visible_in_range>
</part>



<part>
<name>MODE3</name>
<visible_in_range>
<parameter>
<code>(L:RMTSWITCH,enum)</code>
</parameter>
<minvalue>1</minvalue>
</visible_in_range>
</part>

DG:)
 
Last edited:
I got it working

I have fixed my problem.

But I still have 1 question.

I want to tell my switch to be on first. Not off

how do i do this? Because I am a little rusty when it comes to xml parts. I figure it is really simple.


<part>
<name>SHOW_MODE2</name>
<AnimLength>360</AnimLength>
<animation>
<parameter>
<code>100 (L:MODE2,bool) 100 *</code>
<lag>200</lag>
</parameter>
</animation>
<mouserect>
<cursor>Hand</cursor>
<tooltip_text>DME_MODE_2</tooltip_text>
<mouse_flags>LeftSingle+RightSingle+Wheel</mouse_flags>
<callback_code>
(L:MODE2, bool) ! (&gt;L:MODE2, bool) 0 (K:MODE2, bool) (K:SMOKE_ON, bool) (&gt;K:SMOKE_OFF, bool)
</callback_code>
</mouserect>
</part>

<part>
<name>DISPLAYMODE2</name>
<visible_in_range>
<parameter>
<code>(L:MODE2,bool)</code>
</parameter>
<minvalue>1</minvalue>
</visible_in_range>
</part>

DG:)
 
Last edited:
When you first load any aircraft, all L:vars are set to zero...

So, make your "on" condition to be zero, and the off to be one...

...or write a small XML gauge that will initialize your variable(s) to whatever you need them to be.

Code:
<Gauge Name="AA5_Logic" Version="1.0">
  <Element>
    <Select>
      <Value>
        (L:FirstLoad,bool) !
        if{
             1 (>L:MyVariable,enum)
        }
        1 (>L:FirstLoad,bool)
        }
      </Value>
    </Select>
  </Element>
</Gauge>

The little "logic" gauge above will set (L:MyVariable,enum) to be "1" whenever the aircraft is first loaded. The control variable (L:FirstLoad,bool) will make sure it is only run once.

You don't actually need a separate gauge of course, as you could easily copy/paste the entire <Element> section into an existing gauge.


BTW, use the # button for script (Code tags!) instead of the "Quote tags..."
 
Last edited:
Thanks

Thanks Bill,

I like your idea on adding the element in my existing gauge.

That will work perfect. My 3 way toggle is working great.
Now it will be perfect.

Thanks DG
 
Back
Top