summary refs log tree commit diff stats
path: root/res
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2021-02-26 16:55:44 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2021-02-26 16:55:44 -0500
commitaf49b5366d35173702a2b3bd70ac4254b8855538 (patch)
tree66755c194016d7342a0540746c4faa597bc6bb5f /res
parentd5e3bc615b300eb985d59b91ebd1f2f1a4d4e107 (diff)
downloadtanetane-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.lua14
-rw-r--r--res/scripts/underwater.lua4
-rw-r--r--res/scripts/underwater_start.lua4
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
317end 317end
318
319--- Turns off crouching (and thus running) for the player.
320function PreventCrouching()
321 local playerId = getPlayerSprite()
322 local playerSprite = getSprite(playerId)
323 playerSprite.cantCrouch = true
324end
325
326--- Undoes the effect of PreventCrouching().
327function AllowCrouching()
328 local playerId = getPlayerSprite()
329 local playerSprite = getSprite(playerId)
330 playerSprite.cantCrouch = false
331end
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 @@
1underwater = {} 1underwater = {}
2 2
3function underwater.leave()
4 AllowCrouching()
5end
6
3function underwater.fish2() 7function 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 @@
1underwater_start = {} 1underwater_start = {}
2 2
3function underwater_start.init()
4 PreventCrouching()
5end
6
3function underwater_start.talk_to_fish1() 7function 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)