display a big warning for people who try to install the game
[supertux.git] / data / levels / world1 / default.nut
1 function intro()
2 {
3   SUPERTUX.set_action("stand-right");
4   Tux.deactivate();
5   Tux.set_visible(false);
6   DisplayEffect.sixteen_to_nine(0);
7   DisplayEffect.fade_in(2);
8   wait(2);
9
10   Text.set_text(translate("Tux and Penny were out having a\n nice picnic on the\nice fields of Antarctica."));
11   Text.fade_in(1);
12 // TODO play some tux sounds...
13   wait(1);
14
15   Sound.play("speech/tux_rap.ogg");
16   wait(5);
17   Text.fade_out(1);
18   wait(15);
19
20   Text.set_text(translate("Then suddenly..."));
21   Text.fade_in(1);
22
23   // let's shake the bush...
24   // Sound.play("sounds/rustle.wav");
25   local bushx = BUSH.get_pos_x();
26   local bushy = BUSH.get_pos_y();
27   for(local i = 0; i < 20; ++i) {
28     BUSH.set_pos(bushx + rand() % 6 - 3, bushy);
29     wait(0.1);
30   }
31   Text.fade_out(1);
32
33 // NOLOK jumps out of the bush
34   wait(0.5);
35   print("jump");
36   NOLOK.set_velocity(70, 600);
37
38   wait(1)
39   NOLOK.set_velocity(-120, 700);
40   wait(1.2);
41   NOLOK.set_velocity(0, 0);
42   wait(1);
43
44 // nolok casts his spell...
45   NOLOK.set_action("throw");
46   // TODO we really need fade to white here and some thunder sound...
47   DisplayEffect.fade_out(0.3);
48   wait(0.3);
49   DisplayEffect.fade_in(0);
50   wait(0.3);
51   DisplayEffect.fade_out(0.5);
52   wait(0.5);
53   DisplayEffect.fade_in(0);
54   wait(0.4);
55   DisplayEffect.fade_out(0.2);
56   wait(2.5);
57   NOLOK.set_visible(false);
58   PENNY.set_visible(false);
59   DisplayEffect.fade_in(1);
60   wait(1);
61
62   Text.set_text("Oh No!\nPenny has been captured");
63   Text.fade_in(1);
64   wait(3);
65   Text.fade_out(1);
66   
67   Text.set_text("Tux has to rescue her");
68   Text.fade_in(1);
69   wait(5);
70
71 // fade out
72   DisplayEffect.fade_out(2);
73   wait(2);
74   Level.finish();
75 }