189 elseif checkPointReached == 5 then |
189 elseif checkPointReached == 5 then |
190 -- Hero has visited a planet, he has plenty of fuels and can change planet |
190 -- Hero has visited a planet, he has plenty of fuels and can change planet |
191 AddAmmo(hero.gear, amJetpack, 100) |
191 AddAmmo(hero.gear, amJetpack, 100) |
192 end |
192 end |
193 |
193 |
|
194 -- Reset checkpoint of other missions when entering this mission. |
|
195 -- The player has left the planet, so we count that “abandoning” any incomplete missions. |
|
196 -- This also allows the player (indirectly) to reset the checkpointed missions. |
|
197 abandoned = resetCheckpoint() |
|
198 |
194 AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 0) |
199 AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 0) |
195 AddEvent(onNoFuelAtLand, {hero.gear}, noFuelAtLand, {hero.gear}, 0) |
200 AddEvent(onNoFuelAtLand, {hero.gear}, noFuelAtLand, {hero.gear}, 0) |
196 -- always check for landings |
201 -- always check for landings |
197 if GetCampaignVar("Planet") ~= "moon" then |
202 if GetCampaignVar("Planet") ~= "moon" then |
198 AddEvent(onMoonLanding, {hero.gear}, moonLanding, {hero.gear}, 0) |
203 AddEvent(onMoonLanding, {hero.gear}, moonLanding, {hero.gear}, 0) |