233 if currentWaypoint < 16 then |
233 if currentWaypoint < 16 then |
234 local wp = waypoints[currentWaypoint] |
234 local wp = waypoints[currentWaypoint] |
235 wp.gear = AddVisualGear(1,1,vgtCircle,1,true) |
235 wp.gear = AddVisualGear(1,1,vgtCircle,1,true) |
236 -- add bonus time and "fuel" |
236 -- add bonus time and "fuel" |
237 if currentWaypoint % 2 == 0 then |
237 if currentWaypoint % 2 == 0 then |
238 PlaySound(sndBump) -- what's the crate sound? |
238 PlaySound(sndShotgunReload) |
239 SetVisualGearValues(wp.gear, wp.x,wp.y, 20, 200, 0, 0, 100, radius, 3, RED) |
239 SetVisualGearValues(wp.gear, wp.x,wp.y, 20, 200, 0, 0, 100, radius, 3, RED) |
240 AddAmmo(hero.gear, amJetpack, GetAmmoCount(hero.gear, amJetpack)+1) |
240 AddAmmo(hero.gear, amJetpack, GetAmmoCount(hero.gear, amJetpack)+1) |
241 totalSaucers = totalSaucers + 1 |
241 totalSaucers = totalSaucers + 1 |
242 local message = loc("Got 1 more saucer") |
242 local vgear = AddVisualGear(GetX(hero.gear), GetY(hero.gear), vgtAmmo, 0, true) |
|
243 if vgear ~= nil then |
|
244 SetVisualGearValues(vgear,nil,nil,nil,nil,nil,amJetpack) |
|
245 end |
|
246 local message |
243 if TurnTimeLeft <= 22000 then |
247 if TurnTimeLeft <= 22000 then |
244 TurnTimeLeft = TurnTimeLeft + 8000 |
248 TurnTimeLeft = TurnTimeLeft + 8000 |
245 totalTime = totalTime + 8000 |
249 totalTime = totalTime + 8000 |
246 message = message..loc(" and 8 more seconds added to the clock") |
250 PlaySound(sndExtraTime) |
|
251 message = loc("Got 1 more saucer and 8 more seconds added to the clock") |
|
252 else |
|
253 message = loc("Got 1 more saucer") |
247 end |
254 end |
248 AnimCaption(hero.gear, message, 4000) |
255 AnimCaption(hero.gear, message, 4000) |
249 else |
256 else |
250 SetVisualGearValues(wp.gear, wp.x,wp.y, 20, 200, 0, 0, 100, radius, 3, GREEN) |
257 SetVisualGearValues(wp.gear, wp.x,wp.y, 20, 200, 0, 0, 100, radius, 3, GREEN) |
251 if TurnTimeLeft <= 16000 then |
258 if TurnTimeLeft <= 16000 then |
252 TurnTimeLeft = TurnTimeLeft + 6000 |
259 TurnTimeLeft = TurnTimeLeft + 6000 |
253 totalTime = totalTime + 6000 |
260 totalTime = totalTime + 6000 |
254 if currentWaypoint ~= 1 then |
261 if currentWaypoint ~= 1 then |
|
262 PlaySound(sndExtraTime) |
255 AnimCaption(hero.gear, loc("6 more seconds added to the clock"), 4000) |
263 AnimCaption(hero.gear, loc("6 more seconds added to the clock"), 4000) |
256 end |
264 end |
257 end |
265 end |
258 end |
266 end |
259 radius = radius - 4 |
267 radius = radius - 4 |
260 currentWaypoint = currentWaypoint + 1 |
268 currentWaypoint = currentWaypoint + 1 |
261 return true |
269 return true |
262 else |
270 else |
263 AnimCaption(hero.gear, loc("Congratulations, you won!"), 4000) |
271 AnimCaption(hero.gear, loc("Congratulations, you won!"), 4000) |
|
272 PlaySound(sndVictory, hero.gear) |
264 end |
273 end |
265 return false |
274 return false |
266 end |
275 end |
267 |
276 |
268 function checkIfHeroInWaypoint() |
277 function checkIfHeroInWaypoint() |