summary refs log tree commit diff stats
path: root/res
diff options
context:
space:
mode:
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)