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

FSX Problem with spoiler lever

Messages
92
Country
poland
Hi.

I've created the following Animation in modeldef.xml file to control spoilers:

"
<Animation name="lever_Spoilers" guid="b6b8766c-b7c3-44ca-7b6a-3a7f92e13e61" type="Sim" typeParam="AutoPlay" typeParam2="lever_Spoilers" />

<PartInfo>
<Name>lever_Spoilers</Name>
<MouseRect>
<Cursor>Hand</Cursor>
<HelpID>HELPID_GAUGE_SPOILER</HelpID>
<TooltipID>TOOLTIPTEXT_SPEED_BRAKE</TooltipID>
<MouseFlags>LeftSingle+LeftDrag+Wheel</MouseFlags>
<CallbackDragging>
<Variable>SPOILERS HANDLE POSITION</Variable>
<Units>position</Units>
<Scale>1</Scale>
<YScale>-1</YScale>
<MinValue>-16384</MinValue>
<MaxValue>16383</MaxValue>
<EventID>KEY_SPOILERS_SET</EventID>
</CallbackDragging>
</MouseRect>
</PartInfo>
"

But it does not work.
Both name and guid are unique.
Only parts that work are cursor changing the right way, and the tooltip.

Any idea, what I messed up?
 
I'm no beast at this, but perhaps you should be using "percent" instead of "position" in the <Units> section. Is this FS9, FSX, or P3D?
 
1) Sorry about not mentioning I'm using FSX. I thought I added it in the title of the topic.

2) I've already tried percent, but according to Simulation Variables section in help "SPOILERS HANDLE POSITION" variable uses Percent Over 100 or Position, and not just procent.
But still this don't work:
"
<PartInfo>
<Name>lever_Spoilers</Name>
<MouseRect>
<Cursor>Hand</Cursor>
<HelpID>HELPID_GAUGE_SPOILER</HelpID>
<TooltipID>TOOLTIPTEXT_SPEED_BRAKE</TooltipID>
<MouseFlags>LeftSingle+LeftDrag+Wheel</MouseFlags>
<CallbackDragging>
<Variable>SPOILERS HANDLE POSITION</Variable>
<Units>percent</Units>
<Scale>163.84</Scale>
<YScale>-163.84</YScale>
<MinValue>-16384</MinValue>
<MaxValue>16383</MaxValue>
<EventID>KEY_SPOILERS_SET</EventID>
</CallbackDragging>
</MouseRect>
</PartInfo>
"
No reaction when I hold and drag the lever in FSX.
 
You don't have an animation section as far as I can tell. Only a mouse rect.
 
"
<Animation name="lever_Spoilers" guid="b6b8766c-b7c3-44ca-7b6a-3a7f92e13e61" type="Sim" typeParam="AutoPlay" length="100" typeParam2="lever_Spoilers" />

<PartInfo>
<Name>lever_Spoilers</Name>
<AnimLength>100</AnimLength>
<Animation>
<Parameter>
<Sim>
<Variable>SPOILERS HANDLE POSITION</Variable>
<Scale>1</Scale>
<Units>percent</Units>
<Bias>0</Bias>
</Sim>
</Parameter>
</Animation>
<MouseRect>
<Cursor>Hand</Cursor>
<HelpID>HELPID_GAUGE_SPOILER</HelpID>
<TooltipID>TOOLTIPTEXT_SPEED_BRAKE</TooltipID>
<MouseFlags>LeftSingle+LeftDrag+Wheel</MouseFlags>
<CallbackDragging>
<Variable>SPOILERS HANDLE POSITION</Variable>
<Units>percent</Units>
<Scale>163.84</Scale>
<YScale>-163.84</YScale>
<MinValue>-16384</MinValue>
<MaxValue>16383</MaxValue>
<EventID>KEY_SPOILERS_SET</EventID>
</CallbackDragging>
</MouseRect>
</PartInfo>
"
Still not working.
I already had separate animation (l_spoiler_key) assigned to a parent of that lever and it moves when I click "/" key, as do the flaps themselves.
 
Hi
Pretty sure this is the default code for lever (maybe it is only in the acceleration sdk)
anyway should work
Code:
    <PartInfo>
        <Name>lever_speed_brake</Name>
        <AnimLength>100</AnimLength>
        <Animation>
            <Parameter>
                <Sim>
                    <Variable>SPOILERS HANDLE POSITION</Variable>
                    <Units>percent</Units>
                </Sim>
                <Lag>200</Lag>
            </Parameter>
        </Animation>
        <MouseRect>
            <Cursor>Hand</Cursor>
            <HelpID>HELPID_GAUGE_SPEED_BRAKE</HelpID>
            <TooltipID>TOOLTIPTEXT_SPEED_BRAKE</TooltipID>
            <MouseFlags>LeftSingle+LeftDrag+Wheel</MouseFlags>
            <CallbackDragging>
                <Variable>SPOILERS HANDLE POSITION</Variable>
                <Units>percent</Units>
                <Scale>163.84</Scale>
                <YScale>163.84</YScale>
                <MinValue>0</MinValue>
                <MaxValue>16384</MaxValue>
                <EventID>SPOILERS_SET</EventID>
            </CallbackDragging>
        </MouseRect>
    </PartInfo>
 
:facepalm: I was blind.....the problem is your EventID. Leave the KEY_ part out. That is for C++ only.
 
Back
Top