Background can now render three images: Top, Center and Bottom
[supertux.git] / data / levels / test / script.stl
index c148948..581a841 100644 (file)
@@ -2,10 +2,10 @@
 (supertux-level
   (version 2)
   (name   (_ "Scripting Test"))
-  (author "totally pointless script maker")
+  (author "Development Team")
   (sector
     (name  "main")
-    (music  "salcon.mod")
+    (music  "salcon.ogg")
     (gravity 10.000000)
     (tilemap
       (layer  "background")
         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
         0 0 0 0 0 0 0 0 0 0 0 0 0 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 210 210 125 0 0 0 0 0 0 0 0 0 
-        0 0 0 0 0 0 0 0 0 0 0 0 124 210 210 125 0 0 0 0 0 0 0 0 0 
-        0 0 0 0 0 0 0 0 0 0 0 0 124 210 210 125 0 0 0 0 0 0 0 0 0 
-        0 0 124 125 0 0 0 0 0 0 0 0 124 210 210 125 0 0 0 0 0 0 0 0 0 
-        0 0 124 125 0 0 0 0 0 0 0 0 124 210 210 125 0 0 124 125 0 0 0 0 0 
-        0 0 124 125 0 0 25 0 0 0 24 0 124 210 210 125 0 0 124 125 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 0 0 
-        0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-        0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-        0 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 
         ))
     (tilemap
       (layer  "interactive")
         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
         0 0 0 0 0 0 0 0 0 0 0 0 0 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 
-        0 0 122 123 0 0 0 0 0 0 0 0 0 0 402 403 404 405 0 0 0 0 0 0 0 
-        0 0 0 0 0 0 0 0 0 0 0 0 0 0 406 407 408 409 122 123 0 0 0 0 0 
-        0 403 404 0 0 0 0 0 0 0 0 0 0 0 410 451 412 413 0 0 0 0 0 0 0 
-        8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 
-        14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 
-        11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 
-        11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 
-        11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 
         ))
     (tilemap
       (layer  "foreground")
         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
-        0 0 0 0 0 0 0 0 0 0 0 0 0 0 402 403 404 405 0 0 0 0 0 0 0 
-        0 0 0 0 0 0 0 0 0 0 0 0 0 0 406 407 408 409 0 0 0 0 0 0 0 
-        0 403 404 0 0 0 0 0 0 0 0 0 0 0 410 411 412 413 0 0 0 0 0 0 0 
-        0 407 408 0 0 0 0 0 0 0 0 0 0 0 414 423 416 425 0 0 0 0 0 0 0 
         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+        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 
+        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 
+        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 
+        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 
         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
         0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
         ))
     )
 
        (background
-         (image "semi_arctic.jpg")
+         (image "images/background/semi_arctic.jpg")
          (speed 0.500000)
        )
-       (spawnpoint (name "main") (x 320) (y 384))
+       (spawnpoint (name "main") (x 320) (y 416))
        (particles-snow
        )
-       (scriptedobject
+       (ambient_sound (x 674) (y 390) (distance_factor 0.01) 
+       (distance_bias 200.0) (sample "phone")
+       )
+      (infoblock (x 674) (y 390)
+        (message (_ "-VoiceMail
+#
+#(Play phone digit noises)
+#(Play Nolok Sound)
+#(Display text)
+#Tux, I have captured 
+#Penny.
+# 
+"))
+      )
+  (scriptedobject
          (name "TUX")
          (x 160)
          (y 448)
-         (sprite "dummyguy")
+         (sprite "images/creatures/yeti/yeti.sprite")
        )
        (scriptedobject
          (name "PENNY")
          (x 390)
          (y 448)
-         (sprite "dummyguy")
+         (sprite "images/creatures/dummyguy/dummyguy.sprite")
        )
        (scriptedobject
          (name "NOLOK")
          (x 420)
          (y 94)
-         (sprite "dummyguy")
+         (sprite "images/creatures/dummyguy/dummyguy.sprite")
          (visible #f)
          (physic-enabled #f)
          (solid #f)
        )
        (init-script "
-function wait(time) {
-    set_wakeup_time(time);
-    suspend();
-}
+
+        local logo = FloatingImage(\"images/objects/logo/logo.sprite\");
+
+        logo.set_visible(true);
+        
 Text.set_text(translate(\"The Crazy Nolok Dance\"));
 Text.fade_in(2);
-TUX.set_animation(\"jump\");
+TUX.set_action(\"jump\");
 wait(4);
 Text.fade_out(1);
 wait(1);
@@ -138,7 +153,7 @@ NOLOK.set_visible(true);
 tuxjumps <- 2;
 while(true) {
   wait(0.8);
-  Sound.play_sound(\"jump\");
+  Sound.play(\"sounds/jump.wav\");
   if(tuxjumps >= 0) {
     TUX.set_velocity(50, 300);
   } else {
@@ -148,19 +163,20 @@ while(true) {
   }
   tuxjumps--;
   wait(0.5);
-  if(PENNY.get_animation() == \"stand\") {
-    PENNY.set_animation(\"throw\");
-  } else if(PENNY.get_animation() == \"throw\") {
-    PENNY.set_animation(\"jump\");
-  } else if(PENNY.get_animation() == \"jump\") {
-    PENNY.set_animation(\"dead\");
+  if(PENNY.get_action() == \"stand\") {
+    PENNY.set_action(\"throw\");
+  } else if(PENNY.get_action() == \"throw\") {
+    PENNY.set_action(\"jump\");
+  } else if(PENNY.get_action() == \"jump\") {
+    PENNY.set_action(\"dead\");
   } else {
-    Sound.play_sound(\"grow\");
-    PENNY.set_animation(\"stand\");
+    Sound.play(\"sounds/grow.wav\");
+    PENNY.set_action(\"stand\");
     PENNY.set_velocity(0, 900);
   }
 }
 ")
    )
-)
+ )
 
+;; EOF ;;