29 targXdif1 = {2749, 2909, 2770, 2836, 1558, 1305} |
29 targXdif1 = {2749, 2909, 2770, 2836, 1558, 1305} |
30 targYdif1 = {1179, 1313, 1734, 1441, 1152, 1259} |
30 targYdif1 = {1179, 1313, 1734, 1441, 1152, 1259} |
31 targetPosX = {{821, 866, 789}, {614, 656, 638}, {1238, 1237, 1200}} |
31 targetPosX = {{821, 866, 789}, {614, 656, 638}, {1238, 1237, 1200}} |
32 targetPosY = {{1342, 1347, 1326}, {1112, 1121, 1061}, {1152, 1111, 1111}} |
32 targetPosY = {{1342, 1347, 1326}, {1112, 1121, 1061}, {1152, 1111, 1111}} |
33 crateNum = {6, 8} |
33 crateNum = {6, 8} |
34 |
34 rope2GirderX = 3245 |
|
35 rope2GirderY = 1190 |
35 |
36 |
36 stage = 1 |
37 stage = 1 |
37 cratesCollected = 0 |
38 cratesCollected = 0 |
38 chalTries = 0 |
39 chalTries = 0 |
39 targetsDestroyed = 0 |
40 targetsDestroyed = 0 |
365 y = GetY(youngh) |
370 y = GetY(youngh) |
366 return x < 3005 and y > 1500 and StoppedGear(youngh) |
371 return x < 3005 and y > 1500 and StoppedGear(youngh) |
367 end |
372 end |
368 |
373 |
369 function DoPastMoleHead() |
374 function DoPastMoleHead() |
|
375 -- Initiate parachute challenge |
370 RemoveEventFunc(CheckOnMoleHead) |
376 RemoveEventFunc(CheckOnMoleHead) |
371 ropeCrate2 = SpawnUtilityCrate(2782, 1720, amRope, 100) |
377 ropeCrate2 = SpawnUtilityCrate(2782, 1720, amRope, 100) |
|
378 rope2InProgress = true |
372 AddAmmo(youngh, amRope, 0) |
379 AddAmmo(youngh, amRope, 0) |
373 SetGearMessage(CurrentHedgehog, 0) |
380 SetGearMessage(CurrentHedgehog, 0) |
|
381 -- Block the way to the hole to the right, since the player loses the rope for this section |
|
382 PlaceGirder(rope2GirderX, rope2GirderY, 6) |
374 AddAnim(pastMoleHeadAnim) |
383 AddAnim(pastMoleHeadAnim) |
375 AddEvent(CheckTookRope2, {}, DoTookRope2, {}, 0) |
384 AddEvent(CheckTookRope2, {}, DoTookRope2, {}, 0) |
376 end |
385 end |
377 |
386 |
378 function DoOnMoleHead() |
387 function DoOnMoleHead() |
|
388 -- Initiate parachute challenge |
379 RemoveEventFunc(CheckPastMoleHead) |
389 RemoveEventFunc(CheckPastMoleHead) |
380 ropeCrate2 = SpawnUtilityCrate(2782, 1720, amRope, 100) |
390 ropeCrate2 = SpawnUtilityCrate(2782, 1720, amRope, 100) |
|
391 rope2InProgress = true |
381 AddAmmo(youngh, amRope, 0) |
392 AddAmmo(youngh, amRope, 0) |
382 SetGearMessage(CurrentHedgehog, 0) |
393 SetGearMessage(CurrentHedgehog, 0) |
|
394 -- Block the way to the hole to the right, since the player loses the rope for this section |
|
395 PlaceGirder(rope2GirderX, rope2GirderY, 6) |
383 AddAnim(onMoleHeadAnim) |
396 AddAnim(onMoleHeadAnim) |
384 AddEvent(CheckTookRope2, {}, DoTookRope2, {}, 0) |
397 AddEvent(CheckTookRope2, {}, DoTookRope2, {}, 0) |
385 end |
398 end |
386 |
399 |
387 function CheckTookRope2() |
400 function CheckTookRope2() |
426 ropeCrate3 = SpawnUtilityCrate(2000, 1200, amRope, 100) |
439 ropeCrate3 = SpawnUtilityCrate(2000, 1200, amRope, 100) |
427 AddEvent(CheckTookRope3, {}, AddAmmo, {youngh, amRope, 100}, 0) |
440 AddEvent(CheckTookRope3, {}, AddAmmo, {youngh, amRope, 100}, 0) |
428 AddEvent(CheckCratesColled, {}, DoCratesColled, {}, 0) |
441 AddEvent(CheckCratesColled, {}, DoCratesColled, {}, 0) |
429 AddEvent(CheckChallengeWon, {}, DoChallengeWon, {}, 0) |
442 AddEvent(CheckChallengeWon, {}, DoChallengeWon, {}, 0) |
430 AddEvent(CheckTimesUp, {}, DoTimesUp, {}, 1) |
443 AddEvent(CheckTimesUp, {}, DoTimesUp, {}, 1) |
|
444 -- Remove up the old mole blockade from the parachute challenge |
|
445 EraseSprite(rope2GirderX, rope2GirderY, sprAmGirder, 6) |
431 end |
446 end |
432 |
447 |
433 function CheckChoice() |
448 function CheckChoice() |
434 return difficulty ~= 0 |
449 return difficulty ~= 0 |
435 end |
450 end |
667 rope1Taken = true |
682 rope1Taken = true |
668 elseif gear == paraCrate then |
683 elseif gear == paraCrate then |
669 paraTaken = true |
684 paraTaken = true |
670 elseif gear == ropeCrate2 then |
685 elseif gear == ropeCrate2 then |
671 rope2Taken = true |
686 rope2Taken = true |
|
687 rope2InProgress = false |
672 elseif gear == ropeCrate3 then |
688 elseif gear == ropeCrate3 then |
673 rope3Taken = true |
689 rope3Taken = true |
674 elseif gear == crates[1] then |
690 elseif gear == crates[1] then |
675 -- Play sound if challenge crate (fake crate) collected |
691 -- Play sound if challenge crate (fake crate) collected |
676 if band(GetGearMessage(gear), gmDestroy) ~= 0 then |
692 if band(GetGearMessage(gear), gmDestroy) ~= 0 then |