AS350-Squirrel.xml 26 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009
  1. <?xml version="1.0"?>
  2. <!-- Eurocopter AS350 Helicopter by StuartC, animation set -->
  3. <PropertyList>
  4. <path>as350a.ac</path>
  5. <!-- MP sound call -->
  6. <sound>
  7. <path>Aircraft/AS350/Sounds/mp-sound.xml</path>
  8. </sound>
  9. <nasal>
  10. <load>
  11. var livery_update = aircraft.livery_update.new("Aircraft/AS350/Models/liveries", 30);
  12. var self = cmdarg();
  13. var aliases = [];
  14. for (var i = 0; i &lt; 6; i += 1) {
  15. var door = self.getNode("sim/model/bo105/doors/door[" ~ i ~ "]/position-norm", 1);
  16. var generic = self.getNode("sim/multiplay/generic/float[" ~ i ~ "]", 1);
  17. door.alias(generic);
  18. append(aliases, door);
  19. }
  20. aircraft.data.add(
  21. "instrumentation/kma20/test",
  22. "instrumentation/kma20/auto",
  23. "instrumentation/kma20/com1",
  24. "instrumentation/kma20/com2",
  25. "instrumentation/kma20/nav1",
  26. "instrumentation/kma20/nav2",
  27. "instrumentation/kma20/adf",
  28. "instrumentation/kma20/dme",
  29. "instrumentation/kma20/mkr",
  30. "instrumentation/kma20/sens",
  31. "instrumentation/kma20/knob"
  32. );
  33. <![CDATA[
  34. var root = cmdarg();
  35. var rootindex = root.getIndex();
  36. var mpPath = "/ai/models/multiplayer["~ rootindex ~"]/";
  37. var lightsPath = mpPath~"lightpack/"; #path to the property node, where all internal values are placed
  38. props.globals.initNode(mpPath~"sim/is-MP-Aircraft", 1, "BOOL");
  39. srand();
  40. #wherever you want to add randomization of time, use something like: + rand()*0.05-0.025 (included by default where appropriate)
  41. #list of switches for lights - if you don't intend to use some light, assign it nil value instead, like whateverSwitch = nil; and you don't need to care about anything else
  42. #IMPORTANT: don't put / on the start of the string, it's already included in the mpPath property
  43. var navSwitch = mpPath~"controls/lighting/nav-lights-switch";
  44. var beaconSwitch = mpPath~"controls/lighting/beacon-switch";
  45. var strobeSwitch = mpPath~"controls/lighting/strobe-switch";
  46. var landingSwitch = mpPath~"controls/lighting/landing-lights-switch";
  47. var taxiSwitch = mpPath~"controls/lighting/taxi-light-switch";
  48. var probeSwitch = mpPath~"controls/lighting/probe-light-switch";
  49. var whiteSwitch = mpPath~"controls/lighting/white-light-switch";
  50. var searchSwitch = mpPath~"controls/lighting/search-light-switch";
  51. #switch this from 1 to 0 if you want to use advanced cyclical fading animation of the the nav lights instead of being stable on when the switch is on
  52. navStillOn = 1;
  53. #I need to set listener on some MP transferred properties; this doesn't seem to work well sometimes, so I mirror them to the original location on any change
  54. #This also simplifies work as I can use almost the same code for MP as is the local Nasal. Furthermore, I can use meaningful property names in the model XML files instead of referencing the MP properties.
  55. var mpVar = {
  56. new: func(propIn, propOut) {
  57. var m = { parents: [mpVar] };
  58. m.propIn = propIn;
  59. m.propOut = propOut;
  60. if(propIn==nil or propOut==nil) return m;
  61. m.value = getprop(propIn);
  62. setprop(propOut, m.value);
  63. return m;
  64. },
  65. check: func {
  66. if(me.propIn==nil or me.propOut==nil) return;
  67. var newValue = getprop(me.propIn);
  68. if(newValue != me.value) {
  69. setprop(me.propOut, newValue);
  70. me.value = newValue;
  71. #print("value of "~me.propOut~" changed: "~newValue);
  72. }
  73. },
  74. };
  75. #init any property copy object needed in this array (anything you need to transfer over MP, but you are using the original paths in your xmls)
  76. #also used for properties you are using a listener on, or properties which you maybe want to manipulate during the <unload>
  77. #if you're just using the pack, change the values according to the MP bindings in the -set.xml file
  78. #you don't need to delete the entries if the path is nil - it gets skipped automatically and the MP path is just ignored
  79. var mirrorValues = [
  80. mpVar.new(mpPath~"sim/multiplay/generic/int[7]", mpPath~"sim/crashed"),
  81. mpVar.new(mpPath~"sim/multiplay/generic/int[0]", navSwitch),
  82. mpVar.new(mpPath~"sim/multiplay/generic/int[1]", beaconSwitch),
  83. mpVar.new(mpPath~"sim/multiplay/generic/int[1]", strobeSwitch),
  84. mpVar.new(mpPath~"sim/multiplay/generic/int[2]", landingSwitch),
  85. mpVar.new(mpPath~"sim/multiplay/generic/int[3]", taxiSwitch),
  86. mpVar.new(mpPath~"sim/multiplay/generic/int[3]", probeSwitch),
  87. mpVar.new(mpPath~"sim/multiplay/generic/int[0]", whiteSwitch),
  88. mpVar.new(mpPath~"sim/multiplay/generic/int[8]", searchSwitch),
  89. ];
  90. #loop at the default MP transfer frequency (10Hz)
  91. var mirrorTimer = maketimer(0.1, func {
  92. foreach(var mir; mirrorValues) {
  93. mir.check();
  94. }
  95. });
  96. mirrorTimer.start();
  97. #### NAV LIGHTS ####
  98. #class for a periodic fade in/out animation - for flashing, use rather standard aircraft.light.new(), as in Beacon and Strobe section
  99. var lightCycle = {
  100. #constructor
  101. new: func(propSwitch, propOut) {
  102. m = { parents: [lightCycle] };
  103. props.globals.initNode(propOut, 0, "DOUBLE");
  104. props.globals.initNode(propSwitch, 1, "BOOL");
  105. m.fadeIn = 0.4 + rand()*0.05-0.025; #fade in time
  106. m.fadeOut = 0.4 + rand()*0.05-0.025; #fade out time
  107. m.stayOn = 1.5 + rand()*0.05-0.025; #stable on period
  108. m.stayOff = 1 + rand()*0.05-0.025; #stable off period
  109. m.turnOff = 0.12; #fade out time when turned off
  110. m.phase = 0; #phase to be run on next timer call: 0 -> fade in, 1 -> stay on, 2 -> fade out, 3 -> stay off
  111. m.cycleTimer = maketimer(0.1, func {
  112. if(getprop(propSwitch)) {
  113. if(m.phase == 0) {
  114. interpolate(propOut, 1, m.fadeIn);
  115. m.phase = 1;
  116. m.cycleTimer.restart(m.fadeIn);
  117. }
  118. else if(m.phase == 1){
  119. m.phase = 2;
  120. m.cycleTimer.restart(m.stayOn);
  121. }
  122. else if(m.phase == 2){
  123. interpolate(propOut, 0, m.fadeOut);
  124. m.phase = 3;
  125. m.cycleTimer.restart(m.fadeOut);
  126. }
  127. else if(m.phase == 3){
  128. m.phase = 0;
  129. m.cycleTimer.restart(m.stayOff);
  130. }
  131. }
  132. else {
  133. interpolate(propOut, 0, m.turnOff); #kills any currently ongoing interpolation
  134. m.phase = 0;
  135. }
  136. });
  137. m.cycleTimer.singleShot = 1;
  138. if(propSwitch==nil) {
  139. m.listen = nil;
  140. return m;
  141. }
  142. m.listen = setlistener(propSwitch, func{m.cycleTimer.restart(0);}); #handle switch changes
  143. m.cycleTimer.restart(0); #start the looping
  144. return m;
  145. },
  146. #destructor
  147. del: func {
  148. if(me.listen!=nil) removelistener(me.listen);
  149. me.cycleTimer.stop();
  150. },
  151. };
  152. #By default, the switch property is initialized to 1 (only if no value is already assigned). Don't change the class implementation! To override this, set the property manually. You don't need to care if any other code already does it for you.
  153. var navLights = nil;
  154. if(!navStillOn) {
  155. navLights = lightCycle.new(navSwitch, lightsPath~"nav-lights-intensity");
  156. ### Uncomment and tune those to customize times ###
  157. #navLights.fadeIn = 0.4; #fade in time
  158. #navLights.fadeOut = 0.4; #fade out time
  159. #navLights.stayOn = 3 + rand()*0.05-0.025; #stable on period
  160. #navLights.stayOff = 0.6; #stable off period
  161. #navLights.turnOff = 0.12; #fade out time when turned off
  162. }
  163. ### BEACON ###
  164. var beacon = nil;
  165. if(beaconSwitch!=nil) {
  166. props.globals.initNode(beaconSwitch, 1, "BOOL");
  167. beacon = aircraft.light.new(lightsPath~"beacon-state",
  168. [0.0, 1.0 + rand()*0.05-0.025], beaconSwitch);
  169. }
  170. ### STROBE ###
  171. var strobe = nil;
  172. if(strobeSwitch!=nil) {
  173. props.globals.initNode(strobeSwitch, 1, "BOOL");
  174. strobe = aircraft.light.new(lightsPath~"strobe-state",
  175. [0.0, 0.87 + rand()*0.05-0.025], strobeSwitch);
  176. }
  177. ### LIGHT FADING ###
  178. #class for controlling fade in/out behavior - propIn is a control property (handled as a boolean) and propOut is interpolated
  179. #all light brightness animations in xmls depend on propOut (Rembrandt brightness, material emission, flares transparency, ...)
  180. var lightFadeInOut = {
  181. #constructor
  182. new: func(propSwitch, propOut) {
  183. m = { parents: [lightFadeInOut] };
  184. m.fadeIn = 0.3; #some sane defaults
  185. m.fadeOut = 0.4;
  186. if(propSwitch==nil) {
  187. m.listen = nil;
  188. return m;
  189. }
  190. props.globals.initNode(propSwitch, 1, "BOOL");
  191. m.isOn = getprop(propSwitch);
  192. props.globals.initNode(propOut, m.isOn, "DOUBLE");
  193. m.listen = setlistener(propSwitch,
  194. func {
  195. if(m.isOn and !getprop(propSwitch)) {
  196. interpolate(propOut, 0, m.fadeOut);
  197. m.isOn = 0;
  198. }
  199. if(!m.isOn and getprop(propSwitch)) {
  200. interpolate(propOut, 1, m.fadeIn);
  201. m.isOn = 1;
  202. }
  203. }
  204. );
  205. return m;
  206. },
  207. #destructor
  208. del: func {
  209. if(me.listen!=nil) removelistener(me.listen);
  210. },
  211. };
  212. fadeLanding = lightFadeInOut.new(landingSwitch, lightsPath~"landing-lights-intensity");
  213. fadeLanding = lightFadeInOut.new(searchSwitch, lightsPath~"search-lights-intensity");
  214. fadeTaxi = lightFadeInOut.new(taxiSwitch, lightsPath~"taxi-light-intensity");
  215. fadeProbe = lightFadeInOut.new(probeSwitch, lightsPath~"probe-light-intensity");
  216. fadeWhite = lightFadeInOut.new(whiteSwitch, lightsPath~"white-light-intensity");
  217. if(navStillOn) {
  218. navLights = lightFadeInOut.new(navSwitch, lightsPath~"nav-lights-intensity");
  219. navLights.fadeIn = 0.1;
  220. navLights.fadeOut = 0.12;
  221. }
  222. #manipulate times if defaults don't fit your needs:
  223. #fadeLanding.fadeIn = 0.5;
  224. #fadeLanding.fadeOut = 0.8;
  225. ### the rest of your model load embedded Nasal code ###
  226. ]]>
  227. </load>
  228. <unload>
  229. #prevent multiple timers and listeners from running and fighting on next connect
  230. #cleanly destroy MP property mirroring
  231. mirrorTimer.stop();
  232. mirrorTimer = nil;
  233. mirrorValues = nil;
  234. #cleanly destroy nav lights
  235. if(navStillOn) {
  236. navLights.del();
  237. }
  238. else {
  239. if(navSwitch!=nil) setprop(navSwitch, 0);
  240. navLights.del();
  241. if(navSwitch!=nil) navLights.cycleTimer = nil;
  242. navLights = nil;
  243. }
  244. #cleanly destroy beacon
  245. if(beaconSwitch!=nil) setprop(beaconSwitch, 0);
  246. beacon.del();
  247. beacon = nil;
  248. #cleanly destroy strobe
  249. if(strobeSwitch!=nil) setprop(strobeSwitch, 0);
  250. strobe.del();
  251. strobe = nil;
  252. #cleanly destroy light fade in/out animation objects
  253. fadeLanding.del();
  254. fadeTaxi.del();
  255. fadeProbe.del();
  256. fadeWhite.del();
  257. ### the rest of your model unload embedded Nasal code ###
  258. livery_update.stop();
  259. foreach (var a; aliases)
  260. a.unalias();
  261. searchlightx.unalias();
  262. searchlightz.unalias();
  263. rope.unalias();
  264. </unload>
  265. </nasal>
  266. <!--
  267. <effect>
  268. <inherits-from>Aircraft/AS350/Models/Effects/reflect-uber</inherits-from>
  269. <object-name>Door_L_2</object-name>
  270. <object-name>Door_R_1</object-name>
  271. <object-name>Front_Door_L_pivot_2</object-name>
  272. <object-name>fuselage-main.001</object-name>
  273. <object-name>fuselage-main</object-name>
  274. <object-name>mirrors_3</object-name>
  275. <object-name>fuselage-mid</object-name>
  276. <object-name>mirrors_1</object-name>
  277. <object-name>fuselage_tail</object-name>
  278. <object-name>fuselage_9a</object-name>
  279. <object-name>fuselage_9a.001</object-name>
  280. <object-name>fuselage_9</object-name>
  281. </effect>
  282. -->
  283. <effect>
  284. <inherits-from>Aircraft/AS350/Models/Effects/reflect-uber1</inherits-from>
  285. <object-name>Door_L_2</object-name>
  286. <object-name>Door_R_1</object-name>
  287. <object-name>Front_Door_L_pivot_2</object-name>
  288. <object-name>fuselage-main.001</object-name>
  289. <object-name>fuselage-main</object-name>
  290. </effect>
  291. <effect>
  292. <inherits-from>Aircraft/AS350/Models/Effects/reflect-uber2</inherits-from>
  293. <object-name>fuselage-mid</object-name>
  294. <object-name>mirrors_1</object-name>
  295. </effect>
  296. <effect>
  297. <inherits-from>Aircraft/AS350/Models/Effects/reflect-uber3</inherits-from>
  298. <object-name>fuselage_tail</object-name>
  299. </effect>
  300. <effect>
  301. <inherits-from>Aircraft/AS350/Models/Effects/reflect-uber4</inherits-from>
  302. <object-name>fuselage_9a</object-name>
  303. <object-name>fuselage_9</object-name>
  304. </effect>
  305. <animation>
  306. <type>material</type>
  307. <object-name>Door_L_2</object-name>
  308. <object-name>Door_R_1</object-name>
  309. <object-name>Front_Door_L_pivot_2</object-name>
  310. <object-name>fuselage-main.001</object-name>
  311. <object-name>fuselage-main</object-name>
  312. <object-name>mirrors_3</object-name>
  313. <property-base>sim/model/livery</property-base>
  314. <texture-prop>texture1</texture-prop>
  315. <texture>as350b_01.jpg</texture>
  316. </animation>
  317. <animation>
  318. <type>material</type>
  319. <object-name>fuselage-mid</object-name>
  320. <object-name>mirrors_1</object-name>
  321. <property-base>sim/model/livery</property-base>
  322. <texture-prop>texture2</texture-prop>
  323. <texture>as350b_02.jpg</texture>
  324. </animation>
  325. <animation>
  326. <type>material</type>
  327. <object-name>fuselage_tail</object-name>
  328. <property-base>sim/model/livery</property-base>
  329. <texture-prop>texture3</texture-prop>
  330. <texture>as350b_03.jpg</texture>
  331. </animation>
  332. <animation>
  333. <type>material</type>
  334. <!-- <object-name>fuselage_3</object-name>-->
  335. <object-name>fuselage_9a</object-name>
  336. <object-name>fuselage_9</object-name>
  337. <property-base>sim/model/livery</property-base>
  338. <texture-prop>texture4</texture-prop>
  339. <texture>as350b_04.jpg</texture>
  340. </animation>
  341. <animation>
  342. <type>material</type>
  343. <object-name>MainHub</object-name>
  344. <object-name>blade1-1</object-name>
  345. <object-name>blade2-1</object-name>
  346. <object-name>blade3-1</object-name>
  347. <object-name>blade1-2</object-name>
  348. <object-name>blade2-2</object-name>
  349. <object-name>blade3-2</object-name>
  350. <object-name>blade1-3</object-name>
  351. <object-name>blade2-3</object-name>
  352. <object-name>blade3-3</object-name>
  353. <object-name>blade1-4</object-name>
  354. <object-name>blade2-4</object-name>
  355. <object-name>blade3-4</object-name>
  356. <property-base>sim/model/livery</property-base>
  357. <texture-prop>blades</texture-prop>
  358. <texture>as350b_05.jpg</texture>
  359. </animation>
  360. <animation>
  361. <type>material</type>
  362. <object-name>blurred1</object-name>
  363. <object-name>blurred2</object-name>
  364. <object-name>blurred3</object-name>
  365. <property-base>sim/model/livery</property-base>
  366. <texture-prop>blur</texture-prop>
  367. <texture>rotorblur.png</texture>
  368. </animation>
  369. <!-- Solid Surfaces for Rembrandt rendering -->
  370. <animation>
  371. <object-name>fuselage_tail</object-name>
  372. <object-name>fuselage-main</object-name>
  373. <object-name>fuselage</object-name>
  374. <object-name>fuselage_13</object-name>
  375. <object-name>fuselage_0</object-name>
  376. <object-name>Door_L_2</object-name>
  377. <object-name>Front_Door_L_pivot_2</object-name>
  378. <object-name>fuselage_9</object-name>
  379. <object-name>Door_R_1</object-name>
  380. <object-name>fuselage_6</object-name>
  381. <object-name>fuselage_9</object-name>
  382. <object-name>mirrors_3</object-name>
  383. <object-name>blades</object-name>
  384. <object-name>fuselage-main.001</object-name>
  385. </animation>
  386. <!-- rembrandt auto switching for glass -->
  387. <effect>
  388. <inherits-from>Effects/model-transparent</inherits-from>
  389. <condition>
  390. <property>sim/rendering/rembrandt/enabled</property>
  391. </condition>
  392. <object-name>blurred</object-name>
  393. <object-name>propblur</object-name>
  394. <object-name>propdisc</object-name>
  395. </effect>
  396. <effect>
  397. <inherits-from>Aircraft/AS350/Models/Effects/bk117reflectglas-uber</inherits-from>
  398. <object-name>cockpitglass</object-name>
  399. <object-name>right-rear-glass</object-name>
  400. <object-name>Door_L_0-glass</object-name>
  401. <object-name>right-f-door-glass</object-name>
  402. <object-name>left-f-door-glass</object-name>
  403. <object-name>mirrors_3</object-name>
  404. </effect>
  405. <effect>
  406. <inherits-from>Effects/glass</inherits-from>
  407. <object-name>cockpitglassin</object-name>
  408. <object-name>right-rear-glassin</object-name>
  409. <object-name>Door_L_0-glassin</object-name>
  410. <object-name>right-f-door-glasin</object-name>
  411. <object-name>left-f-door-glassin</object-name>
  412. </effect>
  413. <!--interior -->
  414. <model>
  415. <path>Aircraft/AS350/Models/Interior/panel.xml</path>
  416. <offsets>
  417. <x-m>2.021</x-m>
  418. <y-m>0</y-m>
  419. <z-m>0.66 </z-m>
  420. <pitch-deg>0</pitch-deg>
  421. </offsets>
  422. </model>
  423. <!-- overhead starter -->
  424. <model>
  425. <path>Aircraft/AS350/Models/Interior/Instruments/Engineswitch/engineswitch.xml</path>
  426. <offsets>
  427. <x-m>-1.96</x-m>
  428. <y-m>0.085</y-m>
  429. <z-m>1.183 </z-m>
  430. <pitch-deg>100</pitch-deg>
  431. <heading-deg>180</heading-deg>
  432. </offsets>
  433. </model>
  434. <animation>
  435. <type>select</type>
  436. <object-name>pilot1</object-name>
  437. <condition>
  438. <not>
  439. <equals>
  440. <property>sim/current-view/view-number</property>
  441. <value>0</value>
  442. </equals>
  443. </not>
  444. </condition>
  445. </animation>
  446. <animation>
  447. <type>select</type>
  448. <object-name>pilot1</object-name>
  449. <condition>
  450. <not>
  451. <equals>
  452. <property>sim/current-view/view-number</property>
  453. <value>12</value>
  454. </equals>
  455. </not>
  456. </condition>
  457. </animation>
  458. <animation>
  459. <type>select</type>
  460. <object-name>crew1</object-name>
  461. <condition>
  462. <not>
  463. <equals>
  464. <property>sim/current-view/view-number</property>
  465. <value>10</value>
  466. </equals>
  467. </not>
  468. </condition>
  469. </animation>
  470. <!-- rotor animation-->
  471. <model>
  472. <name>main-rotor</name>
  473. <path>Aircraft/AS350/Models/mainrotor/mainrotor.xml</path>
  474. <offsets>
  475. <x-m> 0.000 </x-m>
  476. <y-m> 0.000 </y-m>
  477. <z-m> 0</z-m>
  478. </offsets>
  479. </model>
  480. <!-- tail rotor -->
  481. <model>
  482. <path>Aircraft/AS350/Models/TailRotor/tailrotor.xml</path>
  483. <offsets>
  484. <x-m> 6.1 </x-m>
  485. <y-m> 0.373 </y-m>
  486. <z-m> 0.7 </z-m>
  487. <roll-deg> 90 </roll-deg>
  488. <pitch-deg> 0 </pitch-deg>
  489. <heading-deg> 180 </heading-deg>
  490. </offsets>
  491. <overlay>
  492. <animation n="100">
  493. <type>scale</type>
  494. <property>constants/zero</property>
  495. <x-offset>0.76</x-offset>
  496. <y-offset>0.76</y-offset>
  497. <z-offset>0.76</z-offset>
  498. </animation>
  499. </overlay>
  500. </model>
  501. <!-- light pack -->
  502. <model>
  503. <path>Aircraft/AS350/Models/Lights/LightPack.xml</path>
  504. <offsets>
  505. <x-m>0</x-m>
  506. <y-m>0</y-m>
  507. <z-m>0</z-m>
  508. </offsets>
  509. </model>
  510. <!--== particles ==-->
  511. <model>
  512. <name>mainrotors_dirt</name>
  513. <path>Aircraft/AS350/Models/Effects/particle/rotor_particle.xml</path>
  514. <offsets>
  515. <x-m> 0.000 </x-m>
  516. <y-m> 0.000 </y-m>
  517. <z-m> 0.700 </z-m>
  518. </offsets>
  519. </model>
  520. <!-- Doors -->
  521. <animation>
  522. <name>door_front_L</name>
  523. <object-name>Front_Door_L_pivot_2</object-name>
  524. <object-name>Front_Door_L_pivot_1</object-name>
  525. <object-name>Front_Door_L_pivot_0</object-name>
  526. <object-name>left-f-door-glass</object-name>
  527. <object-name>left-f-door-glassin</object-name>
  528. <object-name>Front_Door_L_pivo</object-name>
  529. </animation>
  530. <animation>
  531. <name>door_front_R</name>
  532. <object-name>Door_R_1</object-name>
  533. <object-name>Door_R_2</object-name>
  534. <object-name>Door_R_0</object-name>
  535. <object-name>right-f-door-glass</object-name>
  536. <object-name>right-f-door-glasin</object-name>
  537. </animation>
  538. <animation>
  539. <name>door_back_R</name>
  540. <object-name>fuselage_6.001</object-name>
  541. <object-name>fuselage-main.001</object-name>
  542. <object-name>right-rear-glass</object-name>
  543. <object-name>right-rear-glassin</object-name>
  544. </animation>
  545. <animation>
  546. <name>door_back_L</name>
  547. <object-name>Door_L_2</object-name>
  548. <object-name>Door_L_1</object-name>
  549. <object-name>Door_L_0</object-name>
  550. <object-name>Door_L_0-glassin</object-name>
  551. <object-name>Door_L_0-glass</object-name>
  552. </animation>
  553. <animation>
  554. <name>reardoor_R</name> <!-- used for the floor hatch -->
  555. <object-name>door_cabin02.001</object-name>
  556. <object-name>door_cabin01.001</object-name>
  557. </animation>
  558. <animation>
  559. <type>pick</type>
  560. <object-name>door_front_R</object-name>
  561. <action>
  562. <button>0</button>
  563. <binding>
  564. <command>nasal</command>
  565. <script>bo105.doors.list[0].toggle()</script>
  566. </binding>
  567. </action>
  568. </animation>
  569. <animation>
  570. <type>pick</type>
  571. <object-name>door_front_L</object-name>
  572. <action>
  573. <button>0</button>
  574. <binding>
  575. <command>nasal</command>
  576. <script>bo105.doors.list[1].toggle()</script>
  577. </binding>
  578. </action>
  579. </animation>
  580. <animation>
  581. <type>pick</type>
  582. <object-name>door_back_R</object-name>
  583. <action>
  584. <button>0</button>
  585. <binding>
  586. <command>nasal</command>
  587. <script>bo105.doors.list[2].toggle()</script>
  588. </binding>
  589. </action>
  590. </animation>
  591. <animation>
  592. <type>pick</type>
  593. <object-name>door_back_L</object-name>
  594. <action>
  595. <button>0</button>
  596. <binding>
  597. <command>nasal</command>
  598. <script>bo105.doors.list[3].toggle()</script>
  599. </binding>
  600. </action>
  601. </animation>
  602. <animation>
  603. <type>pick</type>
  604. <object-name>reardoor_R</object-name>
  605. <action>
  606. <button>0</button>
  607. <binding>
  608. <command>nasal</command>
  609. <script>bo105.doors.list[4].toggle()</script>
  610. </binding>
  611. </action>
  612. </animation>
  613. <animation>
  614. <type>select</type>
  615. <object-name>door_front_R</object-name>
  616. <condition>
  617. <or>
  618. <property>sim/model/bo105/doors/door[0]/enabled</property>
  619. <not>
  620. <equals>
  621. <property>sim/aircraft</property>
  622. <value>bo105</value>
  623. </equals>
  624. </not>
  625. </or>
  626. </condition>
  627. </animation>
  628. <animation>
  629. <type>select</type>
  630. <object-name>door_front_L</object-name>
  631. <condition>
  632. <or>
  633. <property>sim/model/bo105/doors/door[1]/enabled</property>
  634. <not>
  635. <equals>
  636. <property>sim/aircraft</property>
  637. <value>bo105</value>
  638. </equals>
  639. </not>
  640. </or>
  641. </condition>
  642. </animation>
  643. <animation>
  644. <type>select</type>
  645. <object-name>door_back_R</object-name>
  646. <condition>
  647. <or>
  648. <property>sim/model/bo105/doors/door[2]/enabled</property>
  649. <not>
  650. <equals>
  651. <property>sim/aircraft</property>
  652. <value>bo105</value>
  653. </equals>
  654. </not>
  655. </or>
  656. </condition>
  657. </animation>
  658. <animation>
  659. <type>select</type>
  660. <object-name>door_back_L</object-name>
  661. <condition>
  662. <or>
  663. <property>sim/model/bo105/doors/door[3]/enabled</property>
  664. <not>
  665. <equals>
  666. <property>sim/aircraft</property>
  667. <value>bo105</value>
  668. </equals>
  669. </not>
  670. </or>
  671. </condition>
  672. </animation>
  673. <animation>
  674. <type>select</type>
  675. <object-name>reardoor_R</object-name>
  676. <condition>
  677. <or>
  678. <property>sim/model/bo105/doors/door[4]/enabled</property>
  679. <not>
  680. <equals>
  681. <property>sim/aircraft</property>
  682. <value>bo105</value>
  683. </equals>
  684. </not>
  685. </or>
  686. </condition>
  687. </animation>
  688. <animation>
  689. <type>rotate</type>
  690. <object-name>door_front_R</object-name>
  691. <property>sim/model/bo105/doors/door[0]/position-norm</property>
  692. <factor>100</factor>
  693. <axis>
  694. <x1-m> -2.52 </x1-m>
  695. <y1-m> 0.85 </y1-m>
  696. <z1-m>0.3 </z1-m>
  697. <x2-m> -2.2 </x2-m>
  698. <y2-m> 0.75 </y2-m>
  699. <z2-m> 0.88</z2-m>
  700. </axis>
  701. </animation>
  702. <animation>
  703. <type>rotate</type>
  704. <object-name>door_front_L</object-name>
  705. <property>sim/model/bo105/doors/door[1]/position-norm</property>
  706. <factor>-100</factor>
  707. <axis>
  708. <x1-m> -2.52 </x1-m>
  709. <y1-m> -0.85 </y1-m>
  710. <z1-m>0.3 </z1-m>
  711. <x2-m> -2.2 </x2-m>
  712. <y2-m> -0.75 </y2-m>
  713. <z2-m> 0.88</z2-m>
  714. </axis>
  715. </animation>
  716. <animation>
  717. <type>rotate</type>
  718. <object-name>door_back_R</object-name>
  719. <property>sim/model/bo105/doors/door[2]/position-norm</property>
  720. <factor>90</factor>
  721. <axis>
  722. <x1-m> -0.6 </x1-m>
  723. <y1-m> 0.8 </y1-m>
  724. <z1-m> 0.66 </z1-m>
  725. <x2-m> -0.8 </x2-m>
  726. <y2-m> 0.88 </y2-m>
  727. <z2-m> 0</z2-m>
  728. </axis>
  729. </animation>
  730. <animation>
  731. <type>rotate</type>
  732. <object-name>door_back_L</object-name>
  733. <property>sim/model/bo105/doors/door[3]/position-norm</property>
  734. <factor>3.5</factor>
  735. <center>
  736. <x-m>-1.01714</x-m>
  737. <y-m>16.3654</y-m>
  738. <z-m>0</z-m>
  739. </center>
  740. <axis>
  741. <x>0.0</x>
  742. <y>0</y>
  743. <z>1</z>
  744. </axis>
  745. </animation>
  746. <animation>
  747. <type>rotate</type> <!-- floor hatch -->
  748. <object-name>reardoor_R</object-name>
  749. <property>sim/model/bo105/doors/door[4]/position-norm</property>
  750. <factor>90</factor>
  751. <axis>
  752. <x1-m> -2.35 </x1-m>
  753. <y1-m> 0.55 </y1-m>
  754. <z1-m> -0.155 </z1-m>
  755. <x2-m> -1.85 </x2-m>
  756. <y2-m> 0.55 </y2-m>
  757. <z2-m> -0.175</z2-m>
  758. </axis>
  759. </animation>
  760. <!-- Rotorbrake animation -->
  761. <animation>
  762. <type>rotate</type>
  763. <object-name>rotorbrake</object-name>
  764. <property>controls/rotor/brake</property>
  765. <factor>60</factor>
  766. <axis>
  767. <x> 0 </x>
  768. <y> -1 </y>
  769. <z> 0 </z>
  770. </axis>
  771. <center>
  772. <x-m> -2.16</x-m>
  773. <y-m> 0 </y-m>
  774. <z-m> 1.145 </z-m>
  775. </center>
  776. </animation>
  777. <animation>
  778. <type>pick</type>
  779. <object-name>rotorbrake</object-name>
  780. <action>
  781. <button>0</button>
  782. <repeatable>true</repeatable>
  783. <binding>
  784. <command>nasal</command>
  785. <script>
  786. var p = "/controls/rotor/brake";
  787. setprop(p, !getprop(p));
  788. </script>
  789. </binding>
  790. </action>
  791. </animation>
  792. <!-- fuel valve lever -->
  793. <animation>
  794. <type>rotate</type>
  795. <object-name>powerlever</object-name>
  796. <property>controls/engines/engine/cutoff</property>
  797. <factor>-40</factor>
  798. <center>
  799. <x-m> -2.16</x-m>
  800. <y-m> 0 </y-m>
  801. <z-m> 1.145 </z-m>
  802. </center>
  803. <axis>
  804. <x> 0 </x>
  805. <y> 1 </y>
  806. <z> 0 </z>
  807. </axis>
  808. </animation>
  809. <animation>
  810. <type>pick</type>
  811. <object-name>powerlever</object-name>
  812. <action>
  813. <button>0</button>
  814. <repeatable>false</repeatable>
  815. <binding>
  816. <command>property-toggle</command>
  817. <property>controls/engines/engine/cutoff</property>
  818. </binding>
  819. <binding>
  820. <command>property-toggle</command>
  821. <property>controls/engines/engine[1]/cutoff</property>
  822. </binding>
  823. </action>
  824. </animation>
  825. <!-- payload -->
  826. <model>
  827. <path>Aircraft/AS350/Models/payload/loads.xml</path>
  828. <offsets>
  829. <x-m>0</x-m>
  830. <y-m>0</y-m>
  831. <z-m>0</z-m>
  832. </offsets>
  833. </model>
  834. <!-- removes snow spades when floats are fitted -->
  835. <animation>
  836. <type>select</type>
  837. <object-name>fuselage_13</object-name>
  838. <condition>
  839. <not>
  840. <equals>
  841. <property>sim/multiplay/generic/string[2]</property>
  842. <value>Floatation_System</value>
  843. </equals>
  844. </not>
  845. </condition>
  846. </animation>
  847. </PropertyList>