diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2021-03-09 11:51:34 -0500 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2021-03-09 11:51:34 -0500 |
commit | 89fc2da3f08fcd751ca069fde0987d193e59b007 (patch) | |
tree | 09d9f8c7fc44a72f3fa7677048a127286ac850a5 /res/scripts/hallucination_interior.lua | |
parent | dd052d68e95f5b2128da272127e165c4a70f3f94 (diff) | |
download | tanetane-89fc2da3f08fcd751ca069fde0987d193e59b007.tar.gz tanetane-89fc2da3f08fcd751ca069fde0987d193e59b007.tar.bz2 tanetane-89fc2da3f08fcd751ca069fde0987d193e59b007.zip |
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
Diffstat (limited to 'res/scripts/hallucination_interior.lua')
-rw-r--r-- | res/scripts/hallucination_interior.lua | 44 |
1 files changed, 44 insertions, 0 deletions
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() | |||
226 | 226 | ||
227 | EnablePlayerControl() | 227 | EnablePlayerControl() |
228 | end | 228 | end |
229 | |||
230 | function hallucination_interior.switch_claus_attention() | ||
231 | gamestate.switch_claus_lost_interest = false | ||
232 | |||
233 | Halt("switch_claus") | ||
234 | DisableBehaviour("switch_claus") | ||
235 | ShowExpression("switch_claus", "surprise") | ||
236 | FaceTowardSprite("switch_claus", "lucas") | ||
237 | Delay(1000) | ||
238 | |||
239 | RemoveExpression("switch_claus") | ||
240 | |||
241 | if gamestate.switch_claus_lost_interest then | ||
242 | SetMovementSpeed("switch_claus", 1) | ||
243 | StartWandering("switch_claus") | ||
244 | else | ||
245 | SetMovementSpeed("switch_claus", 2) | ||
246 | |||
247 | if IsSpriteInZone("switch_claus", "switch_claus_hidden") then | ||
248 | MakeSpriteNotSolid("lucas") | ||
249 | DirectSpriteToLocation("switch_claus", "switch_claus_rsvp") | ||
250 | MakeSpriteSolid("lucas") | ||
251 | WaitForSpritePath("switch_claus") | ||
252 | end | ||
253 | |||
254 | if gamestate.switch_claus_lost_interest then | ||
255 | SetMovementSpeed("switch_claus", 1) | ||
256 | StartWandering("switch_claus") | ||
257 | else | ||
258 | FollowSprite("switch_claus", "lucas") | ||
259 | end | ||
260 | end | ||
261 | end | ||
262 | |||
263 | function hallucination_interior.switch_claus_lose_interest() | ||
264 | gamestate.switch_claus_lost_interest = true | ||
265 | |||
266 | SetMovementSpeed("switch_claus", 1) | ||
267 | StartWandering("switch_claus") | ||
268 | end | ||
269 | |||
270 | function hallucination_interior.lets_switch_places() | ||
271 | -- TODO: let's switch places | ||
272 | end | ||