summary refs log tree commit diff stats
path: root/res/scripts
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2021-03-05 09:58:45 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2021-03-05 09:58:45 -0500
commitcd72ba5481705072b893d728e2f80931b5cca580 (patch)
tree5cc659195ec8b0797b530cf03d148fd4c839a625 /res/scripts
parent7e3b59b09399bf8da243fb4122caa2c9c10d2624 (diff)
downloadtanetane-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.lua19
-rw-r--r--res/scripts/time_passage.lua7
-rw-r--r--res/scripts/time_passage_antechamber.lua5
-rw-r--r--res/scripts/underwater.lua14
-rw-r--r--res/scripts/underwater_start.lua5
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
524end 524end
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.
529function 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)
543end
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 @@
1time_passage = {} 1time_passage = {}
2 2
3function time_passage.exit_area()
4 ExitAreaTransition()
5 ChangeMap("hallucination_interior", "exit_area_from_time_passage", ChangeMapOptions.DO_NOT_FADE)
6 RemoveFadeout(1000)
7 EnablePlayerControl()
8end
9
3function time_passage.off_bottom() 10function time_passage.off_bottom()
4 ChangeMap("time_passage_antechamber", "fromTop") 11 ChangeMap("time_passage_antechamber", "fromTop")
5end 12end
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 @@
1time_passage_antechamber = {} 1time_passage_antechamber = {}
2 2
3function time_passage_antechamber.exit_area()
4 loadMapScripts("time_passage")
5 time_passage.exit_area()
6end
7
3function time_passage_antechamber.enter_door() 8function 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)
13end 13end
14 14
15function 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()
27end
28
15function underwater.fish2() 29function 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()
6end 6end
7 7
8function underwater_start.exit_area()
9 loadMapScripts("underwater")
10 underwater.exit_area()
11end
12
8function underwater_start.talk_to_fish1() 13function 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)