share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/death01.lua
branchspacecampaign
changeset 9560 5872edd6864e
parent 9558 455f1260ef43
child 9562 241ffe433c3d
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/death01.lua	Thu Aug 22 03:06:30 2013 +0300
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/death01.lua	Thu Aug 22 03:21:30 2013 +0300
@@ -185,3 +185,40 @@
 		professor.dead = true
 	end
 end
+
+function onPrecise()
+	if GameTime > 3000 then
+		SetAnimSkip(true)   
+	end
+end
+
+-------------- EVENTS ------------------
+
+function onHeroDeath(gear)
+	if hero.dead then
+		return true
+	end
+	return false
+end
+
+-------------- ACTIONS ------------------
+
+function heroDeath(gear)
+	SendStat('siGameResult', loc("Hog Solo lost, try again!")) --1
+	SendStat('siCustomAchievement', loc("To win the game you have to eliminate your enemies")) --11
+	SendStat('siPlayerKills','1',teamC.name)
+	SendStat('siPlayerKills','0',teamA.name)
+	EndGame()
+end
+
+-------------- ANIMATIONS ------------------
+
+function Skipanim(anim)
+	if goals[anim] ~= nil then
+		ShowMission(unpack(goals[anim]))
+    end
+end
+
+function AnimationSetup()
+	-- TODO ADD DIALOGS
+end