103 -----------------------///////////////------------ |
104 -----------------------///////////////------------ |
104 --AnimSetGearPosition(leaks, 417, 1800) |
105 --AnimSetGearPosition(leaks, 417, 1800) |
105 end |
106 end |
106 |
107 |
107 function SkipEndAnimAlone() |
108 function SkipEndAnimAlone() |
108 if cyborgHidden then |
109 RestoreHedge(cyborg) |
109 RestoreHog(cyborg) |
110 RestoreHedge(princess) |
110 cyborgHidden = false |
|
111 end |
|
112 if princessHidden then |
|
113 RestoreHog(princess) |
|
114 princessHidden = false |
|
115 end |
|
116 AnimSetGearPosition(cyborg, 437, 1700) |
111 AnimSetGearPosition(cyborg, 437, 1700) |
117 AnimSetGearPosition(princess, 519, 1722) |
112 AnimSetGearPosition(princess, 519, 1722) |
118 end |
113 end |
119 |
114 |
120 function SkipEndAnimDuo() |
115 function SkipEndAnimDuo() |
121 if cyborgHidden then |
116 RestoreHedge(cyborg) |
122 RestoreHog(cyborg) |
117 RestoreHedge(princess) |
123 cyborgHidden = false |
|
124 end |
|
125 if princessHidden then |
118 if princessHidden then |
126 RestoreHog(princess) |
119 RestoreHog(princess) |
127 princessHidden = false |
120 princessHidden = false |
128 end |
121 end |
129 AnimSetGearPosition(cyborg, 437, 1700) |
122 AnimSetGearPosition(cyborg, 437, 1700) |
158 |
151 |
159 function SkipMidAnimAlone() |
152 function SkipMidAnimAlone() |
160 AnimSetGearPosition(leaks, 2656, 1842) |
153 AnimSetGearPosition(leaks, 2656, 1842) |
161 AnimSwitchHog(leaks) |
154 AnimSwitchHog(leaks) |
162 SetInputMask(0xFFFFFFFF) |
155 SetInputMask(0xFFFFFFFF) |
163 if princessHidden == false then |
156 AnimWait(dense, 1) |
164 HideHog(princess) |
157 AddFunction({func = HideHedge, args = {princess}}) |
165 princessHidden = true |
158 AddFunction({func = HideHedge, args = {cyborg}}) |
166 end |
|
167 if cyborgHidden == false then |
|
168 HideHog(cyborg) |
|
169 cyborgHidden = true |
|
170 end |
|
171 end |
159 end |
172 |
160 |
173 function AfterStartAnim() |
161 function AfterStartAnim() |
174 SetGearMessage(leaks, 0) |
162 SetGearMessage(leaks, 0) |
175 TurnTimeLeft = TurnTime |
163 TurnTimeLeft = TurnTime |
238 end |
226 end |
239 |
227 |
240 function SkipPastFlowerAnim() |
228 function SkipPastFlowerAnim() |
241 AnimSetGearPosition(dense, 2656, 1842) |
229 AnimSetGearPosition(dense, 2656, 1842) |
242 AnimSwitchHog(dense) |
230 AnimSwitchHog(dense) |
243 if cyborgHidden == false then |
231 AnimWait(dense, 1) |
244 HideHog(cyborg) |
232 AddFunction({func = HideHedge, args = {cyborg}}) |
245 cyborgHidden = true |
|
246 end |
|
247 end |
233 end |
248 |
234 |
249 function AfterOutPitAnim() |
235 function AfterOutPitAnim() |
250 SetupCourseDuo() |
236 SetupCourseDuo() |
251 RestoreHog(cannibals[5]) |
237 RestoreHog(cannibals[5]) |
252 AddAmmo(cannibals[5], amDEagle, 0) |
238 AddAmmo(cannibals[5], amDEagle, 0) |
253 HideHog(cannibals[5]) |
239 HideHedge(cannibals[5]) |
254 AddEvent(CheckTookFire, {}, DoTookFire, {}, 0) |
240 AddEvent(CheckTookFire, {}, DoTookFire, {}, 0) |
255 SetGearMessage(leaks, 0) |
241 SetGearMessage(leaks, 0) |
256 SetGearMessage(dense, 0) |
242 SetGearMessage(dense, 0) |
257 TurnTimeLeft = 0 |
243 TurnTimeLeft = 0 |
258 ShowMission(loc("The Journey Back"), loc("They never learn"), loc("Free Dense Cloud and continue the mission!"), 1, 5000) |
244 ShowMission(loc("The Journey Back"), loc("They never learn"), loc("Free Dense Cloud and continue the mission!"), 1, 5000) |
259 end |
245 end |
260 |
246 |
261 function SkipOutPitAnim() |
247 function SkipOutPitAnim() |
262 AnimSetGearPosition(dense, unpack(midDensePosDuo)) |
248 AnimSetGearPosition(dense, unpack(midDensePosDuo)) |
263 AnimSwitchHog(dense) |
249 AnimSwitchHog(dense) |
264 if cyborgHidden == false then |
250 AnimWait(dense, 1) |
265 HideHog(cyborg) |
251 AddFunction({func = HideHedge, args = {cyborg}}) |
266 cyborgHidden = true |
|
267 end |
|
268 end |
252 end |
269 |
253 |
270 function RestoreCyborg(x, y, xx, yy) |
254 function RestoreCyborg(x, y, xx, yy) |
271 RestoreHog(cyborg) |
255 RestoreHedge(cyborg) |
272 RestoreHog(princess) |
256 RestoreHedge(princess) |
273 cyborgHidden = false |
|
274 princessHidden = false |
|
275 AnimOutOfNowhere(cyborg, x, y) |
257 AnimOutOfNowhere(cyborg, x, y) |
276 AnimOutOfNowhere(princess, xx, yy) |
258 AnimOutOfNowhere(princess, xx, yy) |
277 HogTurnLeft(princess, false) |
259 HogTurnLeft(princess, false) |
278 return true |
260 return true |
279 end |
261 end |
280 |
262 |
281 function RestoreCyborgOnly(x, y) |
263 function RestoreCyborgOnly(x, y) |
282 RestoreHog(cyborg) |
264 RestoreHedge(cyborg) |
283 cyborgHidden = false |
|
284 SetState(cyborg, 0) |
265 SetState(cyborg, 0) |
285 AnimOutOfNowhere(cyborg, x, y) |
266 AnimOutOfNowhere(cyborg, x, y) |
286 return true |
267 return true |
287 end |
268 end |
288 |
269 |
291 SetGearMessage(cyborg, gmUp) |
272 SetGearMessage(cyborg, gmUp) |
292 return true |
273 return true |
293 end |
274 end |
294 |
275 |
295 function HideCyborg() |
276 function HideCyborg() |
296 if cyborgHidden == false then |
277 HideHedge(cyborg) |
297 HideHog(cyborg) |
278 HideHedge(princess) |
298 cyborgHidden = true |
|
299 end |
|
300 if princessHidden == false then |
|
301 HideHog(princess) |
|
302 princessHidden = true |
|
303 end |
|
304 end |
279 end |
305 |
280 |
306 function HideCyborgOnly() |
281 function HideCyborgOnly() |
307 if cyborgHidden == false then |
282 HideHedge(cyborg) |
308 HideHog(cyborg) |
|
309 cyborgHidden = true |
|
310 end |
|
311 end |
283 end |
312 |
284 |
313 function SetupKillRoom() |
285 function SetupKillRoom() |
314 PlaceGirder(2342, 1814, 2) |
286 PlaceGirder(2342, 1814, 2) |
315 PlaceGirder(2294, 1783, 0) |
287 PlaceGirder(2294, 1783, 0) |
597 ParseCommand("teamgone " .. loc("Cannibal Sentry")) |
569 ParseCommand("teamgone " .. loc("Cannibal Sentry")) |
598 TurnTimeLeft = 0 |
570 TurnTimeLeft = 0 |
599 end |
571 end |
600 --/////////////////////////////Misc Functions//////////////////////// |
572 --/////////////////////////////Misc Functions//////////////////////// |
601 |
573 |
|
574 function HideHedge(hedge) |
|
575 if hedgeHidden[hedge] ~= true then |
|
576 HideHog(hedge) |
|
577 hedgeHidden[hedge] = true |
|
578 end |
|
579 end |
|
580 |
|
581 function RestoreHedge(hedge) |
|
582 if hedgeHidden[hedge] == true then |
|
583 RestoreHog(hedge) |
|
584 hedgeHidden[hedge] = false |
|
585 end |
|
586 end |
|
587 |
602 function CondNeedToTurn(hog1, hog2) |
588 function CondNeedToTurn(hog1, hog2) |
603 xl, xd = GetX(hog1), GetX(hog2) |
589 xl, xd = GetX(hog1), GetX(hog2) |
604 if xl > xd then |
590 if xl > xd then |
605 AnimInsertStepNext({func = AnimTurn, args = {hog1, "Left"}}) |
591 AnimInsertStepNext({func = AnimTurn, args = {hog1, "Left"}}) |
606 AnimInsertStepNext({func = AnimTurn, args = {hog2, "Right"}}) |
592 AnimInsertStepNext({func = AnimTurn, args = {hog2, "Right"}}) |