diff options
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 | ||
