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

FSXA Throttle

Messages
59
Country
france
I’d like to control my two throttles with the mouse. There are two hypotheses:
1. If the variable (L:Gaz_conjugues,bool) = 1, then both throttles move together (like with « F1,F2,F3 and F4 » )
2. If the variable (L:Gaz_conjugues,bool) = 0, each throttle moves independently.

This code doesn’t work
(L:Gaz_conjugues,bool) 1 == if{ (A:GENERAL ENG THROTTLE LEVER POSITION:1,number)
(>A:GENERAL ENG THROTTLE LEVER POSITION:2,number) }

Thank you for your help.
 
Of course it won't work. You can NOT control stuff with an A:variable. Those are READ ONLY tokens.

You MUST use only EventIDs (>K:event). Look in the FSX SDK for the EventIDs document, beginning with:

somenumber (>K:THROTTLE1_SET) sets the throttle to the value of somenumber.
 
This is what I use on my Bell 222, has separate areas for controlling each throttle as well as controlling both throttles at the same time. Hope this helps.

Code:
<Area Left="220" Top="150" Width="35" Height="55">
         <Cursor Type="UpArrow"/>
         <Click Repeat="Yes" MouseWheelFlip="Yes">(A:General Eng Mixture Lever Position:2,percent) ++ 163.84 * (&gt;K:MIXTURE2_SET) 











			</Click>
      </Area>
      <Area Left="220" Top="270" Width="35" Height="55">
         <Cursor Type="DownArrow"/>
         <Click Repeat="Yes" MouseWheelFlip="Yes">(A:general eng mixture lever position:2,percent) int 4 &gt;











			(A:general eng mixture lever position:2,percent) int 4 &lt; ||











			(L:Eng2IdleStopTimer, enum) 0 &gt; ||











			if{











			(&gt;K:MIXTURE2_DECR_SMALL)











			(A:General Eng Mixture Lever Position:2,percent) -- 163.84 * (&gt;K:MIXTURE2_SET) 











			}











			</Click>
      </Area>
      <Area Left="305" Top="150" Width="35" Height="55">
         <Cursor Type="UpArrow"/>
         <Click Repeat="Yes" MouseWheelFlip="Yes">(A:General Eng Mixture Lever Position:2,percent) ++ 163.84 * (&gt;K:MIXTURE2_SET) 











			(A:General Eng Mixture Lever Position:3,percent) ++ 163.84 * (&gt;K:MIXTURE3_SET) 











			</Click>
      </Area>
      <Area Left="305" Top="270" Width="35" Height="55">
         <Cursor Type="DownArrow"/>
         <Click Repeat="Yes" MouseWheelFlip="Yes">(A:general eng mixture lever position:2,percent) int 4 &gt;











			(A:general eng mixture lever position:2,percent) int 4 &lt; ||











			(L:Eng2IdleStopTimer, enum) 0 &gt; ||











			if{











			(A:General Eng Mixture Lever Position:2,percent) -- 163.84 * (&gt;K:MIXTURE2_SET) 











			}











			(A:general eng mixture lever position:3,percent) int 4 &gt;











			(A:general eng mixture lever position:3,percent) int 4 &lt; ||











			(L:Eng3IdleStopTimer, enum) 0 &gt; ||











			if{











			(A:General Eng Mixture Lever Position:3,percent) -- 163.84 * (&gt;K:MIXTURE3_SET) 











			}











			</Click>
      </Area>
      <Area Left="380" Top="150" Width="35" Height="55">
         <Cursor Type="UpArrow"/>
         <Click Repeat="Yes" MouseWheelFlip="Yes">(A:General Eng Mixture Lever Position:3,percent) ++ 163.84 * (&gt;K:MIXTURE3_SET) 











			</Click>
      </Area>
      <Area Left="380" Top="270" Width="35" Height="55">
         <Cursor Type="DownArrow"/>
         <Click Repeat="Yes" MouseWheelFlip="Yes">(A:general eng mixture lever position:3,percent) int 4 &gt;











			(A:general eng mixture lever position:3,percent) int 4 &lt; ||











			(L:Eng3IdleStopTimer, enum) 0 &gt; ||











			if{











			(A:General Eng Mixture Lever Position:3,percent) -- 163.84 * (&gt;K:MIXTURE3_SET) 











			}











			</Click>
      </Area>
 
Thank you for your answers.

I forgot to specify that it's for a VC.

And I'm working in FSX acceleration
 
Here's what I use. I tag a small part on the side of the right power lever to trigger/animate both L and R power levers.

Note that I'm using a <Copy>lever_throttle</Copy> to include the default FSX Modeldef.xml script in this customized script:

Code:
 <Animation name="T38_lever_throttle_both" guid="0a30ebe5-2f6a-46ec-b3ea-8b877d2f3553" length="100" type="Sim" typeParam2="T38_lever_throttle_both" typeParam="AutoPlay" />

  <PartInfo>
    <Name>T38_lever_throttle_both</Name>
    <Copy>lever_throttle</Copy>
    <AnimLength>100</AnimLength>
    <Animation>
      <Parameter>
        <Code>
          (L:EmergencyThrottleInUse, bool) 1 !=
          if{ (A:GENERAL ENG THROTTLE LEVER POSITION:1, part) s0 0 &gt;=
          if{ l0 -50 * 50 + }
          els{ l0 (A:THROTTLE LOWER LIMIT, part) / 1 + 50 * }
          d (&gt;L:Engine1ThrottlePosition, percent)
          }
          els{ (L:Engine1ThrottlePosition, percent) }
        </Code>
      </Parameter>
    </Animation>
    <MouseRect>
      <TooltipText>BOTH</TooltipText>
      <CallbackDragging>
        <Variable>GENERAL ENG THROTTLE LEVER POSITION:1</Variable>
        <EventID>THROTTLE_SET</EventID>
      </CallbackDragging>
    </MouseRect>
  </PartInfo>
 
Once again, as the ship threatens to sink, Bill shows up and saves the crew from disaster !
 
Back
Top