diff options
Diffstat (limited to 'res/scripts')
-rw-r--r-- | res/scripts/common.lua | 18 | ||||
-rw-r--r-- | res/scripts/map2.lua | 27 |
2 files changed, 45 insertions, 0 deletions
diff --git a/res/scripts/common.lua b/res/scripts/common.lua index f88c4c1..8a9445b 100644 --- a/res/scripts/common.lua +++ b/res/scripts/common.lua | |||
@@ -207,3 +207,21 @@ function DestroyNamedSprite(alias) | |||
207 | local spriteId = getSpriteByAlias(alias) | 207 | local spriteId = getSpriteByAlias(alias) |
208 | destroySprite(spriteId) | 208 | destroySprite(spriteId) |
209 | end | 209 | end |
210 | |||
211 | function AliasForSpriteExpression(spriteName) | ||
212 | return "expression (" .. spriteName .. ")" | ||
213 | end | ||
214 | |||
215 | function ShowExpression(spriteName, expression) | ||
216 | local spriteId = getSpriteByAlias(spriteName) | ||
217 | local sprite = getSprite(spriteId) | ||
218 | local animFrame = sprite:getCurrentFrame() | ||
219 | local x = sprite.loc:x() | ||
220 | local y = sprite.loc:y() - animFrame.center:y() | ||
221 | |||
222 | CreateAnimatedSpriteAtPosition(AliasForSpriteExpression(spriteName), "expression", x, y, expression, Direction.DOWN, SpriteLayer.ABOVE) | ||
223 | end | ||
224 | |||
225 | function RemoveExpression(spriteName) | ||
226 | DestroyNamedSprite(AliasForSpriteExpression(spriteName)) | ||
227 | end | ||
diff --git a/res/scripts/map2.lua b/res/scripts/map2.lua index c929e8d..295a0c1 100644 --- a/res/scripts/map2.lua +++ b/res/scripts/map2.lua | |||
@@ -74,12 +74,36 @@ function map2.approach_doria() | |||
74 | gamestate.approached_doria = true | 74 | gamestate.approached_doria = true |
75 | 75 | ||
76 | StartCutscene() | 76 | StartCutscene() |
77 | SetDirection("boney", Direction.LEFT) | ||
78 | SetAnimation("boney", "barking") | ||
79 | local barkingNoise = LoopSound("barking_at_hallucination.wav") | ||
80 | Delay(200) | ||
81 | |||
82 | ShowExpression("lucas", "surprise") | ||
83 | SetDirection("lucas", Direction.LEFT) | ||
84 | Delay(100) | ||
85 | |||
86 | ShowExpression("kuma", "surprise") | ||
87 | ShowExpression("duster", "surprise") | ||
88 | SetDirection("kuma", Direction.LEFT) | ||
89 | SetDirection("duster", Direction.LEFT) | ||
90 | Delay(1000) | ||
91 | |||
77 | PanToSprite("doria", 2000) | 92 | PanToSprite("doria", 2000) |
93 | Delay(500) | ||
94 | |||
95 | RemoveExpression("lucas") | ||
96 | RemoveExpression("kuma") | ||
97 | RemoveExpression("duster") | ||
78 | WaitForPan() | 98 | WaitForPan() |
79 | 99 | ||
80 | SetDirection("doria", Direction.DOWN_RIGHT) | 100 | SetDirection("doria", Direction.DOWN_RIGHT) |
81 | SetAnimation("doria", "talk") | 101 | SetAnimation("doria", "talk") |
102 | ShowExpression("doria", "surprise") | ||
82 | DisplayMessage("* Oh my!\n\f* Is that our little Kumatora I spy? `", "Doria", SpeakerType.MAN) | 103 | DisplayMessage("* Oh my!\n\f* Is that our little Kumatora I spy? `", "Doria", SpeakerType.MAN) |
104 | Delay(1000) | ||
105 | |||
106 | RemoveExpression("doria") | ||
83 | WaitForEndOfMessage() | 107 | WaitForEndOfMessage() |
84 | 108 | ||
85 | SetAnimation("doria", "still") | 109 | SetAnimation("doria", "still") |
@@ -89,6 +113,9 @@ function map2.approach_doria() | |||
89 | DisplayMessage("* Doria...?\n\f* What the hell... You're still alive?", "Kumatora", SpeakerType.WOMAN) | 113 | DisplayMessage("* Doria...?\n\f* What the hell... You're still alive?", "Kumatora", SpeakerType.WOMAN) |
90 | WaitForEndOfMessage() | 114 | WaitForEndOfMessage() |
91 | 115 | ||
116 | SetAnimation("boney", "crouch") | ||
117 | StopSound(barkingNoise) | ||
118 | PlaySound("boney_growl.wav") | ||
92 | SetAnimation("kuma", "still") | 119 | SetAnimation("kuma", "still") |
93 | Delay(1000) | 120 | Delay(1000) |
94 | 121 | ||