event for win spacecampaign
authorPeriklis Ntanasis <pntanasis@gmail.com>
Mon, 05 Aug 2013 19:49:43 +0300
branchspacecampaign
changeset 9469 6896f9298b80
parent 9467 483a73697535
child 9471 867f020b0621
event for win
share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert02.lua
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert02.lua	Mon Aug 05 19:45:55 2013 +0300
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert02.lua	Mon Aug 05 19:49:43 2013 +0300
@@ -128,12 +128,24 @@
 	return false
 end
 
+function onHeroSafe(gear)
+	if not hero.dead and GetY(hero.gear) < 200 and StoppedGear(hero.gear) then
+		return true
+	end
+	return false
+end
+
 -------------- OUTCOMES ------------------
 
 function heroDeath(gear)
 	heroLost()
 end
 
+function heroSafe(gear)
+	-- hero win stuff
+	EndGame()
+end
+
 -------------- ANIMATIONS ------------------
 
 function Skipanim(anim)