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/common.lua23
-rw-r--r--res/scripts/map2.lua19
2 files changed, 41 insertions, 1 deletions
diff --git a/res/scripts/common.lua b/res/scripts/common.lua index caab86a..f88c4c1 100644 --- a/res/scripts/common.lua +++ b/res/scripts/common.lua
@@ -141,6 +141,29 @@ function StopShakingCamera()
141 effect():stopShakingCamera() 141 effect():stopShakingCamera()
142end 142end
143 143
144function PanToSprite(spriteName, length)
145 local spriteId = getSpriteByAlias(spriteName)
146 camera():panToSprite(spriteId, length)
147end
148
149function WaitForPan()
150 while camera():isPanning() do
151 coroutine.yield()
152 end
153end
154
155function ReturnCamera(length)
156 local playerId = getPlayerSprite()
157 camera():panToSprite(playerId, length)
158
159 while camera():isPanning() do
160 coroutine.yield()
161 end
162
163 camera():setFollowingSprite(playerId)
164 camera():unlockCamera()
165end
166
144function SetPartyDirection(spriteId, direction) 167function SetPartyDirection(spriteId, direction)
145 animation():setSpriteDirection(spriteId, direction) 168 animation():setSpriteDirection(spriteId, direction)
146 169
diff --git a/res/scripts/map2.lua b/res/scripts/map2.lua index 92c1747..c929e8d 100644 --- a/res/scripts/map2.lua +++ b/res/scripts/map2.lua
@@ -74,9 +74,26 @@ function map2.approach_doria()
74 gamestate.approached_doria = true 74 gamestate.approached_doria = true
75 75
76 StartCutscene() 76 StartCutscene()
77 PanToSprite("doria", 2000)
78 WaitForPan()
79
77 SetDirection("doria", Direction.DOWN_RIGHT) 80 SetDirection("doria", Direction.DOWN_RIGHT)
78 SetAnimation("doria", "talk") 81 SetAnimation("doria", "talk")
79 DisplayMessage("* Oh my!\n* Is that our little Kumatora I spy? `\n* Such style! Such swagger!\nWhy, just as if she were Magifolk herself! `\n* When Ionia showed us the human she was looking after, I hardly knew what to think.", "Doria", SpeakerType.MAN) 82 DisplayMessage("* Oh my!\n\f* Is that our little Kumatora I spy? `", "Doria", SpeakerType.MAN)
83 WaitForEndOfMessage()
84
85 SetAnimation("doria", "still")
86 ReturnCamera(2000)
87 Delay(1000)
88 SetAnimation("kuma", "talk")
89 DisplayMessage("* Doria...?\n\f* What the hell... You're still alive?", "Kumatora", SpeakerType.WOMAN)
90 WaitForEndOfMessage()
91
92 SetAnimation("kuma", "still")
93 Delay(1000)
94
95 SetAnimation("doria", "talk")
96 DisplayMessage("* It is! It is her!\n\f* Such style! Such swagger!\nWhy, just as if she were Magifolk herself! `\n* When Ionia showed us the human she was looking after, I hardly knew what to think.", "Doria", SpeakerType.MAN)
80 WaitForEndOfMessage() 97 WaitForEndOfMessage()
81 98
82 SetDirection("doria", Direction.DOWN) 99 SetDirection("doria", Direction.DOWN)