I would like to add flaps to an airplane. Flaps are surfaces on the trailing edge of airplane wings that hinge down to increase drag and decrease the stall speed. I saw that there are the fields "drag", "lift", and "stallSpeed" in the WheeledVehicleData of Strato's A10 (and other vehicles. I used the A10 for research because it has a similar flaps system). To do this, I would like to modify the "drag", "stallspeed", and possibly "lift" values by pressing and holding the light key (or triggering it via interactive vehicles).
The A10 has pseudo-flaps that are used to slow the vehicle down, for landings or more accurate shooting. The system used in the A10 script scales the vehicle speed, slowing the vehicle down (as far as I can tell). This is a similar effect that I would like to have occur, but not quite what I want. The function that contains the flaps is referenced below.
function A10Vehicle::onTrigger(%this,%obj,%trigNum,%val)
{
//echo(%trigNum SPC %val);
if(%val)
{
%obj.setVelocity(vectorScale(%obj.getVelocity(),0.99));
%obj.playthread(1,flapopen);
%obj.brake=true;
}
else
{
%obj.unmountimage(0);
%obj.playthread(1,flapclose);
%obj.brake=false;
}
}
In the past and in my recent research, I have read threads discussing the issue I am having, but I could never get a concise answer. From what I have read, it would require work-arounds or buggy scripting, thus rendering it impossible.
Is this true, or is there some way? Is the system that the A10 uses the most logical system? One reference (second listed below) I found discussed toggling two datablocks to change the type of vehicle it is, which could be implemented to suit my needs, if logical. Any suggestions for other ways to do this would be much appreciated.
References:
http://forum.blockland.us/index.php?topic=239593.0 (topic discussing a similar issue)
http://forum.blockland.us/index.php?topic=149521.0 (possible work-around)
http://www-rohan.sdsu.edu/~stewart/GPGT/Appendix%20A%20-%20Quick%20References.pdf (torquescript reference)