diff options
| author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2021-02-26 16:55:44 -0500 |
|---|---|---|
| committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2021-02-26 16:55:44 -0500 |
| commit | af49b5366d35173702a2b3bd70ac4254b8855538 (patch) | |
| tree | 66755c194016d7342a0540746c4faa597bc6bb5f /res | |
| parent | d5e3bc615b300eb985d59b91ebd1f2f1a4d4e107 (diff) | |
| download | tanetane-af49b5366d35173702a2b3bd70ac4254b8855538.tar.gz tanetane-af49b5366d35173702a2b3bd70ac4254b8855538.tar.bz2 tanetane-af49b5366d35173702a2b3bd70ac4254b8855538.zip | |
Disabled crouching/running in the underwater map
Diffstat (limited to 'res')
| -rw-r--r-- | res/scripts/common.lua | 14 | ||||
| -rw-r--r-- | res/scripts/underwater.lua | 4 | ||||
| -rw-r--r-- | res/scripts/underwater_start.lua | 4 |
3 files changed, 22 insertions, 0 deletions
| diff --git a/res/scripts/common.lua b/res/scripts/common.lua index e95f6f1..895ad7b 100644 --- a/res/scripts/common.lua +++ b/res/scripts/common.lua | |||
| @@ -315,3 +315,17 @@ function StopClipping() | |||
| 315 | local playerSprite = getSprite(playerId) | 315 | local playerSprite = getSprite(playerId) |
| 316 | playerSprite.clipping = false | 316 | playerSprite.clipping = false |
| 317 | end | 317 | end |
| 318 | |||
| 319 | --- Turns off crouching (and thus running) for the player. | ||
| 320 | function PreventCrouching() | ||
| 321 | local playerId = getPlayerSprite() | ||
| 322 | local playerSprite = getSprite(playerId) | ||
| 323 | playerSprite.cantCrouch = true | ||
| 324 | end | ||
| 325 | |||
| 326 | --- Undoes the effect of PreventCrouching(). | ||
| 327 | function AllowCrouching() | ||
| 328 | local playerId = getPlayerSprite() | ||
| 329 | local playerSprite = getSprite(playerId) | ||
| 330 | playerSprite.cantCrouch = false | ||
| 331 | end | ||
| diff --git a/res/scripts/underwater.lua b/res/scripts/underwater.lua index 602c8d4..4c5d2bb 100644 --- a/res/scripts/underwater.lua +++ b/res/scripts/underwater.lua | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | underwater = {} | 1 | underwater = {} |
| 2 | 2 | ||
| 3 | function underwater.leave() | ||
| 4 | AllowCrouching() | ||
| 5 | end | ||
| 6 | |||
| 3 | function underwater.fish2() | 7 | function underwater.fish2() |
| 4 | StartCutscene() | 8 | StartCutscene() |
| 5 | DisplayMessage("* What are you complaining about?\nYou're so powerful now...\n\fYou owe it all to her.", "Fish", SpeakerType.BOY) | 9 | 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 fe582ab..98a6e67 100644 --- a/res/scripts/underwater_start.lua +++ b/res/scripts/underwater_start.lua | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | underwater_start = {} | 1 | underwater_start = {} |
| 2 | 2 | ||
| 3 | function underwater_start.init() | ||
| 4 | PreventCrouching() | ||
| 5 | end | ||
| 6 | |||
| 3 | function underwater_start.talk_to_fish1() | 7 | function underwater_start.talk_to_fish1() |
| 4 | StartCutscene() | 8 | StartCutscene() |
| 5 | DisplayMessage("* You deserved what she did to you.", "Fish", SpeakerType.BOY) | 9 | DisplayMessage("* You deserved what she did to you.", "Fish", SpeakerType.BOY) |
