* Justin Smithies -- Sunday 26 March 2006 23:56: > Another nasal question then if you can help. > > How do i also make the flaps and rudder very sluggish ( Not very responsive ( > Heavy )) if the volts are below 22 ?
For example: var flaps = props.globals.getNode("/controls/flight/flaps"); flapsDown = func(mode) { var voltage = getprop("/systems/electrical/volts"); if (!mode or voltage < 10) { interpolate(flaps); return; } var target = mode > 0 ? 1 : 0; var time = 6 + abs(22 - voltage) * 2.345; # time for full movement interpolate(flaps, target, abs(flaps.getValue() - target) * time); } settimer(func { controls.flapsDown = flapsDown }, 1); The flaps can also be stopped from outside with interpolate(flaps). You may want to use more clever time calculation. m. ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel