94 ProtectEnemies() |
94 ProtectEnemies() |
95 ShowMission(loc("Rope-knocking Challenge"), loc("Challenge over!"), loc("Oh no! Just try again!"), -amSkip, 0) |
95 ShowMission(loc("Rope-knocking Challenge"), loc("Challenge over!"), loc("Oh no! Just try again!"), -amSkip, 0) |
96 SendStat(siGameResult, loc("Challenge over!")) |
96 SendStat(siGameResult, loc("Challenge over!")) |
97 local score = GetKillScore() |
97 local score = GetKillScore() |
98 SendStat(siCustomAchievement, string.format(loc("You have killed %d of 16 hedgehogs (+%d points)."), hogsKilled, score)) |
98 SendStat(siCustomAchievement, string.format(loc("You have killed %d of 16 hedgehogs (+%d points)."), hogsKilled, score)) |
99 SendStat(siPointType, loc("points")) |
99 SendStat(siPointType, "!POINTS") |
100 SendStat(siPlayerKills, tostring(score), playerTeamName) |
100 SendStat(siPlayerKills, tostring(score), playerTeamName) |
101 PlaySound(sndHellish) |
101 PlaySound(sndHellish) |
102 |
102 |
103 -- Update highscore |
103 -- Update highscore |
104 updateChallengeRecord("Highscore", score) |
104 updateChallengeRecord("Highscore", score) |
116 local timeScore = math.ceil((finishTime/TurnTime)*6000) |
116 local timeScore = math.ceil((finishTime/TurnTime)*6000) |
117 local score = hogScore + timeScore |
117 local score = hogScore + timeScore |
118 |
118 |
119 SendStat(siCustomAchievement, string.format(loc("You have killed %d of 16 hedgehogs (+%d points)."), hogsKilled, hogScore)) |
119 SendStat(siCustomAchievement, string.format(loc("You have killed %d of 16 hedgehogs (+%d points)."), hogsKilled, hogScore)) |
120 SendStat(siCustomAchievement, string.format(loc("You have completed this challenge in %.2f s (+%d points)."), completeTime, timeScore)) |
120 SendStat(siCustomAchievement, string.format(loc("You have completed this challenge in %.2f s (+%d points)."), completeTime, timeScore)) |
121 SendStat(siPointType, loc("points")) |
121 SendStat(siPointType, "!POINTS") |
122 SendStat(siPlayerKills, tostring(score), playerTeamName) |
122 SendStat(siPlayerKills, tostring(score), playerTeamName) |
123 SetTeamLabel(playerTeamName, tostring(score)) |
123 SetTeamLabel(playerTeamName, tostring(score)) |
124 |
124 |
125 -- Update highscore |
125 -- Update highscore |
126 updateChallengeRecord("Highscore", score) |
126 updateChallengeRecord("Highscore", score) |