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

VSI Bug Code for FSX model knob?

Messages
10,163
Country
us-arizona
Hey all,

Does anyone have a working VSI adjust knob code for a VC (modeldef)?

I will not even post what I had. :( Nothing is working.

VSI_BUG_SELECT used with + / -
 
Bill, all of the key events with the _SELECT suffix are used to enable keyboard control of the named function using the +/- keys to increment/decrement. They are frankly quite useless IMNSHO, or at least useless for gauge and/or virtual cockpit use in any event.

The K:Events you need to use are:
Code:
AP_VS_VAR_DEC
AP_VS_VAR_INC
The A:Var,unit you need to use for the animation is:
Code:
(A:AUTOPILOT VERTICAL HOLD VAR,feet/minute)
 
Hey Bill,

Roger that and many thanks. What I meant was a working code for the control knob that would increase/decrease the selected VS amount, like LeftClick+LeftDrag+WheelUp+WheelDn, etc.

I want something like what the stock FSX have, where you can mouse drag the knob or use the wheel. I am having issues trying to get one to work. The stock MS versions have L:var's mixed in with them, which totally throws me off. I tried a few times to write some and nothing seems to work.

This is one very horrible version....

Code:
  <PartInfo>
    <Name>learjet24_knob_vsi</Name>
    <AnimLength>100</AnimLength>
    <Animation>
      <Parameter>
        <Code>(L:LF24B SET ALT ADJUST KNOB,bool) 100 *</Code>
      </Parameter>
    </Animation>
    <MouseRect>
      <Cursor>Hand</Cursor>
      <MouseFlags>LeftSingle+LeftDrag+Wheel+RightSingle+RightDrag</MouseFlags>
         <CallbackCode>
           (M:Event) 'LeftSingle' scmp 0 ==
           els{ (M:Event) 'LeftDrag' scmp 0 == if{ (&gt;K:AP_VS_VAR_INC)
                                                   (L:LF24B SET ALT ADJUST KNOB,bool) }
           (M:Event) 'WheelUp' scmp 0 ==
           if{ (&gt;K:AP_VS_VAR_INC) }
           (M:Event) 'WheelDown' scmp 0 ==
           if{ (&gt;K:AP_VS_VAR_DEC) }
           (M:Event) 'RightSingle' scmp 0 ==
           els{ (M:Event) 'RightDrag' scmp 0 == if{ (&gt;K:AP_VS_VAR_DEC)
                                                   (L:LF24B SET ALT ADJUST KNOB,bool) }
         </CallbackCode>
      <TooltipText>Speed Setting</TooltipText>
    </MouseRect>
  </PartInfo>
 
A hot little experiment. I hoped it would work. It did not. No flames or anything, nothing went explodie, so... Oh well. :S

Code:
  <PartInfo>
    <Name>learjet24_knob_vsi</Name>
    <AnimLength>100</AnimLength>
    <Animation>
      <Parameter>
        <Code>(L:LF24B SET VSI ADJUST KNOB,bool) 100 *</Code>
      </Parameter>
    </Animation>
    <MouseRect>
      <Cursor>Hand</Cursor>
      <MouseFlags>LeftSingle+LeftDrag+Wheel+RightSingle+RightDrag</MouseFlags>
         <CallbackCode>
           (M:Event) 'LeftSingle' scmp 0 ==
           (M:Event) 'LeftDrag' scmp 0 == and
           (M:Event) 'WheelUp' scmp 0 == and
            if{ (&gt;K:AP_VS_VAR_DEC)
                <XMovement>
                <Delta>3</Delta>
                <EventIdDec>(L:LF24B SET ALT ADJUST KNOB,bool) 100 - * </EventIdDec>
                </XMovement>
                1 (>L:XMLSND12,enum) }
           (M:Event) 'WheelDown' scmp 0 ==
           (M:Event) 'RightSingle' scmp 0 == and
           (M:Event) 'RightDrag' scmp 0 == and
            if{ (&gt;K:AP_VS_VAR_DEC)
                <XMovement>
                <Delta>3</Delta>
                <EventIdDec>(L:LF24B SET ALT ADJUST KNOB,bool) 100 * </EventIdDec>
                </XMovement>
                1 (>L:XMLSND12,enum) }
         </CallbackCode>
      <TooltipText>Vertical Speed Setting</TooltipText>
    </MouseRect>
  </PartInfo>
 
and another...

Code:
  <PartInfo>
    <Name>learjet24_knob_vsi</Name>
    <AnimLength>100</AnimLength>
    <Animation>
      <Parameter>
        <Code>(A:AUTOPILOT VERTICAL HOLD VAR,feet/minute) 10 % 10 *</Code>
      </Parameter>
    </Animation>
    <MouseRect>
      <Cursor>Hand</Cursor>
      <MouseFlags>LeftSingle+LeftDrag+Wheel+RightSingle+RightDrag</MouseFlags>
         <CallbackCode>
           (M:Event) 'LeftSingle' scmp 0 ==
            if{ (&gt;K:AP_VS_VAR_DEC)
                1 (>L:XMLSND12,enum) }
           (M:Event) 'LeftDrag' scmp 0 ==
            if{ (&gt;K:AP_VS_VAR_DEC)
                1 (>L:XMLSND12,enum) }
           (M:Event) 'WheelUp' scmp 0 ==
            if{ (&gt;K:AP_VS_VAR_DEC)
                1 (>L:XMLSND12,enum) }
           (M:Event) 'WheelDown' scmp 0 ==
            if{ (&gt;K:AP_VS_VAR_Inc)
                1 (>L:XMLSND12,enum) }
           (M:Event) 'RightSingle' scmp 0 ==
            if{ (&gt;K:AP_VS_VAR_Inc)
                1 (>L:XMLSND12,enum) }
           (M:Event) 'RightDrag' scmp 0 ==
            if{ (&gt;K:AP_VS_VAR_Inc)
                1 (>L:XMLSND12,enum) }
         </CallbackCode>
      <TooltipText>Vertical Speed Setting</TooltipText>
    </MouseRect>
  </PartInfo>


no workie workie... :S
 
Back
Top