From a8983e9302ac5aae00c653afae034d6d003805bc Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Wed, 17 Mar 2021 14:27:47 -0400 Subject: [switch route] Started working on switching scene #10 --- res/scripts/hallucination_interior.lua | 84 ++++++++++++++++++++++++++++++++-- res/scripts/switched_interior.lua | 1 + 2 files changed, 81 insertions(+), 4 deletions(-) create mode 100644 res/scripts/switched_interior.lua (limited to 'res/scripts') diff --git a/res/scripts/hallucination_interior.lua b/res/scripts/hallucination_interior.lua index dafe1fc..6679bab 100644 --- a/res/scripts/hallucination_interior.lua +++ b/res/scripts/hallucination_interior.lua @@ -25,7 +25,7 @@ function hallucination_interior.talk_to_magic() SetMovementSpeed("magic_dcmc", 1) DirectSpriteToLocation("magic_dcmc", "magic_walkaway", PathfindingOptions.CARDINAL_DIRECTIONS_ONLY) WaitForSpritePath("magic_dcmc") - + DisableSprite() HideCutsceneBars() @@ -263,6 +263,10 @@ function hallucination_interior.switch_claus_attention() RemoveExpression("switch_claus") + if gamestate.switch_claus_map_change then + return + end + if gamestate.switch_claus_lost_interest then SetMovementSpeed("switch_claus", 1) StartWandering("switch_claus") @@ -276,6 +280,10 @@ function hallucination_interior.switch_claus_attention() WaitForSpritePath("switch_claus") end + if gamestate.switch_claus_map_change then + return + end + if gamestate.switch_claus_lost_interest then SetMovementSpeed("switch_claus", 1) StartWandering("switch_claus") @@ -314,6 +322,9 @@ function hallucination_interior.lets_switch_places() HideCutsceneBars() SetAnimation("switch_claus", "still") + + -- Just so we can get away, for now. + hallucination_interior.switch_claus_lose_interest() else DisplayMessage("* Huh? Why not?\n\f* You say I'm not real? I'm not Claus?\n\f* Oh, Lucas...", "Claus", SpeakerType.MAN) WaitForEndOfMessage() @@ -330,8 +341,73 @@ function hallucination_interior.lets_switch_places() WaitForEndOfMessage() -- TODO: let's switch places - end + ShakeCamera(100) + Delay(50) + + gamestate.switch_claus_map_change = true + + FadeToBlack(1) + ReturnCamera(1) + ChangeMap("switched_interior", "lucas_start", ChangeMapOptions.DO_NOT_FADE | ChangeMapOptions.DO_NOT_CHANGE_MUSIC) + DisablePlayerControl() + BreakUpParty("lucas") + MoveSpriteToWarp("kuma", "kuma_start") + MoveSpriteToWarp("duster", "duster_start") + MoveSpriteToWarp("boney", "boney_start") + SetDirection("lucas", Direction.RIGHT) + SetDirection("switch_claus", Direction.LEFT) + SetDirection("kuma", Direction.UP) + SetDirection("duster", Direction.UP) + SetDirection("boney", Direction.UP) + SetAnimation("lucas", "frozen") + SetAnimation("switch_claus", "frozen") + SetAnimation("kuma", "frozen") + SetAnimation("duster", "frozen") + SetAnimation("boney", "frozen") + FadeMap(1, 0.0) + StopShakingCamera() + RemoveFadeout(1) + Delay(1000) + + SetAnimation("switch_claus", "talk") + DisplayMessage("* Look how much this is getting to you!\n\f* That's the thing about you.\nYou feel too much!\n\f* You think you're so strong but you're nothing like me.", "Claus", SpeakerType.MAN) + WaitForEndOfMessage() + + SetAnimation("switch_claus", "frozen") + ShowExpression("kuma", "surprise") + Delay(500) + + SetAnimation("kuma", "talk") + DisplayMessage("* What are we doing just standing around listening to smack talk from a nightmare?", "Kumatora", SpeakerType.WOMAN) + Delay(250) - -- Just so we can get away, for now. - hallucination_interior.switch_claus_lose_interest() + RemoveExpression("kuma") + WaitForEndOfMessage() + + SetAnimation("kuma", "frozen") + SetAnimation("duster", "talk") + DisplayMessage("* It's not fair that the forest is doing this to you.\n\f* We'll get through this together, I promise.", "Duster", SpeakerType.MAN) + WaitForEndOfMessage() + + SetAnimation("duster", "frozen") + Delay(2000) + + SetAnimation("switch_claus", "talk") + DisplayMessage("* I'm going away now.\n\f* I hope you're happy.", "Claus", SpeakerType.MAN) + WaitForEndOfMessage() + + SetAnimation("switch_claus", "frozen") + Delay(1000) + + SetMovementSpeed("switch_claus", 1) + + local switchClausId = getSpriteByAlias("switch_claus") + character():addSpriteToParty(switchClausId, getSpriteByAlias("kuma")) + character():addSpriteToParty(switchClausId, getSpriteByAlias("duster")) + character():addSpriteToParty(switchClausId, getSpriteByAlias("boney")) + + UnpauseSprite("switch_claus") + DirectSpriteToLocation("switch_claus", "out_of_sight", PathfindingOptions.CARDINAL_DIRECTIONS_ONLY) + WaitForSpritePath("switch_claus") + end end diff --git a/res/scripts/switched_interior.lua b/res/scripts/switched_interior.lua new file mode 100644 index 0000000..3967515 --- /dev/null +++ b/res/scripts/switched_interior.lua @@ -0,0 +1 @@ +switched_interior = {} -- cgit 1.4.1