- Messages
- 64
- Country

Hello everyone!
So, I'm slowly trying to understand how to code. Reading through the SDK, seeing everyone's examples... alot of great gouge but I'm a little slow on the power curve.
I'm trying to create a simple wing flex animation based on G Forces and velocity. I know there's a code within this forum that is rather long, but I'm trying to build one from scratch so I can better understand what each section of the code means, and how the math is applied to it. But, of course, my efforts generally fail because I'm clueless.
So, what I'm trying to do is have the wings flex between 2.5 and 4 g's above 215 knots. The animation for the flexing is 400 keyframes. Below is the code so far:
So, of course this doesn't work... I don't quite understand what the min max does.. the multiplier at the end I believe is supposed to be used to equal out the equation to "400", and perhaps I need to subtract something from the 2.5 to make it equal out to zero... I just don't know what I'm doing.
If anyone would be so kind as to help me with this code and give as detailed or brief a description of what each section means, I'd greatly appreciate it, and I it will make alot of the other codes on the site make much more sense to me!
Thank you for any assistance anyone can provide!
Jamal
So, I'm slowly trying to understand how to code. Reading through the SDK, seeing everyone's examples... alot of great gouge but I'm a little slow on the power curve.
I'm trying to create a simple wing flex animation based on G Forces and velocity. I know there's a code within this forum that is rather long, but I'm trying to build one from scratch so I can better understand what each section of the code means, and how the math is applied to it. But, of course, my efforts generally fail because I'm clueless.
So, what I'm trying to do is have the wings flex between 2.5 and 4 g's above 215 knots. The animation for the flexing is 400 keyframes. Below is the code so far:
Code:
<PartInfo>
<Name>wing_flexing</Name>
<AnimLength>400</AnimLength>
<Animation>
<Parameter>
<Code>
(A:VELOCITY BODY Z, knots) 215 > if{
(A:G FORCE,gforce) 2.5 min 4 max 1 * } els{ 0 }
</Code>
<Lag>400</Lag>
</Parameter>
</Animation>
</PartInfo>
So, of course this doesn't work... I don't quite understand what the min max does.. the multiplier at the end I believe is supposed to be used to equal out the equation to "400", and perhaps I need to subtract something from the 2.5 to make it equal out to zero... I just don't know what I'm doing.
If anyone would be so kind as to help me with this code and give as detailed or brief a description of what each section means, I'd greatly appreciate it, and I it will make alot of the other codes on the site make much more sense to me!
Thank you for any assistance anyone can provide!
Jamal


