/* Default functions for the whole levelset */
+print("default.nut loaded\n");
-function intro()
-{
+function intro_scene2()
+{
//initialize
+ Camera.scroll_to(0, 945, 0);
SUPERTUX.set_action("stand-right");
- RADIO.set_action("quiet");
- PENNY.set_action("stand-left");
+ SUPERTUX.set_visible(false);
NOLOK.set_visible(false);
Tux.deactivate();
Tux.set_visible(false);
- DisplayEffect.sixteen_to_nine(0);
-
- //begin scrolling sequence
- DisplayEffect.fade_in(2);
- Camera.scroll_to(0, 945, 15);
- Sound.play("music/intro.ogg");
- wait(3);
- Text.set_text("Somewhere at the shores\nof Antarctica...");
- Text.fade_in(2);
- wait(3);
- Text.fade_out(2);
- wait(10);
- SUPERTUX.set_velocity(50,0);
- Camera.scroll_to(3100, 945, 18);
- wait(10);
- Text.set_text("SuperTux\n(Replace this with the title logo)");
- Text.fade_in(2);
+ Effect.sixteen_to_nine(0);
+ play_sound("music/nolok.ogg");
+ Effect.fade_in(5);
wait(5);
- Text.fade_out(2);
- wait(6);
-
- //begin conversation and Tux rap
- SUPERTUX.set_velocity(0,0);
- Sound.play("speech/tux_hello.ogg");
- wait(3);
- Sound.play("speech/penny_runt_01.ogg");
- wait(1);
- Sound.play("speech/tux_murp_01.ogg");
- wait(1);
- RADIO.set_action("loud");
- Sound.play("speech/tux_rap.ogg");
- wait(15);
- shake_bush();
- wait(2);
- shake_bush();
- wait(2);
- shake_bush();
- wait(1);
-
- //enter Nolok
- NOLOK.set_velocity(-180, 600);
- NOLOK.set_visible(true);
- DisplayEffect.fade_out(1.5);
- wait(3);
-
- //darkness
- NOLOK.set_visible(false);
- PENNY.set_visible(false);
- RADIO.set_action("quiet");
- SUPERTUX.set_pos(3550, SUPERTUX.get_pos_y());
-
- //wake up, Tux...
- DisplayEffect.fade_in(4);
- wait(4);
- Sound.play("speech/tux_upset.ogg");
- wait(3);
- tux_upset();
- wait(1);
- tux_upset();
- wait(4);
- SUPERTUX.set_action("stand-right");
- SUPERTUX.set_velocity(300,700);
- wait(1);
-
- //end intro sequence
- DisplayEffect.fade_out(2);
- wait(3);
- Level.finish();
-}
-
-function shake_bush()
-{
- //Sound.play("sounds/rustle.wav");
- local bushx = BUSH.get_pos_x();
- local bushy = BUSH.get_pos_y();
- for(local i = 0; i < 20; ++i) {
- BUSH.set_pos(bushx + rand() % 6 - 3, bushy);
- wait(0.05);
- }
-}
-
-function tux_upset()
-{
- SUPERTUX.set_action("stand-right");
- SUPERTUX.set_velocity(200,0);
- wait(0.3);
- SUPERTUX.set_velocity(0,0);
- wait(0.4);
- SUPERTUX.set_action("stand-left");
- SUPERTUX.set_velocity(-200,0);
- wait(0.3);
+ Camera.scroll_to(3100, 945, 8);
+ NOLOK.set_visible(true);
+ NOLOK.set_velocity(500,0);
+ wait(8);
+ SUPERTUX.set_visible(true);
+ SUPERTUX.set_velocity(300,0);
+ wait(24);
+ Level.finish(true);
}