PDA

View Full Version : Help expressions



Ethangar
11-18-2004, 09:51 AM
Hi.. It reached a point lately where I had to take a dive into expressons. I'm rigging an F/A-18C. I normally only do WW-II aircraft so this hasn't been a problem. See the F-18 uses flaperons. The controls on the back of the wing all act as normal ailerons and flaps. So in normal mode they run opposite to each other, one goes up and the other goes down. Thats no problem.

As flaps they deflect down all at once on both sides. The catch comes in when the flaps are down. They cannot exceed the max deflection of 25 deg but should still rise when the ailerons are in action... anyway... I got it all working with expressions watching a couple nulls
Flapmaster: Pitch controls the flaps going down.
Flightcontrol: Makes the ailerons move.
I used the following expression on the NULLS ailerons and flaps

clamp(([FlapMaster.Rotation.P,Time]+[FlightMaster.Rotation.B,Time]),-10,25)

Basically adding the pitch and bank channels of the control Nulls and making sure that the total doesn't exceed its travel limits. And it works great!!! (yay for me)

As long as its on frame 0 :eek:

As soon as its off frame 0 the expression doesn't do a thing. It works again as soon as I scrub back to 0. Same as if I leave it on 0 and deflect the controls then move to say frame 10. The controls will stay put and stop functioning. I've tried it with and without the ,Time part and that doesn't help either.

HELP!