I have looked through the code of the interactive jetways, which do not all extend when I click one, and was very astonished to see that they too share one property ! How does it come this works for the jetways, but not for the boats ?
Here are the relevant parts of the boat's XML file:
- Code: Select all
<PropertyList>
<path>SailBoat_38feet.ac</path>
<animation>
<type>rotate</type>
<property>sim/scenery/boats/osc-pos-norm</property>
<factor>5</factor>
<center>
<x-m>0</x-m>
<y-m>0</y-m>
<z-m>0</z-m>
</center>
<axis>
<x>0</x>
<y>1</y>
<z>0</z>
</axis>
</animation>
<nasal>
<load><![CDATA[
setprop("sim/scenery/boats/osc-pos-norm", 0);
var update = func() {
var currentOscPos = getprop("sim/scenery/boats/osc-pos-norm");
if (currentOscPos > 0) {
interpolate("sim/scenery/boats/osc-pos-norm", -1, 5);
} else {
interpolate("sim/scenery/boats/osc-pos-norm", 1, 5);
}
}
oscTimer = maketimer(5, update);
oscTimer.singleShot = 0;
oscTimer.simulatedTime = 1;
oscTimer.start();
]]></load>
<unload><![CDATA[
oscTimer.stop();
]]></unload>
</nasal>
</PropertyList>
(I know it is buggy, it's the result of 15 minutes)