From 982b069b86c74288b3aa8bf939b64d888ee449b3 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Sun, 27 May 2007 10:50:29 +0000 Subject: [PATCH] play around with scripted willos SVN-Revision: 5062 --- data/levels/test/transition.nut | 7 ++ data/levels/test/transition.stl | 139 ++++++++++++++++++++++++++++++++++++++-- 2 files changed, 141 insertions(+), 5 deletions(-) create mode 100644 data/levels/test/transition.nut diff --git a/data/levels/test/transition.nut b/data/levels/test/transition.nut new file mode 100644 index 000000000..83106521d --- /dev/null +++ b/data/levels/test/transition.nut @@ -0,0 +1,7 @@ +function willohit() +{ + println("willo was hit"); + Tux.deactivate(); + wait(0.5); + restart(); +} diff --git a/data/levels/test/transition.stl b/data/levels/test/transition.stl index 649e14a05..39c82988e 100644 --- a/data/levels/test/transition.stl +++ b/data/levels/test/transition.stl @@ -5,6 +5,7 @@ (license "GPL 2+ / CC-by-sa 3.0") (sector (name "main") + (init-script "import(\"levels/test/transition.nut\");") (ambient-light 0.7022965 0.8745861 1) (ambient_sound (sample "sounds/rain.wav") @@ -12,10 +13,10 @@ (distance_bias 100) (volume 0.5) (name "Rain") - (width 14396) - (height 572) + (width 7996) + (height 636) (x 0) - (y 0) + (y 640) ) (background (speed 0.5) @@ -29,13 +30,40 @@ (particles-rain ) (scripttrigger - (script "play_music(\"music/wisphunt.music\");") + (script "wait(0.5); +willo2.set_state(\"move_path_track\"); +willo2.start_moving(); +play_music(\"music/wisphunt.music\");") (button #f) (width 32) (height 520) - (x 2528) + (x 1120) + (y -64) + ) + (scripttrigger + (script "wait(1); +willo2.set_state(\"vanish\"); +willo3.set_state(\"move_path_track\"); +willo3.start_moving();") + (button #f) + (width 28) + (height 424) + (x 2656) (y -12) ) + (scripttrigger + (script "println(\"ende?\"); +willo3.set_state(\"move_path\"); +willo3.stop_moving(); +willo3.goto_node(6); +wait(1); +willo3.set_state(\"move_path_track\");") + (button #f) + (width 28) + (height 412) + (x 7264) + (y 0) + ) (spawnpoint (name "main") (x 128) @@ -186,5 +214,106 @@ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ) ) + (willowisp + (sector "") + (spawnpoint "") + (name "willo1") + (running #t) + (flyspeed 300) + (track-range 96) + (hit-script "willohit();") + (x 480) + (y 32) + (path + (node + (x 448) + (y 32) + ) + (node + (x 544) + (y 96) + ) + (node + (x 416) + (y 96) + ) + (node + (x 512) + (y 32) + ) + (node + (x 480) + (y 128) + ) + ) + ) + (willowisp + (sector "") + (spawnpoint "") + (name "willo2") + (flyspeed 300) + (track-range 96) + (hit-script "willohit();") + (x 1056) + (y 32) + (path + (node + (x 1056) + (y 32) + ) + (node + (x 1280) + (y 352) + ) + (node + (x 1696) + (y 320) + ) + (node + (x 2048) + (y 288) + ) + (node + (x 2400) + (y 320) + ) + (node + (x 2784) + (y 288) + ) + (node + (x 3040) + (y 32) + ) + ) + ) + (willowisp + (sector "") + (spawnpoint "") + (name "willo3") + (hit-script "willohit();") + (flyspeed 300) + (track-range 96) + (x 2528) + (y 32) + (path + (node + (x 2528) + (y 64) + ) + (node + (x 2880) + (y 352) + ) + (node + (x 3200) + (y 320) + ) + (node + (x 7264) + (y 192) + ) + ) + ) ) ) -- 2.11.0