share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert03.lua
branchspacecampaign
changeset 9610 fabff82cf0b8
parent 9608 e2d4c2198e55
child 9630 df942cfac4e6
equal deleted inserted replaced
9609:70ef35c925d8 9610:fabff82cf0b8
   105 	ExecuteAfterAnimations()
   105 	ExecuteAfterAnimations()
   106 	CheckEvents()
   106 	CheckEvents()
   107 end
   107 end
   108 
   108 
   109 function onGameTick20()
   109 function onGameTick20()
   110 	checkTargetsDestroied()
   110 	checkTargetsDestroyed()
   111 end
   111 end
   112 
   112 
   113 function onAmmoStoreInit()
   113 function onAmmoStoreInit()
   114 	SetAmmo(amNothing, 0, 0, 0, 0)
   114 	SetAmmo(amNothing, 0, 0, 0, 0)
   115 	SetAmmo(amRCPlane, 0, 0, 0, 1)
   115 	SetAmmo(amRCPlane, 0, 0, 0, 1)
   166 	table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}})	
   166 	table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}})	
   167 end
   167 end
   168 
   168 
   169 ----------------- Other Functions -----------------
   169 ----------------- Other Functions -----------------
   170 
   170 
   171 function checkTargetsDestroied()
   171 function checkTargetsDestroyed()
   172 	if currentTarget == 1 then
   172 	if currentTarget == 1 then
   173 		if not GetHealth(targets[1].gear) then
   173 		if not GetHealth(targets[1].gear) then
   174 			AddCaption(loc("Level 1 clear!"))
   174 			AddCaption(loc("Level 1 clear!"))
   175 			SetGearPosition(hero.gear, 3590, 90)
   175 			SetGearPosition(hero.gear, 3590, 90)
   176 			currentTarget = 2
   176 			currentTarget = 2
   205 		end
   205 		end
   206 	end
   206 	end
   207 end
   207 end
   208 
   208 
   209 function win()
   209 function win()
       
   210 	SendStat('siGameResult', loc("Congratulations, you are the best!")) --1
       
   211 	SendStat('siCustomAchievement', loc("You have destroyed all the targets")) --11	
       
   212 	SendStat('siCustomAchievement', loc("You are indeed the best PAotH pilot")) --11
       
   213 	SendStat('siPlayerKills','1',teamA.name)
   210 	EndGame()
   214 	EndGame()
   211 end
   215 end
   212 
   216 
   213 function gameOver()
   217 function gameOver()
   214 	SendStat('siGameResult', loc("Hog Solo lost, try again!")) --1
   218 	SendStat('siGameResult', loc("Hog Solo lost, try again!")) --1