summary refs log tree commit diff stats
path: root/res/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'res/scripts')
-rw-r--r--res/scripts/common.lua2
-rw-r--r--res/scripts/global.lua (renamed from res/scripts/default.lua)4
-rw-r--r--res/scripts/map1.lua (renamed from res/scripts/script0001.lua)16
-rw-r--r--res/scripts/map1_off_right.lua3
-rw-r--r--res/scripts/map2.lua (renamed from res/scripts/map2_off_left.lua)4
-rw-r--r--res/scripts/test_trigger.lua7
6 files changed, 22 insertions, 14 deletions
diff --git a/res/scripts/common.lua b/res/scripts/common.lua index 2023e63..3c412c6 100644 --- a/res/scripts/common.lua +++ b/res/scripts/common.lua
@@ -112,7 +112,7 @@ function ChangeMap(map, warp)
112 112
113 playerSprite.controllable = false 113 playerSprite.controllable = false
114 FadeToBlack(150) 114 FadeToBlack(150)
115 loadMap("../res/maps/" .. map .. ".tmx", warp, direction) 115 loadMap(map, warp, direction)
116 116
117 local newPlayerId = getPlayerSprite() 117 local newPlayerId = getPlayerSprite()
118 local newPlayerSprite = getSprite(newPlayerId) 118 local newPlayerSprite = getSprite(newPlayerId)
diff --git a/res/scripts/default.lua b/res/scripts/global.lua index b8f7768..48084c8 100644 --- a/res/scripts/default.lua +++ b/res/scripts/global.lua
@@ -1,4 +1,6 @@
1function default() 1global = {}
2
3function global.no_problem_here()
2 StartCutscene() 4 StartCutscene()
3 DisplayMessage("* No problem here.", "", SpeakerType.NONE) 5 DisplayMessage("* No problem here.", "", SpeakerType.NONE)
4 HideCutsceneBars() 6 HideCutsceneBars()
diff --git a/res/scripts/script0001.lua b/res/scripts/map1.lua index bf6a0c2..7d6014a 100644 --- a/res/scripts/script0001.lua +++ b/res/scripts/map1.lua
@@ -1,4 +1,6 @@
1function script0001() 1map1 = {}
2
3function map1.script0001()
2 StartCutscene() 4 StartCutscene()
3 SetAnimation("boney", "barking") 5 SetAnimation("boney", "barking")
4 local barkingNoise = LoopSound("barking_at_hallucination.wav") 6 local barkingNoise = LoopSound("barking_at_hallucination.wav")
@@ -22,3 +24,15 @@ function script0001()
22 SetAnimation("flint", "still") 24 SetAnimation("flint", "still")
23 HideCutsceneBars() 25 HideCutsceneBars()
24end 26end
27
28function map1.off_right()
29 ChangeMap("map2", "fromLeft")
30end
31
32function map1.test_trigger()
33 StartCutscene()
34 PlaySound("boney_growl.wav")
35 DisplayMessage("* Hi! Welcome to the funky zone.", "", SpeakerType.NONE)
36 WaitForEndOfMessage()
37 HideCutsceneBars()
38end
diff --git a/res/scripts/map1_off_right.lua b/res/scripts/map1_off_right.lua deleted file mode 100644 index 7dd0113..0000000 --- a/res/scripts/map1_off_right.lua +++ /dev/null
@@ -1,3 +0,0 @@
1function map1_off_right()
2 ChangeMap("map2", "fromLeft")
3end
diff --git a/res/scripts/map2_off_left.lua b/res/scripts/map2.lua index d4d9ce4..1f14b31 100644 --- a/res/scripts/map2_off_left.lua +++ b/res/scripts/map2.lua
@@ -1,3 +1,5 @@
1function map2_off_left() 1map2 = {}
2
3function map2.off_left()
2 ChangeMap("map1", "fromRight") 4 ChangeMap("map1", "fromRight")
3end 5end
diff --git a/res/scripts/test_trigger.lua b/res/scripts/test_trigger.lua deleted file mode 100644 index 4d9d06c..0000000 --- a/res/scripts/test_trigger.lua +++ /dev/null
@@ -1,7 +0,0 @@
1function test_trigger()
2 StartCutscene()
3 PlaySound("boney_growl.wav")
4 DisplayMessage("* Hi! Welcome to the funky zone.", "", SpeakerType.NONE)
5 WaitForEndOfMessage()
6 HideCutsceneBars()
7end