share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert01.lua
branchspacecampaign
changeset 9443 3fd77bcdd725
parent 9441 00f07e32313a
child 9445 7656a8cb4b13
equal deleted inserted replaced
9441:00f07e32313a 9443:3fd77bcdd725
   130 	elseif checkPointReached == 3 then
   130 	elseif checkPointReached == 3 then
   131 		AnimSetGearPosition(hero.gear, 1680, 920)
   131 		AnimSetGearPosition(hero.gear, 1680, 920)
   132 		HogTurnLeft(hero.gear, true)
   132 		HogTurnLeft(hero.gear, true)
   133 	elseif checkPointReached == 4 then
   133 	elseif checkPointReached == 4 then
   134 		AnimSetGearPosition(hero.gear, 1160, 1180)
   134 		AnimSetGearPosition(hero.gear, 1160, 1180)
       
   135 	elseif checkPointReached == 5 then
       
   136 		AnimSetGearPosition(hero.gear, girderX, girderY)
   135 	end
   137 	end
   136 	
   138 	
   137 	AnimInit()
   139 	AnimInit()
   138 	AnimationSetup()	
   140 	AnimationSetup()	
   139 end
   141 end
   213 	elseif checkPointReached == 2 or checkPointReached == 3 then
   215 	elseif checkPointReached == 2 or checkPointReached == 3 then
   214 		ShowMission(campaignName, missionName, loc("The part is hidden in one of the crates! Go and get it!"), -amSkip, 0)
   216 		ShowMission(campaignName, missionName, loc("The part is hidden in one of the crates! Go and get it!"), -amSkip, 0)
   215 		loadHeroAmmo()
   217 		loadHeroAmmo()
   216 		
   218 		
   217 		secondBattle()
   219 		secondBattle()
   218 	elseif checkPointReached == 4 then
   220 	elseif checkPointReached == 4 or checkPointReached == 5 then
   219 		ShowMission(campaignName, missionName, loc("The part is hidden in one of the crates! Go and get it!"), -amSkip, 0)
   221 		ShowMission(campaignName, missionName, loc("The part is hidden in one of the crates! Go and get it!"), -amSkip, 0)
   220 		loadHeroAmmo()
   222 		loadHeroAmmo()
   221 	end
   223 	end
   222 	
   224 	
   223 	SendHealthStatsOff()
   225 	SendHealthStatsOff()
   359 	SendStat('siPlayerKills','0',teamC.name)
   361 	SendStat('siPlayerKills','0',teamC.name)
   360 	EndGame()
   362 	EndGame()
   361 end
   363 end
   362 
   364 
   363 function heroAtFirstBattle(gear)
   365 function heroAtFirstBattle(gear)
   364 	WriteLnToConsole("**HERO AT FIRST BATTLE")
       
   365 	AnimCaption(hero.gear, loc("A smuggler! Prepare for battle"), 5000)
   366 	AnimCaption(hero.gear, loc("A smuggler! Prepare for battle"), 5000)
   366 	TurnTimeLeft = 0
   367 	TurnTimeLeft = 0
   367 	heroIsInBattle = true
   368 	heroIsInBattle = true
   368 	ongoingBattle = 1	
   369 	ongoingBattle = 1	
   369 	AnimSwitchHog(smuggler1.gear)
   370 	AnimSwitchHog(smuggler1.gear)
   370 	TurnTimeLeft = 0
   371 	TurnTimeLeft = 0
   371 end
   372 end
   372 
   373 
   373 function heroFleeFirstBattle(gear)
   374 function heroFleeFirstBattle(gear)
   374 	WriteLnToConsole("++HERO FLEE FIRST BATTLE")
       
   375 	AnimSay(smuggler1.gear, loc("Run away you coward!"), SAY_SHOUT, 4000)
   375 	AnimSay(smuggler1.gear, loc("Run away you coward!"), SAY_SHOUT, 4000)
   376 	TurnTimeLeft = 0
   376 	TurnTimeLeft = 0
   377 	heroIsInBattle = false
   377 	heroIsInBattle = false
   378 	ongoingBattle = 0
   378 	ongoingBattle = 0
   379 end
   379 end
   396 	AnimSay(smuggler3.gear, loc("Who's there! I'll get you..."), SAY_SHOUT, 5000)	
   396 	AnimSay(smuggler3.gear, loc("Who's there! I'll get you..."), SAY_SHOUT, 5000)	
   397 	AnimSwitchHog(smuggler3.gear)
   397 	AnimSwitchHog(smuggler3.gear)
   398 	TurnTimeLeft = 0
   398 	TurnTimeLeft = 0
   399 end
   399 end
   400 
   400 
       
   401 -- for some weird reson I couldn't call the same action for both events
   401 function checkForWin1(gear)
   402 function checkForWin1(gear)
   402 	checkForWin()
   403 	checkForWin()
   403 end
   404 end
   404 
   405 
   405 function checkForWin2(gear)
   406 function checkForWin2(gear)
   406 	checkForWin()
   407 	-- ok lets place one more checkpoint as next part seems challenging without rope
       
   408 	if cratesFound ==  0 then
       
   409 		saveCheckPoint("5")
       
   410 	end
       
   411 	
       
   412 	checkForWin()	
   407 end
   413 end
   408 
   414 
   409 -------------- ANIMATIONS ------------------
   415 -------------- ANIMATIONS ------------------
   410 
   416 
   411 function Skipanim(anim)
   417 function Skipanim(anim)