From cd72ba5481705072b893d728e2f80931b5cca580 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Fri, 5 Mar 2021 09:58:45 -0500 Subject: Wrote exit area scripts for underwater and time passage --- res/scripts/common.lua | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'res/scripts/common.lua') 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) local sprite = getSprite(spriteId) sprite.movementSpeed = speed end + +--- Performs the beginning of the exit area transition. +-- This does the circle effect and plays the sound effect. The circle effect +-- then gets removed and replaced with a screen fade. +function ExitAreaTransition() + DisablePlayerControl() + --character():halt(getPlayerSprite()) + coroutine.yield() + PlaySound("exit_area.wav") + FadeoutMusic(679) + effect():circleTransition(679, 1.0) + while not effect():isCircleTransitionComplete() do + coroutine.yield() + end + character():halt(getPlayerSprite()) + FadeToBlack(1) + effect():circleTransition(1, 0.0) + Delay(1000) +end -- cgit 1.4.1