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

Window Move.External model.

Messages
56
Country
poland
Hello.
I am looking for help because I trying to make moving window.
What I mean?I'd like to create animation for opening and closing window if you press mouse key.
Maybe this picture give as more information.

Animation is working fine now in 3dmax but I am trying to make a script.At the moment cant find any solution.Script will be used for VC aswell.
I am really grateful if u show me some light.
Cheers.
Tomas
 
The following is custom XML in FSX syntax. It may easily be "translated" into FS9 syntax.

For additional examples of "custom XML" for 3d animations, see the forum at Freeflight Design:
WORKING XML Code Library (Parts and Gauges)
For specific new (COMPLETE AND WORKING) XML codings



Code:
<Animation name="vent_left"   guid="7bd3027e-5a10-4211-a48e-8a2e1ae91429" length="100" type="Sim" typeParam2="vent_left" typeParam="AutoPlay" />

  <PartInfo>
    <Name>vent_left</Name>
    <AnimLength>100</AnimLength>
    <Animation>
      <Parameter>
        <Code>
          (L:VentLeft, number) 100 *
        </Code>
        <Lag>40</Lag>
      </Parameter>
    </Animation>
    <MouseRect>
      <Cursor>Hand</Cursor>
      <TooltipText>Vent Left</TooltipText>
      <CallbackCode>
        (L:VentLeft, number) ! (>L:VentLeft, number)
      </CallbackCode>
    </MouseRect>
  </PartInfo>
 
Thank you N4gix.
The most interested for me right now is this part:
<Code>
(L:VentLeft, number) 100 *
</Code>
<Lag>40</Lag>
</Parameter>
</Animation>
<MouseRect>
<Cursor>Hand</Cursor>
<TooltipText>Vent Left</TooltipText>
<CallbackCode>
(L:VentLeft, number) ! (>L:VentLeft, number)
Because its my first script I am trying to understand some actions.
I dont know what its mean VentLeft, number and where its come from.
Hopefuly you understand me.
I am working on FSX.
 
Last edited:
OK I've got it those part
<Code>
(L:VentLeft, number) 100 *
</Code>
<Lag>40</Lag>
</Parameter>
</Animation>
<MouseRect>
<Cursor>Hand</Cursor>
<TooltipText>Vent Left</TooltipText>
I am interested about this part.
(L:VentLeft, number) ! (>L:VentLeft, number)
I was trying to use this script but is not working with animation:(
 
Last edited:
If you are going to paste XML script, please use the # icon in the toolbar above to wrap it in
Code:
 tags...

[CODE]    <MouseRect>
      <Cursor>Hand</Cursor>
      <TooltipText>Vent Left</TooltipText>
      <CallbackCode>
            (L:VentLeft, number) ! (>L:VentLeft, number)
      </CallbackCode>
    </MouseRect>

The command (L:VentLeft, number) ! (>L:VentLeft, number) simply toggles the value from 0 to 1 to 0 to 1, etc.

Code:
    <Name>vent_left</Name>
    <AnimLength>100</AnimLength>
    <Animation>
      <Parameter>
        <Code>
          (L:VentLeft, number) 100 *
        </Code>
        <Lag>40</Lag>
      </Parameter>
    </Animation>

This: (L:VentLeft, number) 100 * takes the value set and multiplies it by 100, so the output is either 0 or 100.

The <Lag>40</Lag> command sets the "speed" at which the window will move.

For FSX, you must use the Animation Manager to assign the <PartName> vent_left to the window, Start: 0 End: 100

You must also use the Attachpoint Tool to assign the Mouse Rectangle to the <PartName> vent_left.
 
Thank you N4gix again but It seems to be a issue with this script.
I attach point and re-write script.
Its look like this and its not working at external view in FSX.
Code:
<PartInfo>
    <Name>window_open</Name>
    <AnimLength>100</AnimLength>
    <Animation>
      <Parameter>
        <Code>
          (L:Window_open, number) 100 *
        </Code>
        <Lag>100</Lag>
      </Parameter>
    </Animation>
    <MouseRect>
      <Cursor>Hand</Cursor>
       <TooltipText>Left Window</TooltipText>
        <MouseFlags>LeftSingle</MouseFlags>
      <CallbackCode>
        (L:Window_open, number) ! (>L:Window_open, number)
      </CallbackCode>
    </MouseRect>
  </PartInfo>

<Animation name="window_open"      guid="BA850C9A-3657-4ae9-B520-1D9CAED97D17" length="100" type="Sim" typeParam2="window_open"  typeParam="Autoplay" />

 FSXML = <?xml version="1.0" encoding="ISO-8859-1" ?> <FSMakeMdlData version="9.0"> <MouseRect name="window_open"> </MouseRect> </FSMakeMdlData>
Part name is:window_open
 
You can't use the mouse in external views! The window will "open" in any view, but the mouse only works in any interior view...
 
EPIC FAIL.:D
Thanks m8.

No problem. This was one of the features that was scheduled to be added for FSvNext. It would have been neat to have the ability to open/close stuff while in spot view... ;)
 
Back
Top