diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2021-03-05 09:58:45 -0500 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2021-03-05 09:58:45 -0500 |
commit | cd72ba5481705072b893d728e2f80931b5cca580 (patch) | |
tree | 5cc659195ec8b0797b530cf03d148fd4c839a625 /res | |
parent | 7e3b59b09399bf8da243fb4122caa2c9c10d2624 (diff) | |
download | tanetane-cd72ba5481705072b893d728e2f80931b5cca580.tar.gz tanetane-cd72ba5481705072b893d728e2f80931b5cca580.tar.bz2 tanetane-cd72ba5481705072b893d728e2f80931b5cca580.zip |
Wrote exit area scripts for underwater and time passage
Diffstat (limited to 'res')
-rw-r--r-- | res/maps/hallucination_hot_spring.tmx | 5 | ||||
-rw-r--r-- | res/maps/hallucination_interior.tmx | 5 | ||||
-rw-r--r-- | res/scripts/common.lua | 19 | ||||
-rw-r--r-- | res/scripts/time_passage.lua | 7 | ||||
-rw-r--r-- | res/scripts/time_passage_antechamber.lua | 5 | ||||
-rw-r--r-- | res/scripts/underwater.lua | 14 | ||||
-rw-r--r-- | res/scripts/underwater_start.lua | 5 | ||||
-rw-r--r-- | res/sfx/exit_area.wav | bin | 0 -> 15116 bytes |
8 files changed, 58 insertions, 2 deletions
diff --git a/res/maps/hallucination_hot_spring.tmx b/res/maps/hallucination_hot_spring.tmx index d750a2b..7a8adf9 100644 --- a/res/maps/hallucination_hot_spring.tmx +++ b/res/maps/hallucination_hot_spring.tmx | |||
@@ -1,5 +1,5 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | <map version="1.4" tiledversion="1.4.3" orientation="orthogonal" renderorder="right-down" width="32" height="16" tilewidth="16" tileheight="16" infinite="0" nextlayerid="3" nextobjectid="5"> | 2 | <map version="1.4" tiledversion="1.4.3" orientation="orthogonal" renderorder="right-down" width="32" height="16" tilewidth="16" tileheight="16" infinite="0" nextlayerid="3" nextobjectid="6"> |
3 | <properties> | 3 | <properties> |
4 | <property name="music" value="red_green_yellow_yellow"/> | 4 | <property name="music" value="red_green_yellow_yellow"/> |
5 | </properties> | 5 | </properties> |
@@ -45,6 +45,9 @@ | |||
45 | <property name="script" value="enter_hot_spring"/> | 45 | <property name="script" value="enter_hot_spring"/> |
46 | </properties> | 46 | </properties> |
47 | </object> | 47 | </object> |
48 | <object id="5" name="exit_area_from_underwater" type="warp" x="304" y="176"> | ||
49 | <point/> | ||
50 | </object> | ||
48 | </objectgroup> | 51 | </objectgroup> |
49 | <layer id="1" name="Upper (most)" width="32" height="16"> | 52 | <layer id="1" name="Upper (most)" width="32" height="16"> |
50 | <properties> | 53 | <properties> |
diff --git a/res/maps/hallucination_interior.tmx b/res/maps/hallucination_interior.tmx index 734b113..6d3b88a 100644 --- a/res/maps/hallucination_interior.tmx +++ b/res/maps/hallucination_interior.tmx | |||
@@ -1,5 +1,5 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | <map version="1.4" tiledversion="1.4.3" orientation="orthogonal" renderorder="right-down" width="64" height="64" tilewidth="16" tileheight="16" infinite="0" nextlayerid="3" nextobjectid="4"> | 2 | <map version="1.4" tiledversion="1.4.3" orientation="orthogonal" renderorder="right-down" width="64" height="64" tilewidth="16" tileheight="16" infinite="0" nextlayerid="3" nextobjectid="5"> |
3 | <properties> | 3 | <properties> |
4 | <property name="music" value="red_green_yellow_yellow"/> | 4 | <property name="music" value="red_green_yellow_yellow"/> |
5 | </properties> | 5 | </properties> |
@@ -145,6 +145,9 @@ | |||
145 | </properties> | 145 | </properties> |
146 | <point/> | 146 | <point/> |
147 | </object> | 147 | </object> |
148 | <object id="4" name="exit_area_from_time_passage" type="warp" x="144" y="592"> | ||
149 | <point/> | ||
150 | </object> | ||
148 | </objectgroup> | 151 | </objectgroup> |
149 | <layer id="1" name="Upper" width="64" height="64"> | 152 | <layer id="1" name="Upper" width="64" height="64"> |
150 | <properties> | 153 | <properties> |
diff --git a/res/scripts/common.lua b/res/scripts/common.lua index 36ccc46..b0e555b 100644 --- a/res/scripts/common.lua +++ b/res/scripts/common.lua | |||
@@ -522,3 +522,22 @@ function SetMovementSpeed(spriteName, speed) | |||
522 | local sprite = getSprite(spriteId) | 522 | local sprite = getSprite(spriteId) |
523 | sprite.movementSpeed = speed | 523 | sprite.movementSpeed = speed |
524 | end | 524 | end |
525 | |||
526 | --- Performs the beginning of the exit area transition. | ||
527 | -- This does the circle effect and plays the sound effect. The circle effect | ||
528 | -- then gets removed and replaced with a screen fade. | ||
529 | function ExitAreaTransition() | ||
530 | DisablePlayerControl() | ||
531 | --character():halt(getPlayerSprite()) | ||
532 | coroutine.yield() | ||
533 | PlaySound("exit_area.wav") | ||
534 | FadeoutMusic(679) | ||
535 | effect():circleTransition(679, 1.0) | ||
536 | while not effect():isCircleTransitionComplete() do | ||
537 | coroutine.yield() | ||
538 | end | ||
539 | character():halt(getPlayerSprite()) | ||
540 | FadeToBlack(1) | ||
541 | effect():circleTransition(1, 0.0) | ||
542 | Delay(1000) | ||
543 | end | ||
diff --git a/res/scripts/time_passage.lua b/res/scripts/time_passage.lua index 11d51a8..e91a1cc 100644 --- a/res/scripts/time_passage.lua +++ b/res/scripts/time_passage.lua | |||
@@ -1,5 +1,12 @@ | |||
1 | time_passage = {} | 1 | time_passage = {} |
2 | 2 | ||
3 | function time_passage.exit_area() | ||
4 | ExitAreaTransition() | ||
5 | ChangeMap("hallucination_interior", "exit_area_from_time_passage", ChangeMapOptions.DO_NOT_FADE) | ||
6 | RemoveFadeout(1000) | ||
7 | EnablePlayerControl() | ||
8 | end | ||
9 | |||
3 | function time_passage.off_bottom() | 10 | function time_passage.off_bottom() |
4 | ChangeMap("time_passage_antechamber", "fromTop") | 11 | ChangeMap("time_passage_antechamber", "fromTop") |
5 | end | 12 | end |
diff --git a/res/scripts/time_passage_antechamber.lua b/res/scripts/time_passage_antechamber.lua index 5ccc3d4..73f4b0f 100644 --- a/res/scripts/time_passage_antechamber.lua +++ b/res/scripts/time_passage_antechamber.lua | |||
@@ -1,5 +1,10 @@ | |||
1 | time_passage_antechamber = {} | 1 | time_passage_antechamber = {} |
2 | 2 | ||
3 | function time_passage_antechamber.exit_area() | ||
4 | loadMapScripts("time_passage") | ||
5 | time_passage.exit_area() | ||
6 | end | ||
7 | |||
3 | function time_passage_antechamber.enter_door() | 8 | function time_passage_antechamber.enter_door() |
4 | CreateAnimatedSpriteAtWarpPoint("entryway", "entryway", "entryway_appear", "time_passage", Direction.DOWN, SpriteLayer.NORMAL) | 9 | CreateAnimatedSpriteAtWarpPoint("entryway", "entryway", "entryway_appear", "time_passage", Direction.DOWN, SpriteLayer.NORMAL) |
5 | PlaySound("door_open.wav") | 10 | PlaySound("door_open.wav") |
diff --git a/res/scripts/underwater.lua b/res/scripts/underwater.lua index 0b62ff5..f0dd29f 100644 --- a/res/scripts/underwater.lua +++ b/res/scripts/underwater.lua | |||
@@ -12,6 +12,20 @@ function underwater.leave() | |||
12 | SetAnimationSlowdown("lucas", 1) | 12 | SetAnimationSlowdown("lucas", 1) |
13 | end | 13 | end |
14 | 14 | ||
15 | function underwater.exit_area() | ||
16 | ExitAreaTransition() | ||
17 | underwater.leave() | ||
18 | ChangeMap("hallucination_hot_spring", "exit_area_from_underwater", ChangeMapOptions.DO_NOT_FADE) | ||
19 | MoveSpriteToWarp("kuma", "exit_area_from_underwater") | ||
20 | MoveSpriteToWarp("duster", "exit_area_from_underwater") | ||
21 | MoveSpriteToWarp("boney", "exit_area_from_underwater") | ||
22 | character():addSpriteToParty(getPlayerSprite(), getSpriteByAlias("kuma")) | ||
23 | character():addSpriteToParty(getPlayerSprite(), getSpriteByAlias("duster")) | ||
24 | character():addSpriteToParty(getPlayerSprite(), getSpriteByAlias("boney")) | ||
25 | RemoveFadeout(1000) | ||
26 | EnablePlayerControl() | ||
27 | end | ||
28 | |||
15 | function underwater.fish2() | 29 | function underwater.fish2() |
16 | StartCutscene() | 30 | StartCutscene() |
17 | DisplayMessage("* What are you complaining about?\nYou're so powerful now...\n\fYou owe it all to her.", "Fish", SpeakerType.BOY) | 31 | DisplayMessage("* What are you complaining about?\nYou're so powerful now...\n\fYou owe it all to her.", "Fish", SpeakerType.BOY) |
diff --git a/res/scripts/underwater_start.lua b/res/scripts/underwater_start.lua index 7259d05..7f8ab62 100644 --- a/res/scripts/underwater_start.lua +++ b/res/scripts/underwater_start.lua | |||
@@ -5,6 +5,11 @@ function underwater_start.init() | |||
5 | underwater.make_lucas_underwater() | 5 | underwater.make_lucas_underwater() |
6 | end | 6 | end |
7 | 7 | ||
8 | function underwater_start.exit_area() | ||
9 | loadMapScripts("underwater") | ||
10 | underwater.exit_area() | ||
11 | end | ||
12 | |||
8 | function underwater_start.talk_to_fish1() | 13 | function underwater_start.talk_to_fish1() |
9 | StartCutscene() | 14 | StartCutscene() |
10 | DisplayMessage("* You deserved what she did to you.", "Fish", SpeakerType.BOY) | 15 | DisplayMessage("* You deserved what she did to you.", "Fish", SpeakerType.BOY) |
diff --git a/res/sfx/exit_area.wav b/res/sfx/exit_area.wav new file mode 100644 index 0000000..6de3b80 --- /dev/null +++ b/res/sfx/exit_area.wav | |||
Binary files differ | |||