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

FS2004 XML Ground Flex Effect

Messages
12
Country
unitedstates
Im trying to create an XML effect that will add a oscillating flexing effect on the wing to allow it to flex up and down while taxing (which is realistic for the 737SG im modelling right now). there is a slight problem with the code right now.

here is where it stands as of now

Code:
<part>
<name>POS_FLEXWING</name>
<animation>
<parameter>
<code>

40
(&gt;L:Strength_of_Oscillation,number)

0
-0.5 (P:ABSOLUTE TIME,seconds) 1 % + 0.5 / pi * sin (L:Strength_of_Oscillation,number) * 50 +
(&gt;L:ENGStepOscillate,number)

0
10 (:AIRSPEED TRUE,knot) -  
(&gt;L:ENGStep1,number)

0
(L:ENGStep1,number) (L:ENGStep1,number) *
(&gt;L:ENGStep2,number)

0
-0.09 (L:ENGStep2,number) *
(&gt;L:ENGStep3,number)

0
(L:ENGStep3,number) 10 +
(&gt;L:ENGStep4,number)

0
(L:ENGStepOscillate,number) (L:ENGStep4,number) *

</code>

</parameter>
</animation>
</part>

The first section was made for this project by Jakob at Project Opensky, then
what I added in was this equation -0.09(10-x)^2+10 (except written step by step since I cant write a stacked XML Equation) where the current speed of the aircraft is X. Then the resulting number is multiplied by the number that the oscillation code produced. Between 0-20 knts will result in a positive number and thus movement in the wing. above 20 knts will result in negative number and keyframe animation should be stuck at 0.

But the issue is that the animation is playing as if only this code exists

Code:
40
(&gt;L:Strength_of_Oscillation,number)

0
-0.5 (P:ABSOLUTE TIME,seconds) 1 % + 0.5 / pi * sin (L:Strength_of_Oscillation,number) * 50 +

I added the zero before each step to make sure to clear out the number that was in the previous step but it didn't work. is there anything I am missing that would fix the issue here.

Thanks in advance
 
Hi tech2008,

by browsing through your code I noticed that there is an "A" missing at this section:
Code:
10 (:AIRSPEED TRUE,knot) -  
(&gt;L:ENGStep1,number)

this causes that L:ENGStep1 is always 10 and if you follow the math you will see that therefore L:ENGSTEP4 is always 1.

corrected:
Code:
10 (A:AIRSPEED TRUE,knot) -  
(&gt;L:ENGStep1,number)

And please delete the useless 0s, as they just copy a "0" ON TOP of the stack, without deleting anything ;)

If you want to get rid of everything in the stack, use "c".

Regards
Vitus
 
oooh and I am not sure if "knot" is the correct unit. "knots" is used in the sdk!
 
Thank you that fixed it for the most part, but what wrong now is on the limiting equation side of things.

and on a side note, Knot seemed to work since I compiled it with only the A: fix and removal of the zero.
 
Back
Top