1
0
Fork 0
fgdata/Aircraft/ufo/ufo-set.xml

59 lines
1.2 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");
var speed = [5, 10, 20, 50, 100, 200, 500, 1000, 2000, 5000, 10000, 20000, 50000];
var current = 8;
controls.flapsDown = func(x) {
if (!x) { return }
if (x > 0 and current > 0) {
current -= 1;
} elsif (x &lt; 0 and current &lt; size(speed) - 1) {
current += 1;
}
var s = speed[current];
maxspeed.setDoubleValue(s);
gui.popupTip(sprintf("MaxSpeed " ~ s ~ " m/s"));
}
</script>
</ufo>
</nasal>
</PropertyList>