• 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 Mouse flag question

Messages
1,451
Country
mexico
Hello good people

I am implementing a nice visual effect where the heading bug changes its color depending if it is in "command mode" or not. The change is controled
with (L:MD_900_visible_HSI_Bug,bool).

Here is how it works:
HTML:
    //---------------------heading bug commanded---------------------------------------

        <Element>
            <Position X="300" Y="309"/>
            <Visible>(L:MD_900_visible_HSI_Bug,bool)</Visible>
            <Image Name="900_digital_hsi_heading_bug_commanded.bmp" PointsTo="North">
                <Axis X="21" Y="219"/>
            </Image>
            <Rotate>
                <Value>(A:Autopilot heading lock dir,degrees) d (A:Plane heading degrees gyro,degrees) 90 + - dgrd</Value>
            </Rotate>
        </Element>

    //---------------------heading bug not commanded---------------------------------------

        <Element>
            <Position X="300" Y="309"/>
            <Visible>(L:MD_900_visible_HSI_Bug,bool) !</Visible>
            <Image Name="900_digital_hsi_heading_bug.bmp" PointsTo="North">
                <Axis X="21" Y="219"/>
            </Image>
            <Rotate>
                <Value>(A:Autopilot heading lock dir,degrees) d (A:Plane heading degrees gyro,degrees) 90 + - dgrd</Value>
            </Rotate>
        </Element>


HTML:
           <!--                                                                                                       M O U S E   E V E N T    L O G I C                                                                                                            -->
      <Mouse>
  <!-- It only enables the "Visible" or "Invisible" condition for the heading bug -->
          <Area Left="0" Top="0" Width="600" Height="618">
       
              <Click Kind="LeftSingle+RightSingle+LeftRelease+RightRelease+WheelUp+WheelDown+Leave" Repeat="Yes">
                  (M:Event) 'LeftSingle' scmp 0 == (M:Event) 'WheelUp' scmp 0 == or
                      if{
                            1 (>L:MD_900_visible_HSI_Bug,bool)
                            (L:HDG_Knob_Anim_Control,number) ++ (>L:HDG_Knob_Anim_Control,number)
                            (A:AUTOPILOT HEADING LOCK DIR, degrees) ++ dnor (>K:HEADING_BUG_SET)
                            1 (>L:MD_900_Rotary_Click, number)
                        }

                  (M:Event) 'LeftRelease' scmp 0 == (M:Event) 'RightRelease' scmp 0 == or
                  (M:Event) 'Leave' scmp 0 == or
                      if{
                          0 (>L:MD_900_visible_HSI_Bug,bool)
                        }

                  (M:Event) 'RightSingle' scmp 0 == (M:Event) 'WheelDown' scmp 0 == or
                      if{
                            1 (>L:MD_900_visible_HSI_Bug,bool)
                            (L:HDG_Knob_Anim_Control,number) -- (>L:HDG_Knob_Anim_Control,number)
                            (A:AUTOPILOT HEADING LOCK DIR, degrees) -- dnor (>K:HEADING_BUG_SET)
                            1 (>L:MD_900_Rotary_Click, number)
                        }
                  </Click>
          </Area>
      </Mouse>

It works like it is now, but I am wondering if the "Leave" mouse flag works for FS9. So far, nothing has proven that it is.

Have an excellent day/evening/night wherever you are.
In advance, thank you all!
Sergio.
 
Last edited:
Back
Top