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/maps/map2.tmx | 14 ++++++++++- res/scripts/map2.lua | 26 ++++++++++++++++++++ res/sprites/claus.png | Bin 0 -> 9024 bytes res/sprites/claus_anim.txt | 42 +++++++++++++++++++++++++++++++ res/sprites/claus_frames.txt | 57 +++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 138 insertions(+), 1 deletion(-) create mode 100644 res/sprites/claus.png create mode 100644 res/sprites/claus_anim.txt create mode 100644 res/sprites/claus_frames.txt (limited to 'res') diff --git a/res/maps/map2.tmx b/res/maps/map2.tmx index 1ea8c00..19d3727 100644 --- a/res/maps/map2.tmx +++ b/res/maps/map2.tmx @@ -1,5 +1,5 @@ - + @@ -676,6 +676,18 @@ + + + + + + + + + + + + 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) diff --git a/res/sprites/claus.png b/res/sprites/claus.png new file mode 100644 index 0000000..3e85a01 Binary files /dev/null and b/res/sprites/claus.png differ diff --git a/res/sprites/claus_anim.txt b/res/sprites/claus_anim.txt new file mode 100644 index 0000000..79cb64b --- /dev/null +++ b/res/sprites/claus_anim.txt @@ -0,0 +1,42 @@ +../res/sprites/claus.png +../res/sprites/claus_frames.txt +still[down]: 0 +still[down_left]: 1 +still[left]: 2 +still[up_left]: 3 +still[up]: 4 +still[up_right]: 5 +still[right]: 6 +still[down_right]: 7 +walk[down]: 8,0,16,0 +walk[down_left]: 9,1,17,1 +walk[left]: 10,2,18,2 +walk[up_left]: 11,3,19,3 +walk[up]: 12,4,20,4 +walk[up_right]: 13,5,21,5 +walk[right]: 14,6,22,6 +walk[down_right]: 15,7,23,7 +crouch[down]: 0 +crouch[down_left]: 1 +crouch[left]: 2 +crouch[up_left]: 3 +crouch[up]: 4 +crouch[up_right]: 5 +crouch[right]: 6 +crouch[down_right]: 7 +run[down]: 8,0,16,0 +run[down_left]: 9,1,17,1 +run[left]: 10,2,18,2 +run[up_left]: 11,3,19,3 +run[up]: 12,4,20,4 +run[up_right]: 13,5,21,5 +run[right]: 14,6,22,6 +run[down_right]: 15,7,23,7 +talk[down]: 24,0 +talk[down_left]: 25,1 +talk[left]: 26,2 +talk[up_left]: 27,3 +talk[up]: 28,4 +talk[up_right]: 29,5 +talk[right]: 30,6 +talk[down_right]: 31,7 \ No newline at end of file diff --git a/res/sprites/claus_frames.txt b/res/sprites/claus_frames.txt new file mode 100644 index 0000000..272ddc9 --- /dev/null +++ b/res/sprites/claus_frames.txt @@ -0,0 +1,57 @@ +17,32 cell size +10 frames per row +53 frames + +16,32,8,32 +16,32,8,32 +16,32,8,32 +16,32,8,32 +16,32,9,32 +16,32,9,32 +16,32,9,32 +16,32,9,32 +16,24,8,24 +16,24,8,24 +16,24,8,24 +16,24,8,24 +16,24,9,24 +16,24,9,24 +16,24,9,24 +16,24,9,24 +17,24,9,24 +16,24,8,24 +16,24,8,24 +16,24,8,24 +17,24,9,24 +16,24,9,24 +16,24,9,24 +16,24,9,24 +16,32,8,32 +16,32,8,32 +16,32,8,32 +16,32,8,32 +17,32,9,32 +16,32,9,32 +16,32,9,32 +16,32,9,32 +16,32,8,32 +16,24,8,24 +17,32,9,32 +17,24,9,24 +16,24,8,24 +16,24,8,24 +16,24,8,24 +16,24,8,24 +16,24,8,24 +16,24,8,24 +16,24,8,24 +16,24,8,24 +16,24,9,24 +16,24,9,24 +16,24,9,24 +16,24,9,24 +16,24,9,24 +16,24,9,24 +16,24,9,24 +16,24,9,24 +16,24,9,24 -- cgit 1.4.1