From 45f6bfffd8940cb71dbff8224566aa3292bbb98f Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Tue, 6 Jul 2021 14:08:48 -0400 Subject: More of Hinawa event This is the beginning of the second part, ending with Hinawa walking off the cliff, Kumatora/Duster/Boney bunched over on the right, and Lucas in the middle, where he'll have to decide who to go toward. #28 --- res/scripts/hallucination_cliff.lua | 107 +++++++++++++++++++++++++++++++++++- 1 file changed, 106 insertions(+), 1 deletion(-) (limited to 'res/scripts/hallucination_cliff.lua') diff --git a/res/scripts/hallucination_cliff.lua b/res/scripts/hallucination_cliff.lua index d539e62..51fa433 100644 --- a/res/scripts/hallucination_cliff.lua +++ b/res/scripts/hallucination_cliff.lua @@ -203,7 +203,6 @@ function hallucination_cliff.see_hinawa_first_event() WaitForPan() Delay(2000) - MakeSpriteNotSolid("hinawa") UnpauseSprite("hinawa") DirectSpriteToLocation("hinawa", "hinawa_offscreen_first", PathfindingOptions.CARDINAL_DIRECTIONS_ONLY) WaitForSpritePath("hinawa") @@ -220,3 +219,109 @@ function hallucination_cliff.see_hinawa_first_event() HideCutsceneBars(CutsceneOptions.DO_NOT_CHANGE_ANIMATION) end + +function hallucination_cliff.see_hinawa_second_event() + -- only trigger this scene if the first half of the scene has occured and the + -- event hasn't been disabled. + if not (gamestate.hinawa_can_appear and gamestate.saw_hinawa_first_scene) then + return + end + + -- do not trigger a second time. + if gamestate.saw_hinawa_second_scene then + return + end + + gamestate.saw_hinawa_second_scene = true + + -- automatically move lucas forward enough that he is no longer on the ladder. + DisablePlayerControl() + Halt("lucas") + DirectSpriteToLocation("lucas", "second_hinawa_vantage", PathfindingOptions.CARDINAL_DIRECTIONS_ONLY) + WaitForSpritePath("lucas") + DisableBehaviour("lucas") + + StartCutscene(CutsceneOptions.DO_NOT_CHANGE_ANIMATION) + Delay(1000) + + -- we need to do this because a lot of pathfinding is going to fire off almost + -- at the same time, and while the paths the characters take should not + -- actually intersect, the pathfinding is done with only their starting + -- positions in mind. + MakeSpriteNotSolid("hinawa") + MakeSpriteNotSolid("lucas") + MakeSpriteNotSolid("kuma") + MakeSpriteNotSolid("duster") + MakeSpriteNotSolid("boney") + + -- hinawa walks to the left, then turns to look at lucas. + UnpauseSprite("hinawa") + DirectSpriteToLocation("hinawa", "hinawa_mid_checkpoint", PathfindingOptions.CARDINAL_DIRECTIONS_ONLY) + WaitForSpritePath("hinawa") + DisableBehaviour("hinawa") + Delay(1500) + + SetDirection("hinawa", Direction.DOWN_LEFT) + Delay(100) + SetDirection("hinawa", Direction.DOWN) + Delay(100) + SetDirection("hinawa", Direction.DOWN_RIGHT) + Delay(2000) + SetDirection("hinawa", Direction.RIGHT) + Delay(250) + + -- hinawa then walks off the cliff. + DirectSpriteToLocation("hinawa", "hinawa_off_cliff", PathfindingOptions.CARDINAL_DIRECTIONS_ONLY | PathfindingOptions.MOONWALKING) + Delay(1000) + + -- lucas walks after her, while the rest of the party gather a little behind + -- him. because of this, we need to break apart the party, since they are all + -- going to have independent walking patterns. + BreakUpParty("lucas") + UnpauseSprite("lucas") + SetMovementSpeed("lucas", 1) + DirectSpriteToLocation("lucas", "hinawa_mid_checkpoint") + Delay(1000) + + UnpauseSprite("kuma") + UnpauseSprite("duster") + UnpauseSprite("boney") + SetMovementSpeed("kuma", 1) + SetMovementSpeed("duster", 1) + SetMovementSpeed("boney", 1) + DirectSpriteToLocation("kuma", "kuma_watch_point") + DirectSpriteToLocation("duster", "hinawa_second_position") + DirectSpriteToLocation("boney", "boney_watch_point") + + WaitForSpritePath("hinawa") + DisableBehaviour("hinawa") + SetDirection("hinawa", Direction.RIGHT) + + WaitForSpritePath("lucas") + DisableBehaviour("lucas") + SetDirection("lucas", Direction.LEFT) + SetAnimation("lucas", "frozen") + + WaitForSpritePath("kuma") + DisableBehaviour("kuma") + SetDirection("kuma", Direction.LEFT) + SetAnimation("kuma", "frozen") + + WaitForSpritePath("duster") + DisableBehaviour("duster") + SetDirection("duster", Direction.LEFT) + SetAnimation("duster", "frozen") + + WaitForSpritePath("boney") + DisableBehaviour("boney") + SetDirection("boney", Direction.LEFT) + SetAnimation("boney", "frozen") + + MakeSpriteSolid("hinawa") + MakeSpriteSolid("lucas") + MakeSpriteSolid("kuma") + MakeSpriteSolid("duster") + MakeSpriteSolid("boney") + + -- TODO: rest of scene +end -- cgit 1.4.1