yeti_cutscene.nut 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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. end_cutscene();
  71. Level.finish(true);
  72. }
  73. state_idx <- 0;
  74. states <- { init=0, start=1};
  75. function trigger_state(state) {
  76. local idx = states[state];
  77. if(!idx || idx <= state_idx)
  78. return;
  79. state_idx = idx;
  80. switch(state) {
  81. case "start":
  82. initialize();
  83. break;
  84. }
  85. }