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/scripts | |
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/scripts')
-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 |
5 files changed, 50 insertions, 0 deletions
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) |