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/common.lua | |
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/common.lua')
-rw-r--r-- | res/scripts/common.lua | 19 |
1 files changed, 19 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 | ||