diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2021-02-11 20:47:46 -0500 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2021-02-11 20:47:46 -0500 |
commit | ec511705ce96d80d4e2a36054769c211448e8ec8 (patch) | |
tree | e0a70671430a84472024d54b934df3248924ec4d /res/scripts | |
parent | d9be54853910c2086013846661e0dc4a8603c20e (diff) | |
download | tanetane-ec511705ce96d80d4e2a36054769c211448e8ec8.tar.gz tanetane-ec511705ce96d80d4e2a36054769c211448e8ec8.tar.bz2 tanetane-ec511705ce96d80d4e2a36054769c211448e8ec8.zip |
Added choice prompts
"A presses" are also no longer special values in the lines list, but are rather a field on the MessageLine object.
Diffstat (limited to 'res/scripts')
-rw-r--r-- | res/scripts/common.lua | 8 | ||||
-rw-r--r-- | res/scripts/script0001.lua | 10 |
2 files changed, 17 insertions, 1 deletions
diff --git a/res/scripts/common.lua b/res/scripts/common.lua index b540548..2023e63 100644 --- a/res/scripts/common.lua +++ b/res/scripts/common.lua | |||
@@ -36,6 +36,14 @@ function DisplayMessage(msg, name, type) | |||
36 | message():displayMessage(msg, name, type) | 36 | message():displayMessage(msg, name, type) |
37 | end | 37 | end |
38 | 38 | ||
39 | function ShowChoice(one, two) | ||
40 | message():showChoice(one, two) | ||
41 | end | ||
42 | |||
43 | function GetChoiceSelection() | ||
44 | return message():getChoiceSelection() | ||
45 | end | ||
46 | |||
39 | function WaitForEndOfMessage() | 47 | function WaitForEndOfMessage() |
40 | while (message().isMessageActive) do | 48 | while (message().isMessageActive) do |
41 | coroutine.yield() | 49 | coroutine.yield() |
diff --git a/res/scripts/script0001.lua b/res/scripts/script0001.lua index e5078f2..077e809 100644 --- a/res/scripts/script0001.lua +++ b/res/scripts/script0001.lua | |||
@@ -3,11 +3,19 @@ function script0001() | |||
3 | SetAnimation("boney", "barking") | 3 | SetAnimation("boney", "barking") |
4 | local barkingNoise = LoopSound("barking_at_hallucination.wav") | 4 | local barkingNoise = LoopSound("barking_at_hallucination.wav") |
5 | 5 | ||
6 | DisplayMessage("Lucas. It's me, Flint. Your father.\n\fI found Claus. He's here. After three years I've finally found your brother.\n\fLook at me when I'm talking to you, Lucas.\n\fWhen Claus gets home, we won't need you anymore.\nYou're nothing compared to him.", "Flint", SpeakerType.MAN) | 6 | DisplayMessage("Lucas. It's me, Flint. Your father.\n\fI found Claus. He's here. After three years I've finally found your brother.\n\fAre you ready to see him again?", "Flint", SpeakerType.MAN) |
7 | ShowChoice("Yes", "No") | ||
7 | WaitForEndOfMessage() | 8 | WaitForEndOfMessage() |
8 | 9 | ||
9 | SetAnimation("boney", "crouch") | 10 | SetAnimation("boney", "crouch") |
10 | StopSound(barkingNoise) | 11 | StopSound(barkingNoise) |
11 | PlaySound("boney_growl.wav") | 12 | PlaySound("boney_growl.wav") |
13 | |||
14 | if GetChoiceSelection() == 0 then | ||
15 | DisplayMessage("I can hear the tremor in your voice, Lucas.\n\fLies are little games a mouth plays while the person attached withers away slowly.\n\fClaus is coming, whether you like it or not.\nWill you be able to look him in the eye?", "Flint", SpeakerType.MAN) | ||
16 | else | ||
17 | DisplayMessage("Look at me when I'm talking to you, Lucas.\n\fWhen Claus gets home, we won't need you anymore.\nYou're nothing compared to him.", "Flint", SpeakerType.MAN) | ||
18 | end | ||
19 | |||
12 | HideCutsceneBars() | 20 | HideCutsceneBars() |
13 | end | 21 | end |