plane icon Welcome to Microsoft Flight Simulator’s SDK Q&A Platform!

You have questions regarding the SDK? DevMode Tools? SimConnect? You would like to submit an idea for future improvements, seek help or exchange knowledge? You’re in the right place.

In the upcoming flighting, we've changed the behaviour of the content.xml file. If your addon uses this file, please read this article!

Please take a moment to read the platform’s guidelines before you get started!


SWS-AlexVletsas avatar image
SWS-AlexVletsas asked

[XML] Why can't I drag my custom lever past the gate?

I'm making a custom power lever using "ASOBO_GT_Lever_DraggingYAxis_Gates". I have created a template that allows me to set idle where I need it, but if I put my custom animation code in <OVERRIDE_ANIM_CODE> I cannot drag the lever past the first gate. The lever animates fine if I use the physical throttle on my desk or the key assignments. I can drag it from Position 0 through 1, but it cannot go past it using the mouse.

If I push the lever forward using the key bindings and click it while it's past the detent, then I can drag it between idle and max power. As soon as I leave it near idle, though, clicking it makes the bug return.

If I don't use <OVERRIDE_ANIM_CODE> at all, the drag function works fine, but then the animation will have to be redone for idle to be at 50% of travel. While doable, it is not efficient.

This is the code I'm using for animation of the lever, which breaks only the drag function at the gate.

<UseTemplate Name="ASOBO_GT_Lever_DraggingYAxis_Gates">
                    (L:ENGINE_Lever_Power_#ID#, Percent) 0 &gt;= if{ 
                        (L:ENGINE_Lever_Power_#ID#, Percent over 100) 1 #IDLE_ANIM_PCT# - #ANIM_LENGTH# * * #IDLE_ANIM_PCT# #ANIM_LENGTH# * + 
                    } els{
                        (L:ENGINE_Lever_Power_#ID#, Percent over 100) 1 + #IDLE_ANIM_PCT# #ANIM_LENGTH# * * 
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

0 Answers


Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 19.1 MiB each and 23.8 MiB total.