• 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 v3 Open door code in modeldef.xml

Messages
132
Country
france
Hi ;)

In Prepar 3D V3 this code present in modeldef.xml doesn't work with my Jodel.

Code:
<PartInfo>
    <Name>door_right</Name>
    <AnimLength>100</AnimLength>
    <Animation>
    <Parameter>
        <Sim>
            <Variable>EXIT OPEN:1</Variable>
            <Units>percent</Units>
        </Sim>
    </Parameter>
    </Animation>
    <MouseRect>
        <Cursor>Hand</Cursor>
        <TooltipText>Ouverture droite</TooltipText>
        <CallbackCode>(>K:TOGGLE_AIRCRAFT_EXIT)(>K:SELECT_2)</CallbackCode>
    </MouseRect>
</PartInfo>

The goal, is to open the second door (right) with "simulate" the shorcut "MAJ + E + 2".

In FSX a use this and it's work fine but not in P3D V3:

Code:
<PartInfo>
    <Name>door_right</Name>
    <AnimLength>100</AnimLength>
    <Animation>
    <Parameter>
        <Sim>
            <Variable>EXIT OPEN:1</Variable>
            <Units>percent</Units>
        </Sim>
    </Parameter>
    </Animation>
    <MouseRect>
        <Cursor>Hand</Cursor>
        <TooltipText>Ouverture droite</TooltipText>
        <CallbackCode>2 (>K:TOGGLE_AIRCRAFT_EXIT)</CallbackCode>
    </MouseRect>
</PartInfo>

Have you the same problem ?
 
You're still monitoring exit 1 ?
Code:
<Variable>EXIT OPEN:1</Variable>

Shouldn't it be
Code:
<Variable>EXIT OPEN:2</Variable>

If the call back code doesn't work you could try -
Code:
<CallbackCode>(&gt;K:SELECT_2) (>K:TOGGLE_AIRCRAFT_EXIT)</CallbackCode>
or
Code:
<CallbackCode> (>K:TOGGLE_AIRCRAFT_EXIT) (&gt;K:SELECT_2)</CallbackCode>
 
This works for me: Select_1 to Select_4 are valid values and equate to EXIT OPEN:0 to EXIT OPEN:3

Code:
(&gt;K:TOGGLE_AIRCRAFT_EXIT)
(&gt;K:SELECT_4)
 
Is fix :)

I forgot to send 1 at SELECT_2

See the code below

Code:
<PartInfo>
    <Name>door_right</Name>
    <AnimLength>100</AnimLength>
    <Animation>
    <Parameter>
        <Sim>
            <Variable>EXIT OPEN:1</Variable>
            <Units>percent</Units>
        </Sim>
    </Parameter>
    </Animation>
    <MouseRect>
        <Cursor>Hand</Cursor>
        <TooltipText>Ouverture droite</TooltipText>
        <CallbackCode>
            1 (>K:TOGGLE_AIRCRAFT_EXIT)
            1 (>K:SELECT_2)
        </CallbackCode>
    </MouseRect>

Thank you for Anthony and spokes2112 for your help ;)
 
It's not necessary to send 1 to toggle_aircraft_exit or select_2.

I think the problem with your original code is that there was no space between the two events. Remember with XML that spaces (or no spaces) are important.

Either of these should work (note there is a space between toggle_aircraft_exit and select_2:

Code:
<CallbackCode>(>K:TOGGLE_AIRCRAFT_EXIT) (>K:SELECT_2)</CallbackCode>

<CallbackCode>
(>K:TOGGLE_AIRCRAFT_EXIT)
(>K:SELECT_2)
</CallbackCode>
 
Back
Top