191 end |
191 end |
192 |
192 |
193 AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 0) |
193 AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 0) |
194 AddEvent(onHeroFinalStep, {hero.gear}, heroFinalStep, {hero.gear}, 0) |
194 AddEvent(onHeroFinalStep, {hero.gear}, heroFinalStep, {hero.gear}, 0) |
195 AddEvent(onAntiFlyArea, {hero.gear}, antiFlyArea, {hero.gear}, 1) |
195 AddEvent(onAntiFlyArea, {hero.gear}, antiFlyArea, {hero.gear}, 1) |
|
196 AddEvent(onAntiFlyAreaVelocity, {hero.gear}, antiFlyAreaVelocity, {hero.gear}, 1) |
196 AddEvent(onNonAntiFlyArea, {hero.gear}, nonAntiFlyArea, {hero.gear}, 1) |
197 AddEvent(onNonAntiFlyArea, {hero.gear}, nonAntiFlyArea, {hero.gear}, 1) |
197 AddEvent(onThantaDeath, {bandit1.gear}, thantaDeath, {bandit1.gear}, 0) |
198 AddEvent(onThantaDeath, {bandit1.gear}, thantaDeath, {bandit1.gear}, 0) |
198 AddEvent(onHeroWin, {hero.gear}, heroWin, {hero.gear}, 0) |
199 AddEvent(onHeroWin, {hero.gear}, heroWin, {hero.gear}, 0) |
199 |
200 |
200 AddAmmo(hero.gear, amJetpack, 99) |
201 AddAmmo(hero.gear, amJetpack, 99) |
393 |
401 |
394 -------------- ACTIONS ------------------ |
402 -------------- ACTIONS ------------------ |
395 |
403 |
396 function antiFlyArea(gear) |
404 function antiFlyArea(gear) |
397 heroAtAntiFlyArea = true |
405 heroAtAntiFlyArea = true |
398 if TurnTimeLeft < -1 then |
406 if not heroVisitedAntiFlyArea then |
399 heroVisitedAntiFlyArea = true |
407 TurnTimeLeft = 0 |
400 TurnTimeLeft = 0 |
|
401 FollowGear(hero.gear) |
408 FollowGear(hero.gear) |
402 AddAmmo(hero.gear, amJetpack, 0) |
409 AnimSwitchHog(bandit1.gear) |
403 AnimSwitchHog(bandit1.gear) |
|
404 FollowGear(hero.gear) |
410 FollowGear(hero.gear) |
405 TurnTimeLeft = 0 |
411 TurnTimeLeft = 0 |
406 else |
412 end |
407 AddAmmo(hero.gear, amJetpack, 0) |
413 AddAmmo(hero.gear, amJetpack, 0) |
408 end |
414 heroVisitedAntiFlyArea = true |
|
415 end |
|
416 |
|
417 function antiFlyAreaVelocity(gear) |
|
418 SetGearVelocity(hero.gear, 0, 0) |
409 end |
419 end |
410 |
420 |
411 function nonAntiFlyArea(gear) |
421 function nonAntiFlyArea(gear) |
412 heroAtAntiFlyArea = false |
422 heroAtAntiFlyArea = false |
413 AddAmmo(hero.gear, amJetpack, 99) |
423 AddAmmo(hero.gear, amJetpack, 99) |
466 if goals[anim] ~= nil then |
476 if goals[anim] ~= nil then |
467 ShowMission(unpack(goals[anim])) |
477 ShowMission(unpack(goals[anim])) |
468 end |
478 end |
469 if anim == dialog02 then |
479 if anim == dialog02 then |
470 actionsOnWin() |
480 actionsOnWin() |
|
481 else |
|
482 AnimSwitchHog(hero.gear) |
471 end |
483 end |
472 end |
484 end |
473 |
485 |
474 function AnimationSetup() |
486 function AnimationSetup() |
475 -- DIALOG 01 - Start, welcome to moon |
487 -- DIALOG 01 - Start, welcome to moon |