• 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 Droppable Object Animation

Messages
53
Just wondering if anyone has an idea of why this code doesn't work? When using the Shift+D command to drop things, I wanted to add some animation to the aircraft at the same time, eg. doors opening. However, when pushing the button using this code, the object drops successfully, but there is no animation of the button or the doors. Any idea what's wrong?

Thanks!


Code:
<PartInfo>
        <Name>droppable_objects</Name>
        <AnimLength>50</AnimLength>
        <Animation>
            <Parameter>
  <Code>(A:ELECTRICAL MASTER BATTERY,bool) 1 == if{ (L:release load, bool) 50 * } els{ 0 }</Code>
<lag>100</lag>
            </Parameter>
        </Animation>
        <MouseRect>
     <Cursor>Hand</Cursor>
      <TooltipText>Drop</TooltipText>
<CallbackCode>(K:RELEASE_DROPPABLE_OBJECTS, bool) ! (&gt;K:RELEASE_DROPPABLE_OBJECTS, bool)</CallbackCode>
        </MouseRect>
    </PartInfo>
 
1) A K: var with a unit?
Code:
(&gt;K:RELEASE_DROPPABLE_OBJECTS)
That should do.

2) Capitalize the "L" in "lag". XToMdl does care about this.
 
Many thanks. However, no change in the outcome. Incidentally, I did a little set of three gauges the night the drop gauge was made, and forgot to capitalize the L on the 'lag' of all, but the other two work, if that's any use. And have been using units on K: vars for years, and never knew they weren't necessary, and so thanks, learned something new (again!). May have to figure out another way around the drop issue.
 
Just noticed that I didn't clarify: The K: event is all you need as a callback code.

Code:
<CallbackCode>(&gt;K:RELEASE_DROPPABLE_OBJECTS)</CallbackCode>

And I think you can only drop objects in missions.
 
Back
Top