tux_parties_like_a.nut 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. sector.keep_looping <- true
  2. function init() {
  3. ss1.set_enabled(false)
  4. ss2.set_enabled(false)
  5. ss3.set_enabled(false)
  6. ss4.set_enabled(false)
  7. ss5.set_enabled(false)
  8. ss6.set_enabled(false)
  9. }
  10. function dance_floor() {
  11. while(true) {
  12. df6.tint_fade(0, 1, 0, 0.14, 1)
  13. df5.tint_fade(0, 0.86, 0, 1, 1)
  14. df4.tint_fade(0, 1, 0.35, 0, 1)
  15. df3.tint_fade(0, 0, 1, 0.87, 1)
  16. df2.tint_fade(0, 0, 0.6, 1, 1)
  17. df1.tint_fade(0, 0.8, 1, 0, 1)
  18. wait(1, true)
  19. if(!sector.keep_looping) return
  20. df6.tint_fade(0, 0.86, 0, 1, 1)
  21. df5.tint_fade(0, 1, 0.35, 0, 1)
  22. df4.tint_fade(0, 0, 1, 0.87, 1)
  23. df3.tint_fade(0, 0, 0.6, 1, 1)
  24. df2.tint_fade(0, 0.8, 1, 0, 1)
  25. df1.tint_fade(0, 1, 0, 0.14, 1)
  26. wait(1, true)
  27. if(!sector.keep_looping) return
  28. df6.tint_fade(0, 1, 0.35, 0, 1)
  29. df5.tint_fade(0, 0, 1, 0.87, 1)
  30. df4.tint_fade(0, 0, 0.6, 1, 1)
  31. df3.tint_fade(0, 0.8, 1, 0, 1)
  32. df2.tint_fade(0, 1, 0, 0.14, 1)
  33. df1.tint_fade(0, 0.86, 0, 1, 1)
  34. wait(1, true)
  35. if(!sector.keep_looping) return
  36. df6.tint_fade(0, 0, 1, 0.87, 1)
  37. df5.tint_fade(0, 0, 0.6, 1, 1)
  38. df4.tint_fade(0, 0.8, 1, 0, 1)
  39. df3.tint_fade(0, 1, 0, 0.14, 1)
  40. df2.tint_fade(0, 0.86, 0, 1, 1)
  41. df1.tint_fade(0, 1, 0.35, 0, 1)
  42. wait(1, true)
  43. if(!sector.keep_looping) return
  44. df6.tint_fade(0, 0, 0.6, 1, 1)
  45. df5.tint_fade(0, 0.8, 1, 0, 1)
  46. df4.tint_fade(0, 1, 0, 0.14, 1)
  47. df3.tint_fade(0, 0.86, 0, 1, 1)
  48. df2.tint_fade(0, 1, 0.35, 0, 1)
  49. df1.tint_fade(0, 0, 1, 0.87, 1)
  50. wait(1, true)
  51. if(!sector.keep_looping) return
  52. df6.tint_fade(0, 0.8, 1, 0, 1)
  53. df5.tint_fade(0, 1, 0, 0.14, 1)
  54. df4.tint_fade(0, 0.86, 0, 1, 1)
  55. df3.tint_fade(0, 1, 0.35, 0, 1)
  56. df2.tint_fade(0, 0, 1, 0.87, 1)
  57. df1.tint_fade(0, 0, 0.6, 1, 1)
  58. wait(1, true)
  59. if(!sector.keep_looping) return
  60. }
  61. }
  62. /*function lights() {
  63. while(sector.keep_looping) {
  64. partylights.tint_fade(0, 134, 217, 0, 0.2) //green
  65. wait(1, true)
  66. partylights.tint_fade(0, 205, 0, 96, 0.2) //purple
  67. wait(1, true)
  68. partylights.tint_fade(0, 232, 214, 0, 0.2) //yellow
  69. wait(1, true)
  70. partylights.tint_fade(0, 0, 205, 253, 0.2) //lightblue
  71. wait(1, true)
  72. partylights.tint_fade(0, 255, 113, 45, 0.2) //orange
  73. wait(1, true)
  74. partylights.tint_fade(0, 171, 52, 255, 0.2) //magenta
  75. wait(1, true)
  76. partylights.tint_fade(0, 248, 0, 58, 0.2) //red
  77. wait(1, true)
  78. partylights.tint_fade(0, 0, 106, 236, 0.2) //darkblue second cycle
  79. wait(1, true)
  80. partylights.tint_fade(0, 232, 214, 0, 0.2) //yellow
  81. wait(1, true)
  82. partylights.tint_fade(0, 171, 52, 255, 0.2) //magenta
  83. wait(1, true)
  84. partylights.tint_fade(0, 134, 217, 0, 0.2) //green
  85. wait(1, true)
  86. partylights.tint_fade(0, 205, 0, 96, 0.2) //purple
  87. wait(1, true)
  88. partylights.tint_fade(0, 248, 0, 58, 0.2) //red
  89. wait(1, true)
  90. partylights.tint_fade(0, 0, 205, 253, 0.2) //lightblue
  91. wait(1, true)
  92. partylights.tint_fade(0, 255, 113, 45, 0.2) //orange
  93. wait(1, true)
  94. partylights.tint_fade(0, 0, 106, 236, 0.2) //darkblue
  95. wait(1, true)
  96. }
  97. }*/
  98. function tuxrap() {
  99. start_cutscene()
  100. Effect.sixteen_to_nine(1)
  101. Tux.deactivate()
  102. Tux.walk(160)
  103. wait(1)
  104. stop_music(1)
  105. wait(0.5)
  106. Tux.walk(0)
  107. wait(1)
  108. play_sound("speech/tux_rap.ogg")
  109. //RADIO.set_action("loud")
  110. dancefloor.set_pos(Tux.get_x(), Tux.get_y())
  111. ss1.set_enabled(true)
  112. ss2.set_enabled(true)
  113. ss3.set_enabled(true)
  114. ss4.set_enabled(true)
  115. ss5.set_enabled(true)
  116. ss6.set_enabled(true)
  117. // taken from the intro cutscene
  118. wait(6)
  119. Tux.do_duck()
  120. Tux.set_dir(false)
  121. wait(0.40625) // all times rounded to nearest 1/64 of a second
  122. Tux.do_standup()
  123. Tux.kick() // 0.3 seconds
  124. wait(0.40625)
  125. Tux.set_dir(true)
  126. wait(0.203125)
  127. Tux.set_dir(false)
  128. wait(0.203125)
  129. Tux.set_dir(true)
  130. wait(0.09375)
  131. Tux.do_duck() // t=7.3
  132. wait(0.5)
  133. Tux.set_dir(false)
  134. wait(0.203125)
  135. Tux.set_dir(true)
  136. wait(0.203125)
  137. Tux.set_dir(false)
  138. wait(0.203125)
  139. Tux.set_dir(true)
  140. wait(0.203125)
  141. Tux.set_dir(false)
  142. wait(0.203125)
  143. Tux.set_dir(true)
  144. Tux.do_standup() // t=8.8
  145. wait(0.203125)
  146. Tux.set_dir(false)
  147. wait(0.203125)
  148. Tux.kick()
  149. wait(0.40625)
  150. Tux.set_dir(true)
  151. Tux.do_jump(-300)
  152. wait(0.703125)
  153. Tux.do_duck() // t=10.7
  154. wait(0.296875)
  155. Tux.set_dir(false)
  156. wait(0.59375)
  157. Tux.set_dir(true)
  158. wait(0.703125)
  159. Tux.do_standup() // t=12.3
  160. Tux.kick()
  161. wait(0.5)
  162. Tux.do_duck()
  163. wait(0.5)
  164. Tux.do_backflip() // t=13.3
  165. wait(79.0/64)
  166. Tux.walk(200)
  167. wait(38.0/64)
  168. Tux.walk(0)
  169. wait(184.0/64)
  170. Tux.set_dir(false) //t=18.0
  171. wait(0.3)
  172. Tux.kick()
  173. wait(0.40625)
  174. Tux.do_duck()
  175. Tux.set_dir(true)
  176. wait(0.296875)
  177. Tux.set_dir(false) // t=19.0
  178. wait(0.5)
  179. Tux.do_standup()
  180. Tux.do_jump(-350)
  181. wait(1.5)
  182. Tux.kick() // t=21
  183. wait(0.5)
  184. Tux.do_duck()
  185. wait(0.5)
  186. Tux.do_jump(-400)
  187. wait(1.0)
  188. Tux.do_standup()
  189. wait(0.796875)
  190. Tux.set_dir(true) //t=23.8 - Tux sees Nolok!
  191. Tux.do_jump(-520)
  192. wait(1.5)
  193. sector.keep_looping = false
  194. df6.tint_fade(0, 0, 0, 0, 1)
  195. df5.tint_fade(0, 0, 0, 0, 1)
  196. df4.tint_fade(0, 0, 0, 0, 1)
  197. df3.tint_fade(0, 0, 0, 0, 1)
  198. df2.tint_fade(0, 0, 0, 0, 1)
  199. df1.tint_fade(0, 0, 0, 0, 1)
  200. ss1.set_enabled(false)
  201. ss2.set_enabled(false)
  202. ss3.set_enabled(false)
  203. ss4.set_enabled(false)
  204. ss5.set_enabled(false)
  205. ss6.set_enabled(false)
  206. end_cutscene()
  207. fade_in_music("castle/fortress.music", 1)
  208. Effect.four_to_three(1)
  209. wait(0.5)
  210. Tux.activate()
  211. }