<PropertyList>
    
<path>LIMW_Hngr2.ac</path>






	<nasal>
		<load>
		if (!contains(globals, "scenery")) globals["scenery"] = {};
		if (!contains(scenery, "LIMW")) scenery["LIMW"] = {};
		if (!contains(scenery.LIMW, "hangar")) scenery.LIMW["hangar"] = [nil];
		scenery.LIMW.hangar[0] =
			{ door :
			[aircraft.door.new("/scenery/LIMW/hangar[0]/door[0]", 3)
			
			]
		};
		
		#this is the switch target sim time sun rad
		var limwswitch = 1.57;
		
		var loop_id = 0;

		var loop = func(id) {
				id == loop_id or return;
				var limwsun = getprop("/sim/time/sun-angle-rad");
				var doorstate = getprop("/scenery/LIMW/hangar[0]/door[0]/position-norm");
					#print ("limwsun  ", limwsun);
				
				if ((limwsun &gt; limwswitch) and (doorstate == 0)){
					scenery.LIMW.hangar[0].door[0].toggle();
					print ("toggle door  ");
					};
				
				if ((limwsun &lt; limwswitch) and (doorstate == 1)){
					scenery.LIMW.hangar[0].door[0].toggle();
					#print ("toggle door  ");
					};
		
			settimer(func { loop(id) }, 4);
			}
			loop(loop_id += 1);
	
		</load>
		<unload>loop_id += 1</unload>
	
	</nasal>


<animation> 
    <type>textranslate</type> 
    <object-name>windows</object-name> 
		
	<property>/sim/time/sun-angle-rad</property>
    <step> 1.57 </step>
    <factor>0.318471338</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>
 
  <animation>
    <type>material</type>
 <object-name>windows</object-name>
    <condition>
      <greater-than>
        <property>/sim/time/sun-angle-rad</property>
        <value>1.57</value>
      </greater-than>
    </condition>
    <emission>
      <red>   1 </red>
      <green> 1 </green>
      <blue>  1 </blue>
    </emission>
  </animation>

  <animation>
    <type>material</type>
   <object-name>windows</object-name>
	 
    <condition>
      <less-than-equals>
        <property>/sim/time/sun-angle-rad</property>
        <value>1.57</value>
      </less-than-equals>
    </condition>
    <emission>
      <red>   0.0 </red>
      <green> 0.0 </green>
      <blue>  0.0 </blue>
    </emission>
  </animation>
  
		
	
	
	<animation>
		<type>translate</type>
		<object-name>Door11</object-name>
			<property>/scenery/LIMW/hangar[0]/door[0]/position-norm</property>
			<factor>1</factor>
			<interpolation>
				<entry><ind> 0.0 </ind><dep>  0.00 </dep></entry>
				<entry><ind> 1.0 </ind><dep>  4.00 </dep></entry>
			</interpolation>
			<axis>
				<x>1</x>
				<y>0</y>
				<z>0</z>
			</axis>
	</animation>

	
	<animation>
		<type>translate</type>
		<object-name>Door12</object-name>
			<property>/scenery/LIMW/hangar[0]/door[0]/position-norm</property>
			<factor>1</factor>
			<interpolation>
				<entry><ind> 0.0 </ind><dep>  0.00 </dep></entry>
				<entry><ind> 1.0 </ind><dep>  7.20 </dep></entry>
			</interpolation>
			<axis>
				<x>1</x>
				<y>0</y>
				<z>0</z>
			</axis>
	</animation>


	<animation>
		<type>translate</type>
		<object-name>Door13</object-name>
			<property>/scenery/LIMW/hangar[0]/door[0]/position-norm</property>
			<factor>1</factor>
			<interpolation>
				<entry><ind> 0.0 </ind><dep>  0.00 </dep></entry>
				<entry><ind> 1.0 </ind><dep>  10.4 </dep></entry>
			</interpolation>
			<axis>
				<x>1</x>
				<y>0</y>
				<z>0</z>
			</axis>
	</animation>
	
	
	<animation>
		<type>translate</type>
		<object-name>Door14</object-name>
			<property>/scenery/LIMW/hangar[0]/door[0]/position-norm</property>
			<factor>1</factor>
			<interpolation>
				<entry><ind> 0.0 </ind><dep>  0.00 </dep></entry>
				<entry><ind> 1.0 </ind><dep>  13.6 </dep></entry>
			</interpolation>
			<axis>
				<x>1</x>
				<y>0</y>
				<z>0</z>
			</axis>
	</animation>

	
	<animation>
		<type>translate</type>
		<object-name>Door15</object-name>
			<property>/scenery/LIMW/hangar[0]/door[0]/position-norm</property>
			<factor>1</factor>
			<interpolation>
				<entry><ind> 0.0 </ind><dep>  0.00 </dep></entry>
				<entry><ind> 1.0 </ind><dep>  16.80 </dep></entry>
			</interpolation>
			<axis>
				<x>1</x>
				<y>0</y>
				<z>0</z>
			</axis>
	</animation>
				
	
	<animation>
		<type>translate</type>
		<object-name>Door21</object-name>
			<property>/scenery/LIMW/hangar[0]/door[0]/position-norm</property>
			<factor>1</factor>
			<interpolation>
				<entry><ind> 0.0 </ind><dep>  0.00 </dep></entry>
				<entry><ind> 1.0 </ind><dep> -4.00 </dep></entry>
			</interpolation>
			<axis>
				<x>1</x>
				<y>0</y>
				<z>0</z>
			</axis>
	</animation>

	
	<animation>
		<type>translate</type>
		<object-name>Door22</object-name>
			<property>/scenery/LIMW/hangar[0]/door[0]/position-norm</property>
			<factor>1</factor>
			<interpolation>
				<entry><ind> 0.0 </ind><dep>  0.00 </dep></entry>
				<entry><ind> 1.0 </ind><dep> -7.20 </dep></entry>
			</interpolation>
			<axis>
				<x>1</x>
				<y>0</y>
				<z>0</z>
			</axis>
	</animation>
	
	
	<animation>
		<type>translate</type>
		<object-name>Door23</object-name>
			<property>/scenery/LIMW/hangar[0]/door[0]/position-norm</property>
			<factor>1</factor>
			<interpolation>
				<entry><ind> 0.0 </ind><dep>  0.00 </dep></entry>
				<entry><ind> 1.0 </ind><dep> -10.4 </dep></entry>
			</interpolation>
			<axis>
				<x>1</x>
				<y>0</y>
				<z>0</z>
			</axis>
	</animation>
	
	
	<animation>
		<type>translate</type>
		<object-name>Door24</object-name>
			<property>/scenery/LIMW/hangar[0]/door[0]/position-norm</property>
			<factor>1</factor>
			<interpolation>
				<entry><ind> 0.0 </ind><dep>  0.00 </dep></entry>
				<entry><ind> 1.0 </ind><dep> -13.6 </dep></entry>
			</interpolation>
			<axis>
				<x>1</x>
				<y>0</y>
				<z>0</z>
			</axis>
	</animation>
	
	 
  <animation>
 <type>noshadow</type>
  <object-name>obli1</object-name>
  <object-name>obli2</object-name>
  
</animation>

<animation>
  <type>alpha-test</type>
   <alpha-factor>0.01</alpha-factor>
</animation>


<animation>
 <type>select</type>
  <object-name>obli1</object-name>
  <object-name>obli2</object-name>

  
<condition>
<greater-than>
<property>sim/time/sun-angle-rad</property>
<value>1.57</value>
</greater-than>
 </condition>
</animation>

    
<animation>
		<type>translate</type>
		<object-name>obli1</object-name>
		<offset-m>19.36001033</offset-m>
		<axis>
			<x>16</x>
			<y>0</y>
			<z>10.9</z>
		</axis>
</animation>
<animation>
		<type>translate</type>
		<object-name>obli2</object-name>
		<offset-m>27.8354091</offset-m>
		<axis>
			<x>16</x>
			<y>20</y>
			<z>10.9</z>
		</axis>
</animation>




    
<animation>
        
<type>billboard</type>       
  <object-name>obli1</object-name>
  <object-name>obli2</object-name>


<spherical type="bool">true</spherical>
    
</animation>

  
<animation>
    <type>dist-scale</type>
 <object-name>obli1</object-name>
  <object-name>obli2</object-name>

    
<interpolation>
      
<entry><ind>0</ind><dep>0.025</dep></entry>

<entry><ind>300</ind><dep>0.1</dep></entry>
      
<entry><ind>1500</ind><dep>0.3</dep></entry>
      
<entry><ind>4000</ind><dep>1</dep></entry>
      
<entry><ind>10000</ind><dep>1.5</dep></entry>
    
</interpolation>
  
</animation>




	
	
</PropertyList>