4 RADIO.set_action("quiet");
5 PENNY.set_action("stand-left");
6 NOLOK.set_visible(false);
7 LOGO.set_visible(false);
8 LOGO.enable_gravity(false);
9 SIGN.set_visible(false);
14 local x = LOGO.get_pos_x();
15 local y = LOGO.get_pos_y();
18 LOGO.set_visible(true);
19 LOGO.set_velocity(0,(120+y)/time);
20 LOGO.enable_gravity(false);
22 LOGO.set_velocity(0,0);
24 LOGO.set_visible(false);
29 Text.set_text(translate ("Somewhere at the shores\nof Antarctica..."));
38 //begin conversation and Tux rap
39 play_sound("speech/tux_hello.ogg"); // 3.1 seconds
40 Text.set_centered(false);
41 Text.set_text(translate ("Tux: Hello Penny"));
46 play_sound("speech/penny_runt_01.ogg"); // 1.2 seconds
47 Text.set_text(translate ("Penny: Hey Tux"));
52 play_sound("speech/tux_murp_01.ogg"); // 1.5 seconds
53 Text.set_text(translate ("Tux: Check out my dance moves."));
58 RADIO.set_action("loud");
59 play_sound("speech/tux_rap.ogg"); // 24.6 seconds
60 local t = ::newthread(shake_bush_thread);
61 t.call(this); // Nolok's waiting...
62 // meanwhile... Tux dances!
63 // TODO: add some more dance moves besides jumps, ducks, & flips
64 // and fill in the parts where he just stands still
65 wait(6); // music intro - 6 seconds
68 wait(0.40625); // all times rounded to nearest 1/64 of a second
70 Tux.kick(); // 0.3 seconds
78 Tux.do_duck(); // t=7.3
91 Tux.do_standup(); // t=8.8
100 Tux.do_duck(); // t=10.7
106 Tux.do_standup(); // t=12.3
111 Tux.do_backflip(); // t=13.3
117 Tux.set_dir(false); //t=18.0
124 Tux.set_dir(false); // t=19.0
137 Tux.set_dir(true); //t=23.8 - Tux sees Nolok!
140 // we have to activate Tux to hurt him
147 NOLOK.set_visible(false);
148 NOLOK.set_solid(false);
149 PENNY.set_visible(false);
150 PENNY.set_solid(false);
151 RADIO.set_visible(false);
152 RADIO.set_solid(false);
153 SIGN.set_visible(true);
156 play_sound("speech/tux_upset.ogg"); // 11 seconds
157 Text.set_text(translate ("Tux: Oww... my head..."));
163 Text.set_text(translate ("Tux: Wait!")); // t=2.4
168 Text.set_text(translate ("Tux: Penny!")); // t=3.9
173 Text.set_text(translate ("Tux: Where are you, Penny?!")); // t=4.4
178 Text.set_text(translate ("Tux: Oh no...")); // t=6.9
183 Text.set_text(translate ("Tux: Don't worry, Penny, I'll rescue you!")); // t=8.4
190 function shake_bush()
192 //play_sound("sounds/rustle.wav");
193 local bushx = BUSH.get_pos_x();
194 local bushy = BUSH.get_pos_y();
195 for(local i = 0; i < 21; ++i) {
196 BUSH.set_pos(bushx + ( rand() % 6 ) - 3, bushy);
202 function shake_bush_thread(table)
205 table.shake_bush(); // each bush shake lasts 1 second
212 table.shake_bush(); // total 23 seconds
214 table.NOLOK.set_velocity(-220, 600);
215 table.NOLOK.set_visible(true);
216 table.Effect.fade_out(1.3);
228 states <- { init=0, start=1, logo_in=2, intro_text=3, rap_scene=4, end_level=5};
229 function trigger_state(state) {
230 local idx = states[state];
231 if(!idx || idx <= state_idx)