• 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 2D Switch, Click on, Release Off, how?

Messages
10,158
Country
us-arizona
Hey all,

So, I am trying to figure out how to make a switch which when you hold down the left mouse button, it is on, and when you release, it returns to bitmap 'off'. So, press and hold on, release, back to off.

How do you write this in FS2004 2D gauge code in the click section?

This is one of the ways I tried. I experimented with a few of the mouse click types. Nothing worked except on / off. This I thought was genious, but does the same thing; on/off by click / click. Not one click for both functions.


Code:
       <Tooltip>Generator Reset Switch LH</Tooltip> 
      <Area Left="0" Right="51" Top="0" Bottom="186">
         <Visible>(L:LF24B LEFT GEN RESET SWITCH,bool) 0 == </Visible>
            <Click LeftSingle="Yes">
          1 (&gt;L:LF24B LEFT GEN RESET SWITCH,bool)
          1 (&gt;L:XMLSND1,enum)     
            </Click>
        </Area>

       <Tooltip>Generator Reset Switch LH</Tooltip> 
      <Area Left="0" Right="51" Top="0" Bottom="186">
         <Visible>(L:LF24B LEFT GEN RESET SWITCH,bool) 1 == </Visible>
            <Click Leave="Yes">
          0 (&gt;L:LF24B LEFT GEN RESET SWITCH,bool)
          1 (&gt;L:XMLSND1,enum)     
            </Click>
        </Area>

I also tried a few versions of this;


Code:
       <Tooltip>Generator Reset Switch RH</Tooltip> 
      <Area Left="0" Right="51" Top="0" Bottom="186">
            <Click Release="Yes">
            (L:LF24B RIGHT GEN RESET SWITCH,bool) ! (&gt;L:LF24B RIGHT GEN RESET SWITCH,bool)
          1 (&gt;L:XMLSND1,enum)     
            </Click>
        </Area>

Code:
       <Tooltip>Generator Reset Switch RH</Tooltip> 
      <Area Left="0" Right="51" Top="0" Bottom="186">
            <Click LeftRelease="Yes">
            (L:LF24B RIGHT GEN RESET SWITCH,bool) ! (&gt;L:LF24B RIGHT GEN RESET SWITCH,bool)
          1 (&gt;L:XMLSND1,enum)     
            </Click>
        </Area>
 
Try something like this

Code:
       <Area Left="126" Right="170" Top="1" Bottom="38">
            <Cursor Type="Grab"/>
             <Click Kind="LeftSingle+Leave">
                (M:Event) 'LeftSingle' scmp 0 ==
                    if{ 1 (&gt;L:ANNUN TEST,bool) }
               (M:Event) 'Leave' scmp 0 ==
                   if{ 0 (&gt;L:ANNUN TEST,bool) }
            </Click>
        </Area>

Walter
 
Ahhh... I was wondering if I could do M:Event's in these. I couldnt find an example. Many thanks Baiter!
 
WORKS! BRILLIANT! Many thanks Baiter.

By the way, I found just now that if you use LeftDrag as the first command, you can hold the switch down indefinately, so for starters, you would use LeftDrag (turbines) until the flame catches and then release. With LeftSingle you have a sound repeat that starts occuring after about 2 seconds.

Many thanks Baiter.
 
Last edited:
Back
Top