yeti_cutscene.nut 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. function initialize()
  2. {
  3. Tux.deactivate();
  4. Yeti.set_action("stand-left");
  5. Effect.sixteen_to_nine(0);
  6. Effect.fade_in(1.5);
  7. Tux.walk(225);
  8. wait(3);
  9. Tux.walk(150);
  10. wait(0.3);
  11. Tux.walk(75);
  12. wait(0.1);
  13. Tux.walk(0)
  14. wait(0.5);
  15. Text.set_text(_("Exhausted from his long walk, Tux decided to take a little break."));
  16. Text.fade_in(1);
  17. wait(4);
  18. Text.fade_out(1);
  19. wait(1.5);
  20. play_sound("sounds/yeti_roar.wav");
  21. wait(0.2);
  22. Text.set_text(_("But then, all of a sudden he heard a loud roar from a distance."));
  23. Text.fade_in(1);
  24. wait(4);
  25. Text.fade_out(1);
  26. wait(1);
  27. Camera.scroll_to(1350, 300, 5);
  28. wait(5.5);
  29. Yeti.set_action("stomp-left");
  30. play_sound("sounds/yeti_gna.wav");
  31. Yeti.set_velocity(0, -300);
  32. wait(0.5);
  33. Yeti.set_action("stand-left");
  34. wait(0.5);
  35. Yeti.set_action("walking-right");
  36. play_sound("sounds/yeti_roar.wav");
  37. Yeti.set_velocity(250, 0);
  38. wait(1);
  39. play_sound("sounds/yeti_roar.wav");
  40. wait(1);
  41. Camera.scroll_to(825, 480, 6);
  42. wait(3);
  43. Tux.walk(200);
  44. wait(2);
  45. Tux.walk(150);
  46. wait(0.3);
  47. Tux.walk(75);
  48. wait(0.1);
  49. Tux.walk(0);
  50. wait(1);
  51. Text.set_text(_("A yeti seems to have observed him from afar."));
  52. Text.fade_in(1);
  53. wait(4);
  54. Text.fade_out(1);
  55. wait(2);
  56. Text.set_text(_("Concerned by the yeti's sudden retreat, Tux decided to continue his journey, ..."));
  57. Text.fade_in(1);
  58. wait(4);
  59. Text.fade_out(1);
  60. wait(0.5);
  61. Tux.walk(225);
  62. wait(1);
  63. Text.set_text(_("...while secretly hoping not to run into the yeti again, by any means."));
  64. Text.fade_in(1);
  65. wait(4);
  66. Text.fade_out(1);
  67. wait(2);
  68. Effect.fade_out(2);
  69. wait(3.5);
  70. Level.finish(true);
  71. }
  72. state_idx <- 0;
  73. states <- { init=0, start=1};
  74. function trigger_state(state) {
  75. local idx = states[state];
  76. if(!idx || idx <= state_idx)
  77. return;
  78. state_idx = idx;
  79. switch(state) {
  80. case "start":
  81. initialize();
  82. break;
  83. }
  84. }