diff options
Diffstat (limited to 'res')
| -rw-r--r-- | res/scripts/common.lua | 8 | ||||
| -rw-r--r-- | res/scripts/map2.lua | 11 |
2 files changed, 19 insertions, 0 deletions
| diff --git a/res/scripts/common.lua b/res/scripts/common.lua index 2197417..422d157 100644 --- a/res/scripts/common.lua +++ b/res/scripts/common.lua | |||
| @@ -131,6 +131,14 @@ function WaitForMapFade() | |||
| 131 | end | 131 | end |
| 132 | end | 132 | end |
| 133 | 133 | ||
| 134 | function ShakeCamera(period) | ||
| 135 | effect():shakeCamera(period) | ||
| 136 | end | ||
| 137 | |||
| 138 | function StopShakingCamera() | ||
| 139 | effect():stopShakingCamera() | ||
| 140 | end | ||
| 141 | |||
| 134 | function SetPartyDirection(spriteId, direction) | 142 | function SetPartyDirection(spriteId, direction) |
| 135 | animation():setSpriteDirection(spriteId, direction) | 143 | animation():setSpriteDirection(spriteId, direction) |
| 136 | 144 | ||
| diff --git a/res/scripts/map2.lua b/res/scripts/map2.lua index 12a5df0..cdab0f5 100644 --- a/res/scripts/map2.lua +++ b/res/scripts/map2.lua | |||
| @@ -26,6 +26,15 @@ end | |||
| 26 | 26 | ||
| 27 | function map2.mailbox_lightning() | 27 | function map2.mailbox_lightning() |
| 28 | StartCutscene() | 28 | StartCutscene() |
| 29 | DisplayMessage("* The mailbox lid is open...\n* Peek inside?", "", SpeakerType.NONE) | ||
| 30 | ShowChoice("Yes", "No") | ||
| 31 | WaitForEndOfMessage() | ||
| 32 | |||
| 33 | if GetChoiceSelection() == 1 then | ||
| 34 | HideCutsceneBars() | ||
| 35 | return | ||
| 36 | end | ||
| 37 | |||
| 29 | FadeMap(500, 0.5) | 38 | FadeMap(500, 0.5) |
| 30 | WaitForMapFade() | 39 | WaitForMapFade() |
| 31 | 40 | ||
| @@ -38,11 +47,13 @@ function map2.mailbox_lightning() | |||
| 38 | local lucasPos = GetPosition("lucas") | 47 | local lucasPos = GetPosition("lucas") |
| 39 | CreateAnimatedSpriteAtPosition("lightning_from_mailbox", "lightning", lucasPos:x() + 56, lucasPos:y() - 72, "strike", Direction.DOWN_LEFT, SpriteLayer.ABOVE) | 48 | CreateAnimatedSpriteAtPosition("lightning_from_mailbox", "lightning", lucasPos:x() + 56, lucasPos:y() - 72, "strike", Direction.DOWN_LEFT, SpriteLayer.ABOVE) |
| 40 | 49 | ||
| 50 | ShakeCamera(66) | ||
| 41 | PlaySound("lightning_explosion.wav") | 51 | PlaySound("lightning_explosion.wav") |
| 42 | SetDirection("lucas", Direction.DOWN) | 52 | SetDirection("lucas", Direction.DOWN) |
| 43 | SetAnimation("lucas", "lightning_electrocute!") | 53 | SetAnimation("lucas", "lightning_electrocute!") |
| 44 | WaitForAnimation("lucas") | 54 | WaitForAnimation("lucas") |
| 45 | 55 | ||
| 56 | StopShakingCamera() | ||
| 46 | DestroyNamedSprite("lightning_from_mailbox") | 57 | DestroyNamedSprite("lightning_from_mailbox") |
| 47 | SetAnimation("lucas", "lightning_collapse!") | 58 | SetAnimation("lucas", "lightning_collapse!") |
| 48 | WaitForAnimation("lucas") | 59 | WaitForAnimation("lucas") |
