From c1a62ba1459cf849b5ee965aa461e10695bb0b01 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Thu, 18 Feb 2021 12:32:53 -0500 Subject: Started adding event where Claus joins the party --- res/scripts/map2.lua | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'res/scripts') diff --git a/res/scripts/map2.lua b/res/scripts/map2.lua index 295a0c1..3c3a5d9 100644 --- a/res/scripts/map2.lua +++ b/res/scripts/map2.lua @@ -24,6 +24,32 @@ function map2.mailbox1() HideCutsceneBars() end +function map2.join_claus() + StartCutscene() + SetAnimation("join_claus", "talk") + DisplayMessage("* Say, Lucas. Whatcha up to?\n\f* It looks so fun! Let me join you!", "Claus", SpeakerType.MAN) + ShowChoice("Yes", "No") + WaitForEndOfMessage() + + if GetChoiceSelection() == 0 then + DisplayMessage("* Yes!\n\f* Okay, then I'll be at the very end!\n* Thanks!", "Claus", SpeakerType.MAN) + WaitForEndOfMessage() + + local clausId = getSpriteByAlias("join_claus") + character():addSpriteToParty(getPlayerSprite(), clausId) + transform():undoCollision(clausId) + + local clausSprite = getSprite(clausId) + clausSprite.persistent = true + else + DisplayMessage("* You won't let me join in?\nWhy not? Why not?\n\f* Why won't you let me join in?", "Claus", SpeakerType.MAN) + WaitForEndOfMessage() + end + + SetAnimation("join_claus", "still") + HideCutsceneBars() +end + function map2.mailbox_lightning() StartCutscene() DisplayMessage("* The mailbox lid is open...\n* Peek inside?", "", SpeakerType.NONE) -- cgit 1.4.1