1 tile holes work again, fixed some bugs in the PathWalker
[supertux.git] / data / levels / test / script.stl
1 ;; Generated by Flexlay Editor
2 (supertux-level
3   (version 2)
4   (name   (_ "Scripting Test"))
5   (author "Development Team")
6   (sector
7     (name  "main")
8     (music  "salcon.ogg")
9     (gravity 10.000000)
10     (tilemap
11       (layer  "background")
12       (solid #f)
13       (speed  1.000000)
14       (width  25)
15       (height 20)
16       (tiles
17         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
18         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
19         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
20         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
21         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
22         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
23         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
24         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
25         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
26         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
27         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 
28         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 
29         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 
30         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 
31         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 
32         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 
33         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 
34         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 
35         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 
36         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 
37         ))
38     (tilemap
39       (layer  "interactive")
40       (solid #t)
41       (speed  1.000000)
42       (width  25)
43       (height 20)
44       (tiles
45         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
46         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
47         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
48         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
49         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
50         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
51         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
52         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
53         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
54         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 
55         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 
56         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 
57         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 
58         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 
59         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 
60         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 
61         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 
62         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
63         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
64         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
65         ))
66     (tilemap
67       (layer  "foreground")
68       (solid #f)
69       (speed  1.000000)
70       (width  25)
71       (height 20)
72       (tiles
73         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
74         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
75         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
76         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
77         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
78         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
79         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
80         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
81         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
82         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
83         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
84         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
85         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
86         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
87         0 1321 1322 1323 1324 0 0 0 0 0 0 0 0 0 1321 1322 1323 1324 0 0 0 0 0 0 0 
88         0 1325 1326 1327 1328 0 0 0 0 0 0 0 0 0 1325 1326 1327 1328 0 0 0 0 0 0 0 
89         0 1329 1330 1331 1332 0 0 1350 0 0 0 0 0 0 1329 1330 1331 1332 0 0 0 0 0 0 0 
90         0 1333 1334 1335 1336 0 0 0 0 0 0 0 0 0 1333 1334 1335 1336 0 0 0 0 0 0 0 
91         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
92         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
93         ))
94     (camera
95       (mode "normal")
96     )
97
98        (background
99          (image "images/background/semi_arctic.jpg")
100          (speed 0.500000)
101        )
102        (spawnpoint (name "main") (x 320) (y 416))
103        (particles-snow
104        )
105        (ambient_sound (x 674) (y 390) (distance_factor 0.01) 
106         (distance_bias 200.0) (sample "phone")
107         )
108       (infoblock (x 674) (y 390)
109         (message (_ "-VoiceMail
110 #
111 #(Play phone digit noises)
112 #(Play Nolok Sound)
113 #(Display text)
114 #Tux, I have captured 
115 #Penny.
116
117 "))
118       )
119   (scriptedobject
120          (name "TUX")
121          (x 160)
122          (y 448)
123          (sprite "images/creatures/yeti/yeti.sprite")
124        )
125        (scriptedobject
126          (name "PENNY")
127          (x 390)
128          (y 448)
129          (sprite "images/creatures/dummyguy/dummyguy.sprite")
130        )
131        (scriptedobject
132          (name "NOLOK")
133          (x 420)
134          (y 94)
135          (sprite "images/creatures/dummyguy/dummyguy.sprite")
136          (visible #f)
137          (physic-enabled #f)
138          (solid #f)
139        )
140        (init-script "
141
142         local logo = FloatingImage(\"images/objects/logo/logo.sprite\");
143
144         logo.set_visible(true);
145         
146 Text.set_text(translate(\"The Crazy Nolok Dance\"));
147 Text.fade_in(2);
148 TUX.set_action(\"jump\");
149 wait(4);
150 Text.fade_out(1);
151 wait(1);
152 NOLOK.set_visible(true);
153 tuxjumps <- 2;
154 while(true) {
155   wait(0.8);
156   Sound.play(\"sounds/jump.wav\");
157   if(tuxjumps >= 0) {
158     TUX.set_velocity(50, 300);
159   } else {
160     TUX.set_velocity(-50, 300);
161     if(tuxjumps < -2)
162       tuxjumps = 3;
163   }
164   tuxjumps--;
165   wait(0.5);
166   if(PENNY.get_action() == \"stand\") {
167     PENNY.set_action(\"throw\");
168   } else if(PENNY.get_action() == \"throw\") {
169     PENNY.set_action(\"jump\");
170   } else if(PENNY.get_action() == \"jump\") {
171     PENNY.set_action(\"dead\");
172   } else {
173     Sound.play(\"sounds/grow.wav\");
174     PENNY.set_action(\"stand\");
175     PENNY.set_velocity(0, 900);
176   }
177 }
178 ")
179    )
180  )
181
182 ;; EOF ;;