share/hedgewars/Data/Missions/Shotgun Training.hwt
changeset 2815 c1daf1213cbe
parent 2814 71e80c6e74bb
child 2816 30fc14a79aa0
equal deleted inserted replaced
2814:71e80c6e74bb 2815:c1daf1213cbe
    99 -- code here as this might slow down your game.
    99 -- code here as this might slow down your game.
   100 function onGameTick()
   100 function onGameTick()
   101 	-- If time's up, set the game to be lost.
   101 	-- If time's up, set the game to be lost.
   102 	-- We actually check the time to be "1 ms" as it
   102 	-- We actually check the time to be "1 ms" as it
   103 	-- will be at "0 ms" right at the start of the game.
   103 	-- will be at "0 ms" right at the start of the game.
   104 	if TurnTimeLeft == 1 then
   104 	if TurnTimeLeft == 1 and score < score_goal then
   105 		game_lost = true
   105 		game_lost = true
   106 		-- ... and show a short message.
   106 		-- ... and show a short message.
   107 		ShowMission("Shotgun Training", "Aiming Practice", "Oh no! Time's up! Just try again.", -amSkip, 0);
   107 		ShowMission("Shotgun Training", "Aiming Practice", "Oh no! Time's up! Just try again.", -amSkip, 0);
   108 		-- How about killing our poor hog due to his poor performance?
   108 		-- How about killing our poor hog due to his poor performance?
   109 		SetHealth(player, 0);
   109 		SetHealth(player, 0);