From ec511705ce96d80d4e2a36054769c211448e8ec8 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Thu, 11 Feb 2021 20:47:46 -0500 Subject: Added choice prompts "A presses" are also no longer special values in the lines list, but are rather a field on the MessageLine object. --- res/scripts/common.lua | 8 ++++++++ res/scripts/script0001.lua | 10 +++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) (limited to 'res/scripts') 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) message():displayMessage(msg, name, type) end +function ShowChoice(one, two) + message():showChoice(one, two) +end + +function GetChoiceSelection() + return message():getChoiceSelection() +end + function WaitForEndOfMessage() while (message().isMessageActive) do 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() SetAnimation("boney", "barking") local barkingNoise = LoopSound("barking_at_hallucination.wav") - 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) + 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) + ShowChoice("Yes", "No") WaitForEndOfMessage() SetAnimation("boney", "crouch") StopSound(barkingNoise) PlaySound("boney_growl.wav") + + if GetChoiceSelection() == 0 then + 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) + else + 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) + end + HideCutsceneBars() end -- cgit 1.4.1