445 SetHealth(Cake,999999) |
446 SetHealth(Cake,999999) |
446 CakeTries = CakeTries + 1 |
447 CakeTries = CakeTries + 1 |
447 end |
448 end |
448 |
449 |
449 if (y > 286) or (y < 286 and MaxHeight > 286) then |
450 if (y > 286) or (y < 286 and MaxHeight > 286) then |
|
451 if MaxHeight > 286 and y <= 286 then |
|
452 -- wow, reached top |
|
453 local teamName = GetHogTeamName(CurrentHedgehog) |
|
454 if teamTimes[teamName] == nil or teamTimes[teamName] > GameTime - startTime then |
|
455 teamTimes[teamName] = GameTime - startTime |
|
456 end |
|
457 MaxHeight = 286 |
|
458 end |
450 if y < MaxHeight and y > 286 then MaxHeight = y end |
459 if y < MaxHeight and y > 286 then MaxHeight = y end |
451 if y < 286 then MaxHeight = 286 end |
|
452 if MaxHeight < hTagHeight then |
460 if MaxHeight < hTagHeight then |
453 hTagHeight = MaxHeight |
461 hTagHeight = MaxHeight |
454 if hTag ~= nil then DeleteVisualGear(hTag) end |
462 if hTag ~= nil then DeleteVisualGear(hTag) end |
455 hTag = AddVisualGear(0, 0, vgtHealthTag, 0, true) |
463 hTag = AddVisualGear(0, 0, vgtHealthTag, 0, true) |
456 local g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(hTag) |
464 local g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(hTag) |
685 |
693 |
686 function onAchievementsDeclaration() |
694 function onAchievementsDeclaration() |
687 for teamname, score in pairs(teamBests) do |
695 for teamname, score in pairs(teamBests) do |
688 DeclareAchievement("height reached", teamname, "ClimbHome", score) |
696 DeclareAchievement("height reached", teamname, "ClimbHome", score) |
689 end |
697 end |
690 end |
698 for teamname, score in pairs(teamTimes) do |
|
699 DeclareAchievement("rope race", teamname, "ClimbHome", score) |
|
700 end |
|
701 end |