share/hedgewars/Data/Missions/Training/User_Mission_-_That_Sinking_Feeling.lua
changeset 11521 dc36fad455f4
parent 11262 6e1aa1144a2b
equal deleted inserted replaced
11520:663ecfb05df6 11521:dc36fad455f4
    10 local genCounter = 0
    10 local genCounter = 0
    11 local waterCounter = 0
    11 local waterCounter = 0
    12 local waterPix = 0
    12 local waterPix = 0
    13 local frig = 0
    13 local frig = 0
    14 local watGear = nil
    14 local watGear = nil
       
    15 local cinematic = false
    15 
    16 
    16 -- allow skipping of the intro via hitting precise key
    17 -- allow skipping of the intro via hitting precise key
    17 function onPrecise()
    18 function onPrecise()
    18 	if introStage < 100 then
    19 	if introStage < 100 then
    19 		introStage = 110
    20 		introStage = 110
    66 	SetInputMask(gmPrecise)
    67 	SetInputMask(gmPrecise)
    67 end
    68 end
    68 
    69 
    69 
    70 
    70 function onGameStart()
    71 function onGameStart()
       
    72     cinematic = true
       
    73     SetCinematicMode(true)
    71 	SendHealthStatsOff()
    74 	SendHealthStatsOff()
    72 
    75 
    73 	ShowMission(loc("That Sinking Feeling"), loc("Challenge"), loc("Save as many hapless hogs as possible!"), 4, 1)
    76 	ShowMission(loc("That Sinking Feeling"), loc("Challenge"), loc("Save as many hapless hogs as possible!"), 4, 1)
    74 
    77 
    75 	HogTurnLeft(hh[0], false)
    78 	HogTurnLeft(hh[0], false)
   204 
   207 
   205 	end
   208 	end
   206 
   209 
   207 	-- start the water rising when the intro is finished
   210 	-- start the water rising when the intro is finished
   208 	if introStage == 110 then
   211 	if introStage == 110 then
       
   212 
       
   213         if cinematic then
       
   214             SetCinematicMode(false)
       
   215             cinematic = false
       
   216         end
   209 
   217 
   210 		waterCounter = waterCounter + 1
   218 		waterCounter = waterCounter + 1
   211 		if (waterCounter == 100) and (waterPix < 1615) then
   219 		if (waterCounter == 100) and (waterPix < 1615) then
   212 			waterCounter = 0
   220 			waterCounter = 0
   213 			SetTag(AddGear(0, 0, gtWaterUp, 0, 0, 0, 0), 1)
   221 			SetTag(AddGear(0, 0, gtWaterUp, 0, 0, 0, 0), 1)