summary refs log tree commit diff stats
path: root/res/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'res/scripts')
-rw-r--r--res/scripts/common.lua11
-rw-r--r--res/scripts/default.lua2
-rw-r--r--res/scripts/script0001.lua1
-rw-r--r--res/scripts/test_trigger.lua1
4 files changed, 14 insertions, 1 deletions
diff --git a/res/scripts/common.lua b/res/scripts/common.lua index 1841662..b540548 100644 --- a/res/scripts/common.lua +++ b/res/scripts/common.lua
@@ -25,6 +25,13 @@ CharacterState = {
25 RUNNING = 3 25 RUNNING = 3
26} 26}
27 27
28function StartCutscene()
29 local playerId = getPlayerSprite()
30 local playerSprite = getSprite(playerId)
31 playerSprite.controllable = false
32 character():halt(playerId)
33end
34
28function DisplayMessage(msg, name, type) 35function DisplayMessage(msg, name, type)
29 message():displayMessage(msg, name, type) 36 message():displayMessage(msg, name, type)
30end 37end
@@ -38,6 +45,10 @@ end
38function HideCutsceneBars() 45function HideCutsceneBars()
39 WaitForEndOfMessage() 46 WaitForEndOfMessage()
40 message():hideCutsceneBars() 47 message():hideCutsceneBars()
48
49 local playerId = getPlayerSprite()
50 local playerSprite = getSprite(playerId)
51 playerSprite.controllable = true
41end 52end
42 53
43function SetAnimation(spriteName, animName) 54function SetAnimation(spriteName, animName)
diff --git a/res/scripts/default.lua b/res/scripts/default.lua index 6188c36..936a543 100644 --- a/res/scripts/default.lua +++ b/res/scripts/default.lua
@@ -1,5 +1,5 @@
1function default() 1function default()
2 StartCutscene()
2 DisplayMessage("No problem here.", "", SpeakerType.NONE) 3 DisplayMessage("No problem here.", "", SpeakerType.NONE)
3 WaitForEndOfMessage()
4 HideCutsceneBars() 4 HideCutsceneBars()
5end 5end
diff --git a/res/scripts/script0001.lua b/res/scripts/script0001.lua index fcf7029..e5078f2 100644 --- a/res/scripts/script0001.lua +++ b/res/scripts/script0001.lua
@@ -1,4 +1,5 @@
1function script0001() 1function script0001()
2 StartCutscene()
2 SetAnimation("boney", "barking") 3 SetAnimation("boney", "barking")
3 local barkingNoise = LoopSound("barking_at_hallucination.wav") 4 local barkingNoise = LoopSound("barking_at_hallucination.wav")
4 5
diff --git a/res/scripts/test_trigger.lua b/res/scripts/test_trigger.lua index cd64fb8..58325e5 100644 --- a/res/scripts/test_trigger.lua +++ b/res/scripts/test_trigger.lua
@@ -1,4 +1,5 @@
1function test_trigger() 1function test_trigger()
2 StartCutscene()
2 PlaySound("boney_growl.wav") 3 PlaySound("boney_growl.wav")
3 DisplayMessage("Hi! Welcome to the funky zone.", "", SpeakerType.NONE) 4 DisplayMessage("Hi! Welcome to the funky zone.", "", SpeakerType.NONE)
4 WaitForEndOfMessage() 5 WaitForEndOfMessage()