From 89fc2da3f08fcd751ca069fde0987d193e59b007 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Tue, 9 Mar 2021 11:51:34 -0500 Subject: Added "let's switch places!" Claus sprite He will wander randomly until you get close, and will then run at you. Talking to him or bumping into him does nothing currently. If you move out of his range of interest he will go back to wandering at a walking pace. #10 --- res/scripts/hallucination_interior.lua | 44 ++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) (limited to 'res/scripts/hallucination_interior.lua') diff --git a/res/scripts/hallucination_interior.lua b/res/scripts/hallucination_interior.lua index f009196..0622453 100644 --- a/res/scripts/hallucination_interior.lua +++ b/res/scripts/hallucination_interior.lua @@ -226,3 +226,47 @@ function hallucination_interior.mailbox_time_passage() EnablePlayerControl() end + +function hallucination_interior.switch_claus_attention() + gamestate.switch_claus_lost_interest = false + + Halt("switch_claus") + DisableBehaviour("switch_claus") + ShowExpression("switch_claus", "surprise") + FaceTowardSprite("switch_claus", "lucas") + Delay(1000) + + RemoveExpression("switch_claus") + + if gamestate.switch_claus_lost_interest then + SetMovementSpeed("switch_claus", 1) + StartWandering("switch_claus") + else + SetMovementSpeed("switch_claus", 2) + + if IsSpriteInZone("switch_claus", "switch_claus_hidden") then + MakeSpriteNotSolid("lucas") + DirectSpriteToLocation("switch_claus", "switch_claus_rsvp") + MakeSpriteSolid("lucas") + WaitForSpritePath("switch_claus") + end + + if gamestate.switch_claus_lost_interest then + SetMovementSpeed("switch_claus", 1) + StartWandering("switch_claus") + else + FollowSprite("switch_claus", "lucas") + end + end +end + +function hallucination_interior.switch_claus_lose_interest() + gamestate.switch_claus_lost_interest = true + + SetMovementSpeed("switch_claus", 1) + StartWandering("switch_claus") +end + +function hallucination_interior.lets_switch_places() + -- TODO: let's switch places +end -- cgit 1.4.1