1
0
Fork 0
fgdata/Aircraft/ufo/ufo-set.xml
mfranz c86cd8c013 "flaps down" -> decrease maximum speed
"flaps up"   -> increase maximum speed
2006-03-11 09:52:51 +00:00

56 lines
1.1 KiB
XML

<?xml version="1.0"?>
<PropertyList>
<sim>
<description>UFO from the 'White Project' of the UNESCO</description>
<author>ET</author>
<flight-model>ufo</flight-model>
<sound>
<path>Aircraft/ufo/ufo-sound.xml</path>
</sound>
<panel>
<visibility>false</visibility>
</panel>
<model>
<path>Aircraft/ufo/Models/ufo.xml</path>
</model>
<help>
<title>UFO</title>
<key>
<name>joystick fire button</name>
<desc>fly backwards</desc>
</key>
<key>
<name>[ ]</name>
<desc>increase/decrease maximum speed</desc>
</key>
</help>
</sim>
<nasal>
<ufo>
<script>
var maxspeed = props.globals.getNode("engines/engine/speed-max-mps");
controls.flapsDown = func(x) {
if (!x) { return }
var speed = maxspeed.getValue();
if (x > 0 and speed > 5) {
speed /= 1.5;
} elsif (x &lt; 0 and speed &lt; 20000) {
speed *= 1.5;
}
maxspeed.setDoubleValue(speed);
gui.popupTip(sprintf("MaxSpeed " ~ int(speed) ~ " m/s"));
}
</script>
</ufo>
</nasal>
</PropertyList>