From 032f60bc2686364f4df5bfb6c9faf86b84de31a6 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Tue, 9 Mar 2021 13:31:26 -0500 Subject: Added text for "yes" path of "let's switch places" #10 --- res/scripts/common.lua | 15 +++++++++++++++ res/scripts/hallucination_interior.lua | 18 +++++++++++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) (limited to 'res/scripts') diff --git a/res/scripts/common.lua b/res/scripts/common.lua index f984667..dbc021c 100644 --- a/res/scripts/common.lua +++ b/res/scripts/common.lua @@ -518,6 +518,21 @@ function FaceTowardSprite(spriteName, targetName) SetDirection(spriteName, dir) end +--- Makes the specified sprite's entire party face toward the †arget sprite. +-- This version of the function uses any of the eight directions. +-- @param spriteName the name of the sprite to change the direction of +-- @param targetName the name of the sprite to face toward +function FacePartyTowardSprite(spriteName, targetName) + FaceTowardSprite(spriteName, targetName) + + local sprite = getSprite(getSpriteByAlias(spriteName)) + + for i=1,#sprite.followers do + local follower = getSprite(sprite.followers[i]) + FaceTowardSprite(follower.alias, targetName) + end +end + --- Makes the specified sprite face toward the †arget sprite. -- This version of the function uses the closest cardinal direction. -- @param spriteName the name of the sprite to change the direction of diff --git a/res/scripts/hallucination_interior.lua b/res/scripts/hallucination_interior.lua index 0622453..96b90a6 100644 --- a/res/scripts/hallucination_interior.lua +++ b/res/scripts/hallucination_interior.lua @@ -268,5 +268,21 @@ function hallucination_interior.switch_claus_lose_interest() end function hallucination_interior.lets_switch_places() - -- TODO: let's switch places + StartCutscene() + + FacePartyTowardSprite("lucas", "switch_claus") + Halt("switch_claus") + SetAnimation("switch_claus", "talk") + + DisplayMessage("* Let's switch places.\n\f* Let's switch places.\n\f* Lucas. Lucas\nLet's switch places.", "Claus", SpeakerType.MAN) + ShowChoice("Yes", "No") + WaitForEndOfMessage() + + if GetChoiceSelection() == 0 then + DisplayMessage("* You'd like that, wouldn't you?\n\f* ...no. That's too easy.\n\fI'm not letting you off that easy.\n\f* It should've been you, right?\nYou feel guilty, right?\n\f* Well guess what, Lucas?\n\fYou're going to live with that for the rest of your life.\n\f* You know why?\n\f* Because you're going to live, Lucas!\n\fYOU'RE. GOING. TO. LIVE!", "Claus", SpeakerType.MAN) + SetAnimation("switch_claus", "still") + HideCutsceneBars() + else + -- TODO: let's switch places + end end -- cgit 1.4.1