113 |
113 |
114 -- DRAW MAP -- |
114 -- DRAW MAP -- |
115 drawMap() |
115 drawMap() |
116 |
116 |
117 ------ HOG LIST ------ |
117 ------ HOG LIST ------ |
118 AddTeam(loc("Training Team"), -1, "deadhog", "SteelTower", "Default", "hedgewars") |
118 AddMissionTeam(-1) |
119 |
119 |
120 hhs[1] = AddHog(loc("Greenhorn"), 0, 100, "NoHat") |
120 hhs[1] = AddMissionHog(100) |
121 SetGearPosition(hhs[1], 404, 1714) |
121 SetGearPosition(hhs[1], 404, 1714) |
122 SetEffect(hhs[1], heResurrectable, 1) |
122 SetEffect(hhs[1], heResurrectable, 1) |
123 |
123 |
124 hhs[2] = AddHog(loc("Rhombus"), 0, 100, "NoHat") |
124 hhs[2] = AddMissionHog(100) |
125 SetGearPosition(hhs[2], 620, 1538) |
125 SetGearPosition(hhs[2], 620, 1538) |
126 SetEffect(hhs[2], heResurrectable, 1) |
126 SetEffect(hhs[2], heResurrectable, 1) |
127 HogTurnLeft(hhs[2], true) |
127 HogTurnLeft(hhs[2], true) |
128 |
128 |
129 hhs[3] = AddHog(loc("Trapped"), 0, 100, "NoHat") |
129 hhs[3] = AddMissionHog(100) |
130 SetGearPosition(hhs[3], 1573, 1824) |
130 SetGearPosition(hhs[3], 1573, 1824) |
131 SetEffect(hhs[3], heResurrectable, 1) |
131 SetEffect(hhs[3], heResurrectable, 1) |
132 |
132 |
133 hhs[4] = AddHog(loc("Cappy"), 0, 100, "cap_red") |
133 hhs[4] = AddHog(loc("Cappy"), 0, 100, "cap_red") |
134 SetGearPosition(hhs[4], 2114, 1411) |
134 SetGearPosition(hhs[4], 2114, 1411) |
135 SetEffect(hhs[4], heResurrectable, 1) |
135 SetEffect(hhs[4], heResurrectable, 1) |
136 HogTurnLeft(hhs[4], true) |
136 HogTurnLeft(hhs[4], true) |
137 |
137 |
138 hhs[5] = AddHog(loc("Ice"), 0, 100, "NoHat") |
138 hhs[5] = AddMissionHog(100) |
139 SetGearPosition(hhs[5], 1813, 1285) |
139 SetGearPosition(hhs[5], 1813, 1285) |
140 SetEffect(hhs[5], heResurrectable, 1) |
140 SetEffect(hhs[5], heResurrectable, 1) |
141 |
141 |
142 hog_greenhorn = hhs[1] |
142 hog_greenhorn = hhs[1] |
143 hog_cappy = hhs[4] |
143 hog_cappy = hhs[4] |
|
144 |
|
145 for i=1,#hhs do |
|
146 if hhs[i] ~= hog_cappy then |
|
147 if GetHogName(hhs[i]) == loc("Cappy") then |
|
148 SetHogName(hhs[i], loc("Greenhorn")) |
|
149 end |
|
150 if GetHogHat(hhs[i]) == "cap_red" then |
|
151 SetHogHat(hhs[i], "NoHat") |
|
152 end |
|
153 end |
|
154 end |
144 |
155 |
145 SendHealthStatsOff() |
156 SendHealthStatsOff() |
146 end |
157 end |
147 |
158 |
148 local function LoadGearData() |
159 local function LoadGearData() |
252 SaveMissionVar("Won", "true") |
263 SaveMissionVar("Won", "true") |
253 ShowMission(loc("Basic Movement Training"), loc("Training complete!"),loc("Congratulations! You have completed the obstacle course!"), 0, 0) |
264 ShowMission(loc("Basic Movement Training"), loc("Training complete!"),loc("Congratulations! You have completed the obstacle course!"), 0, 0) |
254 SendStat(siGameResult, loc("You have completed the Basic Movement Training!")) |
265 SendStat(siGameResult, loc("You have completed the Basic Movement Training!")) |
255 SendStat(siCustomAchievement, loc("Congratulations!")) |
266 SendStat(siCustomAchievement, loc("Congratulations!")) |
256 SendStat(siCustomAchievement, loc("Return to the training menu by pressing the “Go back” button.")) |
267 SendStat(siCustomAchievement, loc("Return to the training menu by pressing the “Go back” button.")) |
257 SendStat(siPlayerKills, "0", loc("Training Team")) |
268 SendStat(siPlayerKills, "0", GetHogTeamName(hog_greenhorn)) |
258 PlaySound(sndVictory, CurrentHedgehog) |
269 PlaySound(sndVictory, CurrentHedgehog) |
259 -- Disable controls, end game |
270 -- Disable controls, end game |
260 SetInputMask(0) |
271 SetInputMask(0) |
261 SetWeapon(amNothing) |
272 SetWeapon(amNothing) |
262 SetGearMessage(CurrentHedgehog, band(GetGearMessage(CurrentHedgehog), bnot(gmAllStoppable))) |
273 SetGearMessage(CurrentHedgehog, band(GetGearMessage(CurrentHedgehog), bnot(gmAllStoppable))) |