Advertisement
marrecar

roofhatch

Oct 20th, 2013
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.91 KB | None | 0 0
  1. {trigger:Dachlukensteuereinheit_1_drag}
  2. (L.S.mouse_y) 20 / (L.L.cp_Schalter_Dachlukensteuereinheit1_sw) + -1 max 1 min
  3.  
  4. (S.L.cp_Schalter_Dachlukensteuereinheit1_sw) s1
  5.  
  6. ' Stufen:
  7. ' -1: Schalter nach vorne
  8. ' 0: Schalter in Mittelstellung
  9. ' 1: Schalter nach hinten
  10.  
  11. l1 -0.5 <
  12. {if}
  13. (L.L.Dachluke1_moving) !
  14. (L.L.cp_Schalter_Dachluke1_war_null) &&
  15. (L.L.Dachluke1modus) 0 > &&
  16. (L.L.elec_busbar_main) &&
  17. {if}
  18. (L.L.Dachluke1modus) 1 - (S.L.Dachluke1modus)
  19. {endif}
  20. (L.L.Dachluke1modus) 0 = !
  21. {if}
  22. 0 (S.L.cp_Schalter_Dachluke1_war_null)
  23. {endif}
  24. {else}
  25. l1 0.5 >
  26. {if}
  27. (L.L.Dachluke1_moving) !
  28. (L.L.cp_Schalter_Dachluke1_war_null) &&
  29. (L.L.Dachluke1modus) 2 < &&
  30. (L.L.elec_busbar_main) &&
  31. {if}
  32. (L.L.Dachluke1modus) 1 + (S.L.Dachluke1modus)
  33. {endif}
  34. (L.L.Dachluke1modus) 2 = !
  35. {if}
  36. 0 (S.L.cp_Schalter_Dachluke1_war_null)
  37. {endif}
  38. {else}
  39. 1 (S.L.cp_Schalter_Dachluke1_war_null)
  40. {endif}
  41. {endif}
  42.  
  43. (L.L.Dachluke1modus) 0 =
  44. {if}
  45. 1 (S.L.cp_Dachluke1_visible_1)
  46. 0 (S.L.cp_Dachluke1_visible_2)
  47. {else}
  48. (L.L.Dachluke1modus) 1 =
  49. {if}
  50. 0 (S.L.cp_Dachluke1_visible_1) (S.L.cp_Dachluke1_visible_2)
  51. {else}
  52. 0 (S.L.cp_Dachluke1_visible_1)
  53. 1 (S.L.cp_Dachluke1_visible_2)
  54. {endif}
  55. {endif}
  56. {end}
  57.  
  58. {trigger:Dachlukensteuereinheit_1_off}
  59. 0 (S.L.cp_Schalter_Dachlukensteuereinheit1_sw)
  60. 1 (S.L.cp_Schalter_Dachluke1_war_null)
  61. {end}
  62.  
  63. {trigger:Dachlukensteuereinheit_2_drag}
  64. (L.S.mouse_y) 20 / (L.L.cp_Schalter_Dachlukensteuereinheit2_sw) + -1 max 1 min
  65.  
  66. (S.L.cp_Schalter_Dachlukensteuereinheit2_sw) s1
  67.  
  68. ' Stufen:
  69. ' -1: Schalter nach vorne
  70. ' 0: Schalter in Mittelstellung
  71. ' 1: Schalter nach hinten
  72.  
  73. l1 -0.5 <
  74. {if}
  75. (L.L.Dachluke2_moving) !
  76. (L.L.cp_Schalter_Dachluke2_war_null) &&
  77. (L.L.Dachluke2modus) 0 > &&
  78. (L.L.elec_busbar_main) &&
  79. {if}
  80. (L.L.Dachluke2modus) 1 - (S.L.Dachluke2modus)
  81. {endif}
  82. (L.L.Dachluke2modus) 0 = !
  83. {if}
  84. 0 (S.L.cp_Schalter_Dachluke2_war_null)
  85. {endif}
  86. {else}
  87. l1 0.5 >
  88. {if}
  89. (L.L.Dachluke2_moving) !
  90. (L.L.cp_Schalter_Dachluke2_war_null) &&
  91. (L.L.Dachluke2modus) 2 < &&
  92. (L.L.elec_busbar_main) &&
  93. {if}
  94. (L.L.Dachluke2modus) 1 + (S.L.Dachluke2modus)
  95. {endif}
  96. (L.L.Dachluke2modus) 2 = !
  97. {if}
  98. 0 (S.L.cp_Schalter_Dachluke2_war_null)
  99. {endif}
  100. {else}
  101. 1 (S.L.cp_Schalter_Dachluke2_war_null)
  102. {endif}
  103. {endif}
  104.  
  105. (L.L.Dachluke2modus) 0 =
  106. {if}
  107. 1 (S.L.cp_Dachluke2_visible_1)
  108. 0 (S.L.cp_Dachluke2_visible_2)
  109. {else}
  110. (L.L.Dachluke2modus) 1 =
  111. {if}
  112. 0 (S.L.cp_Dachluke2_visible_1) (S.L.cp_Dachluke2_visible_2)
  113. {else}
  114. 0 (S.L.cp_Dachluke2_visible_1)
  115. 1 (S.L.cp_Dachluke2_visible_2)
  116. {endif}
  117. {endif}
  118. {end}
  119.  
  120. {trigger:Dachlukensteuereinheit_2_off}
  121. 0 (S.L.cp_Schalter_Dachlukensteuereinheit2_sw)
  122. 1 (S.L.cp_Schalter_Dachluke2_war_null)
  123. {end}
  124.  
  125. '----------------------
  126. ' Init
  127. '----------------------
  128.  
  129. {macro:cockpit_init}
  130.  
  131. 0 (S.L.cp_Schalter_Dachlukensteuereinheit1_sw)
  132. 1 (S.L.cp_Schalter_Dachluke1_war_null)
  133. 0 (S.L.cp_Schalter_Dachlukensteuereinheit2_sw)
  134. 1 (S.L.cp_Schalter_Dachluke2_war_null)
  135. 1 (S.L.Dachluke1modus) (S.L.Dachluke2modus)
  136.  
  137. {end}
  138.  
  139. '----------------------
  140. ' Frame
  141. '----------------------
  142. {macro:cockpit_frame}
  143.  
  144. (M.L.Dachluken_frame)
  145.  
  146. {macro:Dachluken_frame}
  147. ' überprüfen, ob "Saft" da is'
  148. (L.L.elec_busbar_main)
  149. {if}
  150. ' Dachluke vorne:
  151. (L.L.Dachluke1modus) 0 =
  152. {if}
  153. (L.L.Dachluke1_1_pos) s0 (L.S.Timegap) 0.4 * + 1 min (S.L.Dachluke1_1_pos) s1
  154. (L.L.Dachluke1_2_pos) s2 (L.S.Timegap) 0.4 * - 0 max (S.L.Dachluke1_2_pos) s3
  155. l0 l1 = l2 l3 = && ! (S.L.Dachluke1_moving)
  156. {else}
  157. (L.L.Dachluke1modus) 1 =
  158. {if}
  159. (L.L.Dachluke1_1_pos) s0 (L.S.Timegap) 0.4 * - 0 max (S.L.Dachluke1_1_pos) s1
  160. (L.L.Dachluke1_2_pos) s2 (L.S.Timegap) 0.4 * - 0 max (S.L.Dachluke1_2_pos) s3
  161. l0 l1 = l2 l3 = && ! (S.L.Dachluke1_moving)
  162. {else}
  163. (L.L.Dachluke1_1_pos) s0 (L.S.Timegap) 0.4 * - 0 max (S.L.Dachluke1_1_pos) s1
  164. (L.L.Dachluke1_2_pos) s2 (L.S.Timegap) 0.4 * + 1 min (S.L.Dachluke1_2_pos) s3
  165. l0 l1 = l2 l3 = && ! (S.L.Dachluke1_moving)
  166. {endif}
  167. {endif}
  168.  
  169. ' Dachluke hinten:
  170. (L.L.Dachluke2modus) 0 =
  171. {if}
  172. (L.L.Dachluke2_1_pos) s0 (L.S.Timegap) 0.4 * + 1 min (S.L.Dachluke2_1_pos) s1
  173. (L.L.Dachluke2_2_pos) s2 (L.S.Timegap) 0.4 * - 0 max (S.L.Dachluke2_2_pos) s3
  174. l0 l1 = l2 l3 = && ! (S.L.Dachluke2_moving)
  175. {else}
  176. (L.L.Dachluke2modus) 1 =
  177. {if}
  178. (L.L.Dachluke2_1_pos) s0 (L.S.Timegap) 0.4 * - 0 max (S.L.Dachluke2_1_pos) s1
  179. (L.L.Dachluke2_2_pos) s2 (L.S.Timegap) 0.4 * - 0 max (S.L.Dachluke2_2_pos) s3
  180. l0 l1 = l2 l3 = && ! (S.L.Dachluke2_moving)
  181. {else}
  182. (L.L.Dachluke2_1_pos) s0 (L.S.Timegap) 0.4 * - 0 max (S.L.Dachluke2_1_pos) s1
  183. (L.L.Dachluke2_2_pos) s2 (L.S.Timegap) 0.4 * + 1 min (S.L.Dachluke2_2_pos) s3
  184. l0 l1 = l2 l3 = && ! (S.L.Dachluke2_moving)
  185. {endif}
  186. {endif}
  187. {endif}
  188. {end}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement