# HG changeset patch # User Periklis Ntanasis # Date 1377130890 -10800 # Node ID 5872edd6864e655bef77634eacd2f9158aa4a499 # Parent 455f1260ef438e0b590283d0d265df74f1ef60fd event in case hero dies diff -r 455f1260ef43 -r 5872edd6864e share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/death01.lua --- 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