hallucination_cliff = {} function hallucination_cliff.off_bottom() ChangeMap("hallucination_interior", "fromTop") end function hallucination_cliff.off_left() ChangeMap("hallucination_hot_spring", "fromRight") end function hallucination_cliff.enter_door() CreateAnimatedSpriteAtWarpPoint("entryway", "entryway", "entryway_appear", "pink_shell", Direction.DOWN, SpriteLayer.NORMAL) PlaySound("door_open.wav") ChangeMap("pink_shell", "fromOutside") end function hallucination_cliff.talk_to_nana() if not gamestate.talked_to_nana_times then gamestate.talked_to_nana_times = 0 end StartCutscene() if gamestate.talked_to_nana_times == 0 then SetAnimation("nana", "talk") DisplayMessage("* Don't talk to me.", "Nana", SpeakerType.WOMAN) elseif gamestate.talked_to_nana_times == 1 then SetAnimation("nana", "talk") DisplayMessage("* Go bother someone else.", "Nana", SpeakerType.WOMAN) elseif gamestate.talked_to_nana_times == 2 then SetAnimation("nana", "talk") DisplayMessage("* I only talked to you out of pity.", "Nana", SpeakerType.WOMAN) elseif gamestate.talked_to_nana_times >= 3 and gamestate.talked_to_nana_times < 6 then DisplayMessage("* ...", "Nana", SpeakerType.WOMAN) elseif gamestate.talked_to_nana_times >= 6 then SetAnimation("nana", "talk") DisplayMessage("* Shut up shut up shut up!\n\f* Can't you take a hint, you stupid boy?", "Nana", SpeakerType.WOMAN) end WaitForEndOfMessage() gamestate.talked_to_nana_times = gamestate.talked_to_nana_times + 1 SetAnimation("nana", "still") SetDirection("nana", Direction.RIGHT) HideCutsceneBars() end function hallucination_cliff.claus_fall_event() -- do not trigger if we don't have claus if not gamestate.still_has_claus then return end -- do not trigger a second time if gamestate.claus_fall_scene then return end gamestate.claus_fall_scene = true -- have the player automatically climb most of the ladder. this is to ensure -- that Claus is off screen when the event triggers. DisablePlayerControl() Halt("lucas") DirectSpriteToLocation("lucas", "near_top_first_ladder", PathfindingOptions.CARDINAL_DIRECTIONS_ONLY) WaitForSpritePath("lucas") DisableBehaviour("lucas") StartCutscene(CutsceneOptions.DO_NOT_CHANGE_ANIMATION) DisplayMessage("* Aiee!", "Claus", SpeakerType.MAN) PlaySound("wobble_and_fall.wav") WaitForEndOfMessage() Delay(1000) PlaySound("thud.wav") ShakeCamera(100) Delay(50) ShowExpression("lucas", "surprise") Delay(50) ShowExpression("kuma", "surprise") ShowExpression("duster", "surprise") Delay(100) StopShakingCamera() Delay(1000) MoveSpriteToWarp("join_claus", "claus_fall_location") SetDirection("join_claus", Direction.LEFT) SetAnimation("join_claus", "collapsed") PanToSprite("join_claus", 4000) Delay(1000) RemoveExpression("lucas") RemoveExpression("kuma") RemoveExpression("duster") WaitForPan() Delay(1000) -- we need to break up the party to detach Claus anyway, and while we're there -- we should turn down the movement speed because the pathfinding algorithm -- doesn't take media into consideration, and if we don't change the speed -- before adding the other characters back, they'll bunch up as they move down BreakUpParty("lucas") SetMovementSpeed("lucas", 1) character():addSpriteToParty(getPlayerSprite(), getSpriteByAlias("kuma")) character():addSpriteToParty(getPlayerSprite(), getSpriteByAlias("duster")) character():addSpriteToParty(getPlayerSprite(), getSpriteByAlias("boney")) UnpauseSprite("lucas") DirectSpriteToLocation("lucas", "near_bottom_first_ladder", PathfindingOptions.CARDINAL_DIRECTIONS_ONLY) WaitForSpritePath("lucas") DisableBehaviour("lucas") PauseSprite("lucas") SetAnimation("lucas", "frozen") -- so he doesn't blink Delay(1000) DisplayMessage("* Lucas, you shouldn't have let me fall!\n\f* It's your fault I got hurt!\n\f* I can't get up...", "Claus", SpeakerType.MAN) WaitForEndOfMessage() DisplayMessage("* Help him up?", "", SpeakerType.NONE) ShowChoice("Yes", "No") WaitForEndOfMessage() -- TODO: rest of scene -- same as before but less justifiable because the only reason we're doing -- this is to fix the movement trails -- BreakUpParty("lucas") -- SetMovementSpeed("lucas", 2) -- character():addSpriteToParty(getPlayerSprite(), getSpriteByAlias("kuma")) -- character():addSpriteToParty(getPlayerSprite(), getSpriteByAlias("duster")) -- character():addSpriteToParty(getPlayerSprite(), getSpriteByAlias("boney")) end