Tu-154B2 version 3.1:
[fg:toms-fgdata.git] / Aircraft / tu154b / Instruments-3d / switches / azs1-26.xml
1 <?xml version="1.0"?>
2 <!--
3     #############################################################################
4     #    (C) 2007 by Yurik V. Nikiforoff - port for FGFS,  FDM,                 #
5     #   2d & 3d instruments, animations, systems and over.                      #
6     #           yurik@megasignal.com                                            #
7     #############################################################################         
8     -->
9
10 <!-- AZS type 1
11 3D instrument for Tu-154 -->
12 <PropertyList>
13  <path>azs_1.ac</path>
14 <!--External panel lighting-->
15 <animation>
16   <type>material</type>
17   <object-name>handle</object-name>
18   <emission>
19     <red-prop>tu154/light/panel/ext-red</red-prop>
20     <green-prop>tu154/light/panel/ext-green</green-prop>
21     <blue-prop>tu154/light/panel/ext-blue</blue-prop>
22   </emission>
23 </animation>
24
25   
26 <animation>
27   <type>rotate</type>
28   <object-name>handle</object-name>
29   <property>tu154/switches/APU-starter-switch</property>  
30   <interpolation>
31     <entry><ind>        0.0</ind>       <dep>   -60.0</dep></entry>
32     <entry><ind>        1.0</ind>       <dep>   60.0</dep></entry>
33   </interpolation>
34   <axis>
35     <x>0.0</x>
36     <y>-1.0</y>
37     <z>0.0</z>
38   </axis>
39 </animation>
40
41 <!--Control-->
42 <animation>
43   <type>pick</type>
44   <object-name>hotspot_1</object-name>
45   <visible>false</visible>
46   <action>
47     <button>0</button>
48     <repeatable>false</repeatable>
49     <binding>
50       <command>nasal</command>
51       <script>
52         interpolate("tu154/switches/APU-starter-switch", 1.0, 0.1 );
53         interpolate("tu154/systems/APU/APU-damper", 1.0, 4.0 );
54         instruments.realias("tu154/systems/APU/n2", "engines/engine[3]/n2", 4);
55       </script>
56     </binding>
57   </action>
58 </animation>
59 <animation>
60   <type>pick</type>
61   <object-name>hotspot_2</object-name>
62   <visible>false</visible>
63   <action>
64     <button>0</button>
65     <repeatable>false</repeatable>
66     <binding>
67       <command>nasal</command>
68       <script>
69         if (getprop("engines/engine[3]/running")) {
70             settimer(func {
71                 instruments.realias("tu154/systems/APU/n2", 0, 1);
72             }, 11);
73         } else {
74             var t = getprop("engines/engine[3]/n2") / 10 + 2;
75             instruments.realias("tu154/systems/APU/n2", 0, t);
76         }
77         interpolate("tu154/switches/APU-starter-switch", 0.0, 0.1 );
78         interpolate("tu154/systems/APU/APU-damper", 0.0, 4.0 );
79       </script>
80     </binding>
81   </action>
82 </animation>
83
84
85
86 </PropertyList>