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

Gmax Speed condition Key Frame code

Messages
10,163
Country
us-arizona
Hey all,

I need some help. This is for a Gmax part animation, and a button that would control it.


I need to control a part by its key frames. It moves from zero, to 50, to 100 KF's, similar to a flap.

It is a custom L:var

It has a switch as well. The button makes the part go to KF50, then to KF 100, then back to KF zero.

There is an argument condition based on speed;
* If at 120 Knots &gt, and at 50 KF &gt, then go to 0 zero KF.

On the button, it would include a code string that locks the window at zero KF so you cannot lower it at 120 Knots and greater than.
* If at 120 Knots &gt, 0 KF


Now... My thoughts were to use an Enum with;
50 KF 0 ==
100 KF 1 ==
zero KF 2 ==

But, I have two 'quantities' occurring; key frame amount 'plus' an enum which enables 3 positions.

Also, the window must be at zero KF when bootup of the plane occurs, (windows up at bootup).

So, how would you work this? Can I use KF's? Should I use 'enum' and if I use enum, my issue then is how would I work the animations to come out at 50 KF's and 100 KF's. The animation of the part being animated (not the button, but the surface panel) is that it must move in a very smooth fashion, which will require many KF points, such as maybe 10 lock points or angle points.



How would you work this?
 
Hi,

hmm this looks remarkably similar to this thread :confused::

http://www.fsdeveloper.com/forum/showthread.php?t=59260

Anyway,
Now... My thoughts were to use an Enum with;
50 KF 0 ==
100 KF 1 ==
zero KF 2 ==

But, I have two 'quantities' occurring; key frame amount 'plus' an enum which enables 3 positions.

How about this then:
zero KF 0 ==
50 KF 1 ==
100 KF 2 ==

Your button controls the L:Var with values of eiher 0,1 or 2.
Multiply by 50 and you're set for animation over 100 keyframes.
This also ensures that it boots up with windows up (keyframe 0).

As for smooth animation i think that some experimenting with
<Lag>xxx</Lag> in your code should help you with that.
Just check out your makemdl.parts.xml (FS9) or modeldef.xml (FSX) for some examples on that, they are being used in the default codes as well.
And you would need only 3 keyframes : 0 - 50 -100, if feasable in your model depending on the difficulty of the movement.

Hope this helps.

grt
Willem
 
Last edited:
Thanks for the input Willem. I'll check that link.

On the windows, they have a semi-sophisticated path of twists and turns to keep from going through other panels, so it will have a lot of lock points along its KF trek. I wish I could do it in 3 single lock points or KF points.



Bill
 
Acckkk! How embarrassing. My humble apologies.

Shows you my life and how I am pulled in many different directions. Trying to stay on straight lines is so difficult. Thanks for the reminder.



Bill
 
Back
Top