summary refs log tree commit diff stats
path: root/res/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'res/scripts')
-rw-r--r--res/scripts/hallucination_cliff.lua107
1 files changed, 106 insertions, 1 deletions
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()
203 WaitForPan() 203 WaitForPan()
204 Delay(2000) 204 Delay(2000)
205 205
206 MakeSpriteNotSolid("hinawa")
207 UnpauseSprite("hinawa") 206 UnpauseSprite("hinawa")
208 DirectSpriteToLocation("hinawa", "hinawa_offscreen_first", PathfindingOptions.CARDINAL_DIRECTIONS_ONLY) 207 DirectSpriteToLocation("hinawa", "hinawa_offscreen_first", PathfindingOptions.CARDINAL_DIRECTIONS_ONLY)
209 WaitForSpritePath("hinawa") 208 WaitForSpritePath("hinawa")
@@ -220,3 +219,109 @@ function hallucination_cliff.see_hinawa_first_event()
220 219
221 HideCutsceneBars(CutsceneOptions.DO_NOT_CHANGE_ANIMATION) 220 HideCutsceneBars(CutsceneOptions.DO_NOT_CHANGE_ANIMATION)
222end 221end
222
223function hallucination_cliff.see_hinawa_second_event()
224 -- only trigger this scene if the first half of the scene has occured and the
225 -- event hasn't been disabled.
226 if not (gamestate.hinawa_can_appear and gamestate.saw_hinawa_first_scene) then
227 return
228 end
229
230 -- do not trigger a second time.
231 if gamestate.saw_hinawa_second_scene then
232 return
233 end
234
235 gamestate.saw_hinawa_second_scene = true
236
237 -- automatically move lucas forward enough that he is no longer on the ladder.
238 DisablePlayerControl()
239 Halt("lucas")
240 DirectSpriteToLocation("lucas", "second_hinawa_vantage", PathfindingOptions.CARDINAL_DIRECTIONS_ONLY)
241 WaitForSpritePath("lucas")
242 DisableBehaviour("lucas")
243
244 StartCutscene(CutsceneOptions.DO_NOT_CHANGE_ANIMATION)
245 Delay(1000)
246
247 -- we need to do this because a lot of pathfinding is going to fire off almost
248 -- at the same time, and while the paths the characters take should not
249 -- actually intersect, the pathfinding is done with only their starting
250 -- positions in mind.
251 MakeSpriteNotSolid("hinawa")
252 MakeSpriteNotSolid("lucas")
253 MakeSpriteNotSolid("kuma")
254 MakeSpriteNotSolid("duster")
255 MakeSpriteNotSolid("boney")
256
257 -- hinawa walks to the left, then turns to look at lucas.
258 UnpauseSprite("hinawa")
259 DirectSpriteToLocation("hinawa", "hinawa_mid_checkpoint", PathfindingOptions.CARDINAL_DIRECTIONS_ONLY)
260 WaitForSpritePath("hinawa")
261 DisableBehaviour("hinawa")
262 Delay(1500)
263
264 SetDirection("hinawa", Direction.DOWN_LEFT)
265 Delay(100)
266 SetDirection("hinawa", Direction.DOWN)
267 Delay(100)
268 SetDirection("hinawa", Direction.DOWN_RIGHT)
269 Delay(2000)
270 SetDirection("hinawa", Direction.RIGHT)
271 Delay(250)
272
273 -- hinawa then walks off the cliff.
274 DirectSpriteToLocation("hinawa", "hinawa_off_cliff", PathfindingOptions.CARDINAL_DIRECTIONS_ONLY | PathfindingOptions.MOONWALKING)
275 Delay(1000)
276
277 -- lucas walks after her, while the rest of the party gather a little behind
278 -- him. because of this, we need to break apart the party, since they are all
279 -- going to have independent walking patterns.
280 BreakUpParty("lucas")
281 UnpauseSprite("lucas")
282 SetMovementSpeed("lucas", 1)
283 DirectSpriteToLocation("lucas", "hinawa_mid_checkpoint")
284 Delay(1000)
285
286 UnpauseSprite("kuma")
287 UnpauseSprite("duster")
288 UnpauseSprite("boney")
289 SetMovementSpeed("kuma", 1)
290 SetMovementSpeed("duster", 1)
291 SetMovementSpeed("boney", 1)
292 DirectSpriteToLocation("kuma", "kuma_watch_point")
293 DirectSpriteToLocation("duster", "hinawa_second_position")
294 DirectSpriteToLocation("boney", "boney_watch_point")
295
296 WaitForSpritePath("hinawa")
297 DisableBehaviour("hinawa")
298 SetDirection("hinawa", Direction.RIGHT)
299
300 WaitForSpritePath("lucas")
301 DisableBehaviour("lucas")
302 SetDirection("lucas", Direction.LEFT)
303 SetAnimation("lucas", "frozen")
304
305 WaitForSpritePath("kuma")
306 DisableBehaviour("kuma")
307 SetDirection("kuma", Direction.LEFT)
308 SetAnimation("kuma", "frozen")
309
310 WaitForSpritePath("duster")
311 DisableBehaviour("duster")
312 SetDirection("duster", Direction.LEFT)
313 SetAnimation("duster", "frozen")
314
315 WaitForSpritePath("boney")
316 DisableBehaviour("boney")
317 SetDirection("boney", Direction.LEFT)
318 SetAnimation("boney", "frozen")
319
320 MakeSpriteSolid("hinawa")
321 MakeSpriteSolid("lucas")
322 MakeSpriteSolid("kuma")
323 MakeSpriteSolid("duster")
324 MakeSpriteSolid("boney")
325
326 -- TODO: rest of scene
327end