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

P3D v4 Drag Chute alternative variable for animation.

So I finally got this to work exactly as I want it to!!

My final solution was to just go with engine shutdown and still with parking brake set for the reset and ditch the refuel and repair key... But if anyone wants my codes to make this work for themselves:

Drag Chute gauge:

XML:
<Gauge Name="Drag Chute Control" Version="1.0">
 
    <!-- Declare Drag Chute State Lvar -->
    <SimVars>
        <Variable Name="L:DragChuteDeployed" Default="0" Units="number" />
    </SimVars>

    <!-- Ensure Correct Initialization on Aircraft Load -->
    <Element>
        <Select>
            <Value>
                (L:DragChuteDeployed, number) 2 > if{
                    0 (>L:DragChuteDeployed, number)  <!-- Reset to 0 if invalid state -->
                }
            </Value>
        </Select>
    </Element>

    <!-- Deploy Drag Chute via Tailhook -->
    <Element>
        <Select>
            <Value>
                (A:TAILHOOK HANDLE, bool) 1 ==
                (L:DragChuteDeployed, number) 0 == and  <!-- Chute NOT already deployed -->
                if{
                    1 (>L:DragChuteDeployed, number)
                    (>K:SPOILERS_ON)                  }
            </Value>
        </Select>
    </Element>

    <!-- Ensure Spoilers Remain Locked When Chute is Deployed -->

<Element>
        <Select>
            <Value>
                (L:DragChuteDeployed, number) 1 ==
                if{
                    (>K:SPOILERS_ON)
                }
            </Value>
        </Select>
    </Element>

    <!-- Drop Chute when Tailhook Retracted -->
    <Element>
        <Select>
            <Value>
                (L:DragChuteDeployed, number) 1 ==
                (A:TAILHOOK HANDLE, bool) 0 == and  <!-- Chute must already be deployed -->
                if{
                    2 (>L:DragChuteDeployed, number)
                    (>K:SPOILERS_OFF)
                }
            </Value>
        </Select>
    </Element>

    <!-- Ensure Spoilers Remain Locked After Chute is Dropped -->
    <Element>
        <Select>
            <Value>
                (L:DragChuteDeployed, number) 2 ==
                if{
                    (>K:SPOILERS_OFF)
                }
            </Value>
        </Select>
    </Element>

<!-- Anti spoiler key cheat logic -->

<Element>
        <Select>
            <Value>
                (A:SPOILERS HANDLE POSITION, percent) 5 &gt;
                (L:DragChuteDeployed, number) 0 == and  <!-- Ensure chute was deployed -->
                (L:DragChuteDeployed, number) 2 != and  <!-- Ensure chute isn't dropped -->
                if{
                    2 (>L:DragChuteDeployed, number)  <!-- Mark chute as dropped -->
                }
            </Value>
        </Select>
    </Element>


    <!-- Reset Logic -->
    <Element>
        <Select>
            <Value>
                (A:SIM ON GROUND, Bool) 1 ==
                (A:GROUND VELOCITY, Knots) 0 == and
                (A:BRAKE PARKING POSITION, Bool) 1 == and
                (A:GENERAL ENG COMBUSTION:1, Bool) 0 == and
                (A:GENERAL ENG COMBUSTION:2, Bool) 0 == and
                (L:DragChuteDeployed, number) 2 == and  <!-- Only reset from "dropped" state -->
                if{
                    0 (>L:DragChuteDeployed, number)  <!-- Reset the deployment state -->
                }
            </Value>
        </Select>
    </Element>

</Gauge>

Vis cond to be used in MCX for dragchute visiblity:

XML:
<PartInfo>
    <Name>custom_vis_dragcute</Name>
    <Visibility>
      <Parameter>
        <Code>
(A:AIRSPEED INDICATED, knots) 30 &gt; (L:DragChuteDeployed, number) 1 == and (A:SPOILERS LEFT POSITION,percent) 5 &gt; and if{ 1 } els{ 0 }
</Code>
      </Parameter>
</Visibility>
</PartInfo>
This does the dragchute doors:

XML:
<Animation name="Dragchute doors" guid="fd3eebfb-4152-4b7b-9702-37c1d2abdad6" length="10" type="Sim" typeParam2="Dragchute doors" typeParam="AutoPlay" />
<PartInfo>
<Name>Dragchute doors</Name>
<AnimLength>10</AnimLength>
<Animation>
<Parameter>
<Code>(L:DragChuteDeployed, number) 0 == if{ 0 } els{10 }</Code>
<Lag>10</Lag>
</Parameter>
</Animation>
</PartInfo>

Also the following must be added to the aircraft.cfg

[tailhook]
cable_force_adjust = .001
tailhook_position = .001
tailhook_length = .001


So what it does when the aircaft is in its initial state the spoilers are at 0 the tailhook is at 0 and the dragchutedeployed var is at 0. It has an anti cheat built in so if the user tries to use the spoiler key it will just lock the spoilers at 0. Upon extending the tailhook, the dragchutedeployed var goes to 1, and the spoilers go to and stay locked at 100%. Once the tail hook is retracted again the spoilers go to 0 and the dragchutedeployed var goes to 2; rendering the spoilers useless / closed for the rest of the flight. In order to reset the dragchutedeployed var to 0 to make the dragchute (spoilers) available again the airplane must be on the ground, at a complete stop, parking brake set, and both engines shutdown. It works awesomely!! Feel free to use it for yourself and hopefully someone else can enjoy this!
 
Last edited:
Back
Top