share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert01.lua
branchspacecampaign
changeset 9578 16139270448f
parent 9574 da3d39667881
child 9582 bf314b2258b3
equal deleted inserted replaced
9576:8d8bad7d78de 9578:16139270448f
    11 -- Idea: game will be successfully end when the 2 lower crates are collected
    11 -- Idea: game will be successfully end when the 2 lower crates are collected
    12 -- it would be more defficult (and sadistic) if one should collect *all* the crates
    12 -- it would be more defficult (and sadistic) if one should collect *all* the crates
    13 
    13 
    14 HedgewarsScriptLoad("/Scripts/Locale.lua")
    14 HedgewarsScriptLoad("/Scripts/Locale.lua")
    15 HedgewarsScriptLoad("/Scripts/Animate.lua")
    15 HedgewarsScriptLoad("/Scripts/Animate.lua")
       
    16 HedgewarsScriptLoad("/Missions/Campaign/A_Space_Adventure/global_functions.lua")
    16 
    17 
    17 ----------------- VARIABLES --------------------
    18 ----------------- VARIABLES --------------------
    18 -- globals
    19 -- globals
    19 local campaignName = loc("A Space Adventure")
    20 local campaignName = loc("A Space Adventure")
    20 local missionName = loc("Searching in the dust")
    21 local missionName = loc("Searching in the dust")
   494 		-- have to look more		
   495 		-- have to look more		
   495 		AnimSay(hero.gear, loc("Haven't found it yet..."), SAY_THINK, 5000)
   496 		AnimSay(hero.gear, loc("Haven't found it yet..."), SAY_THINK, 5000)
   496 		cratesFound = cratesFound + 1
   497 		cratesFound = cratesFound + 1
   497 	elseif cratesFound == 1 then
   498 	elseif cratesFound == 1 then
   498 		-- end game
   499 		-- end game
       
   500 		saveCompletedStatus(5)
   499 		AnimSay(hero.gear, loc("Hoo Ray!!!"), SAY_SHOUT, 5000)
   501 		AnimSay(hero.gear, loc("Hoo Ray!!!"), SAY_SHOUT, 5000)
   500 		SendStat('siGameResult', loc("Congratulations, you won!")) --1
   502 		SendStat('siGameResult', loc("Congratulations, you won!")) --1
   501 		SendStat('siCustomAchievement', loc("To win the game you had to collect the 2 crates with no specific order")) --11
   503 		SendStat('siCustomAchievement', loc("To win the game you had to collect the 2 crates with no specific order")) --11
   502 		SendStat('siPlayerKills','1',teamC.name)
   504 		SendStat('siPlayerKills','1',teamC.name)
   503 		SendStat('siPlayerKills','0',teamB.name)
   505 		SendStat('siPlayerKills','0',teamB.name)