more work on worldmap switching
[supertux.git] / data / levels / test / script.stl
1 (supertux-level
2   (version 2)
3   (name (_ "Scripting Test"))
4   (author "Development Team")
5   (sector
6     (name "main")
7     (music "salcon.ogg")
8     (init-script "
9 local logo = FloatingImage(\"images/objects/logo/logo.sprite\");
10 logo.set_visible(true);
11         
12 Text.set_text(translate(\"The Crazy Nolok Dance\"));
13 Text.fade_in(2);
14 TUX.set_action(\"jump\");
15 wait(4);
16 Text.fade_out(1);
17 wait(1);
18 NOLOK.set_visible(true);
19 tuxjumps <- 2;
20 while(true) {
21         wait(0.8);
22         Sound.play(\"sounds/jump.wav\");
23         if(tuxjumps >= 0) {
24                 TUX.set_velocity(50, 300);
25         } else {
26                 TUX.set_velocity(-50, 300);
27                 if(tuxjumps < -2)
28                         tuxjumps = 3;
29         }
30         tuxjumps--;
31         wait(0.5);
32         if(PENNY.get_action() == \"stand\") {
33                 PENNY.set_action(\"throw\");
34         } else if(PENNY.get_action() == \"throw\") {
35                 PENNY.set_action(\"jump\");
36         } else if(PENNY.get_action() == \"jump\") {
37                 PENNY.set_action(\"dead\");
38         } else {
39                 Sound.play(\"sounds/grow.wav\");
40                 PENNY.set_action(\"stand\");
41                 PENNY.set_velocity(0, 900);
42         }
43 }
44 ")
45     (background
46       (image "images/background/semi_arctic.jpg")
47       (speed 0.5)
48     )
49     (camera
50       (mode "normal")
51     )
52     (spawnpoint
53       (name "main")
54       (x 320)
55       (y 416)
56     )
57     (infoblock
58       (message "-VoiceMail
59 #
60 #(Play phone digit noises)
61 #(Play Nolok Sound)
62 #(Display text)
63 #Tux, I have captured 
64 #Penny.
65
66 ")
67       (x 674)
68       (y 390)
69     )
70     (scriptedobject
71       (name "TUX")
72       (visible #t)
73       (physic-enabled #f)
74       (solid #f)
75       (x 160)
76       (y 448)
77       (sprite "images/creatures/yeti/yeti.sprite")
78     )
79     (scriptedobject
80       (name "PENNY")
81       (visible #t)
82       (physic-enabled #f)
83       (solid #f)
84       (x 390)
85       (y 448)
86       (sprite "images/creatures/dummyguy/dummyguy.sprite")
87     )
88     (scriptedobject
89       (name "NOLOK")
90       (visible #f)
91       (physic-enabled #f)
92       (solid #f)
93       (x 420)
94       (y 94)
95       (sprite "images/creatures/dummyguy/dummyguy.sprite")
96     )
97     (ambient_sound
98       (sample "phone")
99       (distance_factor 0.01)
100       (distance_bias 200)
101       (volume 0)
102       (width 32)
103       (height 32)
104       (x 674)
105       (y 390)
106     )
107     (particles-snow
108     )
109     (tilemap
110       (layer "background")
111       (solid #f)
112       (speed 1)
113       (width 25)
114       (height 20)
115       (tiles 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1343 1343 1343 1343 1343 1343 1343 1343 1343 1343 1343 1343 1343 1343 1343 1343 1343 1343 1343 1343 1343 1343 1343 1343 1343 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342)
116     )
117     (tilemap
118       (layer "interactive")
119       (solid #t)
120       (speed 1)
121       (width 25)
122       (height 20)
123       (tiles 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 122 209 209 123 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 124 98 98 125 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 124 98 98 125 0 0 0 0 0 0 0 0 0 0 0 122 123 0 0 0 0 0 0 0 0 124 98 98 125 0 0 0 0 0 1348 0 0 0 0 0 124 125 0 0 0 0 0 0 0 0 124 98 98 125 0 0 122 123 0 79 0 0 0 0 0 124 125 0 0 0 0 0 0 0 0 124 98 98 125 0 0 124 125 0 79 0 0 0 0 0 1345 1344 0 0 0 0 0 0 0 0 1345 1346 1346 1344 0 0 1345 1344 0 1349 0 0 0 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 1342 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)
124     )
125     (tilemap
126       (layer "foreground")
127       (solid #f)
128       (speed 1)
129       (width 25)
130       (height 20)
131       (tiles 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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