70 |
70 |
71 function onAmmoStoreInit() |
71 function onAmmoStoreInit() |
72 SetAmmo(amRope, 9, 2, 0) |
72 SetAmmo(amRope, 9, 2, 0) |
73 end |
73 end |
74 |
74 |
75 function onGameTick20() |
75 function onGameTick() |
76 if startTime == 0 and TurnTimeLeft < maxtime then |
76 if startTime == 0 and TurnTimeLeft < maxtime then |
77 startTime = GameTime |
77 startTime = GameTime |
78 end |
78 end |
79 if CurrentHedgehog ~= nil and TurnTimeLeft <= 20 and TurnTimeLeft > 0 then |
79 if CurrentHedgehog ~= nil and TurnTimeLeft == 0 then |
80 SetHealth(CurrentHedgehog, 0) |
80 SetHealth(CurrentHedgehog, 0) |
81 x, y = GetGearPosition(CurrentHedgehog) |
81 x, y = GetGearPosition(CurrentHedgehog) |
82 AddGear(x, y, gtShell, 0, 0, 0, 0) |
82 AddGear(x, y, gtShell, 0, 0, 0, 0) |
83 worsttime = 99999 |
83 worsttime = 99999 |
84 worsthog = nil |
84 worsthog = nil |
85 elseif TurnTimeLeft > maxtime - 25 and CurrentHedgehog ~= nil then |
85 elseif TurnTimeLeft == maxtime-1 and CurrentHedgehog ~= nil then |
86 if lasthog ~= nil then |
86 if lasthog ~= nil then |
87 SetGearPosition(lasthog, p , 0) |
87 SetGearPosition(lasthog, p , 0) |
88 end |
88 end |
89 reached = false |
89 reached = false |
90 SetGearVelocity(CurrentHedgehog, 1, 0) |
90 SetGearVelocity(CurrentHedgehog, 1, 0) |