summary refs log tree commit diff stats
path: root/res
diff options
context:
space:
mode:
Diffstat (limited to 'res')
-rw-r--r--res/scripts/common.lua15
-rw-r--r--res/scripts/hallucination_interior.lua18
2 files changed, 32 insertions, 1 deletions
diff --git a/res/scripts/common.lua b/res/scripts/common.lua index f984667..dbc021c 100644 --- a/res/scripts/common.lua +++ b/res/scripts/common.lua
@@ -518,6 +518,21 @@ function FaceTowardSprite(spriteName, targetName)
518 SetDirection(spriteName, dir) 518 SetDirection(spriteName, dir)
519end 519end
520 520
521--- Makes the specified sprite's entire party face toward the †arget sprite.
522-- This version of the function uses any of the eight directions.
523-- @param spriteName the name of the sprite to change the direction of
524-- @param targetName the name of the sprite to face toward
525function FacePartyTowardSprite(spriteName, targetName)
526 FaceTowardSprite(spriteName, targetName)
527
528 local sprite = getSprite(getSpriteByAlias(spriteName))
529
530 for i=1,#sprite.followers do
531 local follower = getSprite(sprite.followers[i])
532 FaceTowardSprite(follower.alias, targetName)
533 end
534end
535
521--- Makes the specified sprite face toward the †arget sprite. 536--- Makes the specified sprite face toward the †arget sprite.
522-- This version of the function uses the closest cardinal direction. 537-- This version of the function uses the closest cardinal direction.
523-- @param spriteName the name of the sprite to change the direction of 538-- @param spriteName the name of the sprite to change the direction of
diff --git a/res/scripts/hallucination_interior.lua b/res/scripts/hallucination_interior.lua index 0622453..96b90a6 100644 --- a/res/scripts/hallucination_interior.lua +++ b/res/scripts/hallucination_interior.lua
@@ -268,5 +268,21 @@ function hallucination_interior.switch_claus_lose_interest()
268end 268end
269 269
270function hallucination_interior.lets_switch_places() 270function hallucination_interior.lets_switch_places()
271 -- TODO: let's switch places 271 StartCutscene()
272
273 FacePartyTowardSprite("lucas", "switch_claus")
274 Halt("switch_claus")
275 SetAnimation("switch_claus", "talk")
276
277 DisplayMessage("* Let's switch places.\n\f* Let's switch places.\n\f* Lucas. Lucas\nLet's switch places.", "Claus", SpeakerType.MAN)
278 ShowChoice("Yes", "No")
279 WaitForEndOfMessage()
280
281 if GetChoiceSelection() == 0 then
282 DisplayMessage("* You'd like that, wouldn't you?\n\f* ...no. That's too easy.\n\fI'm not letting you off that easy.\n\f* It should've been you, right?\nYou feel guilty, right?\n\f* Well guess what, Lucas?\n\fYou're going to live with that for the rest of your life.\n\f* You know why?\n\f* Because you're going to live, Lucas!\n\fYOU'RE. GOING. TO. LIVE!", "Claus", SpeakerType.MAN)
283 SetAnimation("switch_claus", "still")
284 HideCutsceneBars()
285 else
286 -- TODO: let's switch places
287 end
272end 288end