diff options
Diffstat (limited to 'res/scripts')
-rw-r--r-- | res/scripts/common.lua | 15 | ||||
-rw-r--r-- | res/scripts/map2.lua | 11 |
2 files changed, 26 insertions, 0 deletions
diff --git a/res/scripts/common.lua b/res/scripts/common.lua index 4dfa1a2..494ace9 100644 --- a/res/scripts/common.lua +++ b/res/scripts/common.lua | |||
@@ -49,6 +49,11 @@ function StartCutscene() | |||
49 | playerSprite.controllable = false | 49 | playerSprite.controllable = false |
50 | character():halt(playerId) | 50 | character():halt(playerId) |
51 | message():displayCutsceneBars() | 51 | message():displayCutsceneBars() |
52 | |||
53 | local allSprites = getAllSprites() | ||
54 | for k,v in pairs(allSprites) do | ||
55 | getSprite(v).paused = true | ||
56 | end | ||
52 | end | 57 | end |
53 | 58 | ||
54 | --- Queues a message for display. | 59 | --- Queues a message for display. |
@@ -94,6 +99,11 @@ function HideCutsceneBars() | |||
94 | local playerId = getPlayerSprite() | 99 | local playerId = getPlayerSprite() |
95 | local playerSprite = getSprite(playerId) | 100 | local playerSprite = getSprite(playerId) |
96 | playerSprite.controllable = true | 101 | playerSprite.controllable = true |
102 | |||
103 | local allSprites = getAllSprites() | ||
104 | for k,v in pairs(allSprites) do | ||
105 | getSprite(v).paused = false | ||
106 | end | ||
97 | end | 107 | end |
98 | 108 | ||
99 | function GetPosition(spriteName) | 109 | function GetPosition(spriteName) |
@@ -120,6 +130,11 @@ function WaitForAnimation(spriteName) | |||
120 | until sprite.animFinished | 130 | until sprite.animFinished |
121 | end | 131 | end |
122 | 132 | ||
133 | function Halt(spriteName) | ||
134 | local spriteId = getSpriteByAlias(spriteName) | ||
135 | character():halt(spriteId) | ||
136 | end | ||
137 | |||
123 | function PlaySound(filename) | 138 | function PlaySound(filename) |
124 | mixer():playSound("../res/sfx/" .. filename) | 139 | mixer():playSound("../res/sfx/" .. filename) |
125 | end | 140 | end |
diff --git a/res/scripts/map2.lua b/res/scripts/map2.lua index 3c3a5d9..cb373b4 100644 --- a/res/scripts/map2.lua +++ b/res/scripts/map2.lua | |||
@@ -172,3 +172,14 @@ function map2.approach_doria() | |||
172 | 172 | ||
173 | HideCutsceneBars() | 173 | HideCutsceneBars() |
174 | end | 174 | end |
175 | |||
176 | function map2.talk_to_ionia() | ||
177 | Halt("ionia") | ||
178 | StartCutscene() | ||
179 | SetAnimation("ionia", "talk") | ||
180 | DisplayMessage("* Kumatora!", "Ionia", SpeakerType.MAN) | ||
181 | WaitForEndOfMessage() | ||
182 | |||
183 | SetAnimation("ionia", "still") | ||
184 | HideCutsceneBars() | ||
185 | end | ||