Hello FBRTE,
there is no way of directly adjust the manifold pressure as far as I know. That is if you don't want to programm a C++ module and use simConnect...
However, you could implement some sort of PID controller that takes the manifold pressure as input and adjusts the throttle lever in order to achieve a set MAP. That can be achieved in XML, is a bit difficult though.
When I was first playing with the drag scripts I had the same problem of "jumping" levers when clicking on them for the first time. The reason was that all variables are initialized with "0" in your case it is most likely the L:MOUSEPOS variable that's causing the trouble.
To get rid of this issue I implemented a "LeftSingle" event as well that initializes the mousepos variable with the current mouse position.
Have a look at the drag-lever-thread in the "working XML" section over at fssdfdfsssfdfss to see what I mean - look at my second post for the latest version.
http://www.aerodynamika.com/cgi-bin/yabb2/YaBB.pl?num=1229500345
What I don't get from your example is the -2. It means that you animate the lever with keyframes 0 to 102 is that correct?
If so - why?
Vitus that was changed in a later post in that thread, and I adopted that later code, as I stated.
Hello Tom,
I know, I followed the discussion. I still don't see the point

The way I approach all these animations is the following:
1. I analyze the movement of the lever and decide on the KF range I use. Sometimes its easier to animate a lever from 0-80 instead of 0-100 to keep the maths simple (especially for snap-levers).
2. I decide if KF0 means "down", "up", "left", "right",...
3. I do the programming of the animation, and at that point I don't include ANY functionality. I just make sure that the lever moves in a proper way.
4. The last step is to add functionality on top of it.
Basically the animation is separate from the function of the lever, and that makes the code reusable, easily customizable, easier to maintain.
Cheers,
Vitus