share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert01.lua
branchspacecampaign
changeset 9443 3fd77bcdd725
parent 9441 00f07e32313a
child 9445 7656a8cb4b13
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert01.lua	Thu Aug 01 23:16:00 2013 +0300
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert01.lua	Thu Aug 01 23:43:43 2013 +0300
@@ -132,6 +132,8 @@
 		HogTurnLeft(hero.gear, true)
 	elseif checkPointReached == 4 then
 		AnimSetGearPosition(hero.gear, 1160, 1180)
+	elseif checkPointReached == 5 then
+		AnimSetGearPosition(hero.gear, girderX, girderY)
 	end
 	
 	AnimInit()
@@ -215,7 +217,7 @@
 		loadHeroAmmo()
 		
 		secondBattle()
-	elseif checkPointReached == 4 then
+	elseif checkPointReached == 4 or checkPointReached == 5 then
 		ShowMission(campaignName, missionName, loc("The part is hidden in one of the crates! Go and get it!"), -amSkip, 0)
 		loadHeroAmmo()
 	end
@@ -361,7 +363,6 @@
 end
 
 function heroAtFirstBattle(gear)
-	WriteLnToConsole("**HERO AT FIRST BATTLE")
 	AnimCaption(hero.gear, loc("A smuggler! Prepare for battle"), 5000)
 	TurnTimeLeft = 0
 	heroIsInBattle = true
@@ -371,7 +372,6 @@
 end
 
 function heroFleeFirstBattle(gear)
-	WriteLnToConsole("++HERO FLEE FIRST BATTLE")
 	AnimSay(smuggler1.gear, loc("Run away you coward!"), SAY_SHOUT, 4000)
 	TurnTimeLeft = 0
 	heroIsInBattle = false
@@ -398,12 +398,18 @@
 	TurnTimeLeft = 0
 end
 
+-- for some weird reson I couldn't call the same action for both events
 function checkForWin1(gear)
 	checkForWin()
 end
 
 function checkForWin2(gear)
-	checkForWin()
+	-- ok lets place one more checkpoint as next part seems challenging without rope
+	if cratesFound ==  0 then
+		saveCheckPoint("5")
+	end
+	
+	checkForWin()	
 end
 
 -------------- ANIMATIONS ------------------