diff options
Diffstat (limited to 'res')
-rw-r--r-- | res/maps/map1.tmx | 2 | ||||
-rw-r--r-- | res/maps/map2.tmx | 2 | ||||
-rw-r--r-- | res/scripts/common.lua | 2 | ||||
-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.lua | 3 | ||||
-rw-r--r-- | res/scripts/map2.lua (renamed from res/scripts/map2_off_left.lua) | 4 | ||||
-rw-r--r-- | res/scripts/test_trigger.lua | 7 |
8 files changed, 24 insertions, 16 deletions
diff --git a/res/maps/map1.tmx b/res/maps/map1.tmx index 8afb909..e1a9049 100644 --- a/res/maps/map1.tmx +++ b/res/maps/map1.tmx | |||
@@ -781,7 +781,7 @@ | |||
781 | </object> | 781 | </object> |
782 | <object id="8" name="moveToRight" type="trigger" x="761" y="359.667" width="18" height="60.3333"> | 782 | <object id="8" name="moveToRight" type="trigger" x="761" y="359.667" width="18" height="60.3333"> |
783 | <properties> | 783 | <properties> |
784 | <property name="script" value="map1_off_right"/> | 784 | <property name="script" value="off_right"/> |
785 | </properties> | 785 | </properties> |
786 | </object> | 786 | </object> |
787 | <object id="9" name="fromRight" type="warp" x="748.667" y="382.667"> | 787 | <object id="9" name="fromRight" type="warp" x="748.667" y="382.667"> |
diff --git a/res/maps/map2.tmx b/res/maps/map2.tmx index c1d2f2d..43fa850 100644 --- a/res/maps/map2.tmx +++ b/res/maps/map2.tmx | |||
@@ -642,7 +642,7 @@ | |||
642 | </object> | 642 | </object> |
643 | <object id="2" name="moveToLeft" type="trigger" x="-20.3333" y="304" width="22.6667" height="91.6667"> | 643 | <object id="2" name="moveToLeft" type="trigger" x="-20.3333" y="304" width="22.6667" height="91.6667"> |
644 | <properties> | 644 | <properties> |
645 | <property name="script" value="map2_off_left"/> | 645 | <property name="script" value="off_left"/> |
646 | </properties> | 646 | </properties> |
647 | </object> | 647 | </object> |
648 | </objectgroup> | 648 | </objectgroup> |
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 @@ | |||
1 | function default() | 1 | global = {} |
2 | |||
3 | function 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 @@ | |||
1 | function script0001() | 1 | map1 = {} |
2 | |||
3 | function 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() |
24 | end | 26 | end |
27 | |||
28 | function map1.off_right() | ||
29 | ChangeMap("map2", "fromLeft") | ||
30 | end | ||
31 | |||
32 | function map1.test_trigger() | ||
33 | StartCutscene() | ||
34 | PlaySound("boney_growl.wav") | ||
35 | DisplayMessage("* Hi! Welcome to the funky zone.", "", SpeakerType.NONE) | ||
36 | WaitForEndOfMessage() | ||
37 | HideCutsceneBars() | ||
38 | end | ||
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 @@ | |||
1 | function map1_off_right() | ||
2 | ChangeMap("map2", "fromLeft") | ||
3 | end | ||
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 @@ | |||
1 | function map2_off_left() | 1 | map2 = {} |
2 | |||
3 | function map2.off_left() | ||
2 | ChangeMap("map1", "fromRight") | 4 | ChangeMap("map1", "fromRight") |
3 | end | 5 | end |
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 @@ | |||
1 | function test_trigger() | ||
2 | StartCutscene() | ||
3 | PlaySound("boney_growl.wav") | ||
4 | DisplayMessage("* Hi! Welcome to the funky zone.", "", SpeakerType.NONE) | ||
5 | WaitForEndOfMessage() | ||
6 | HideCutsceneBars() | ||
7 | end | ||