share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/first_blood.lua
changeset 12624 705dde538519
parent 12606 f1e0fa009eb7
child 12794 bca911f8e804
equal deleted inserted replaced
12623:c8edce7e5f18 12624:705dde538519
   585   ShowMission(loc("First Blood"), loc("The Torment"),
   585   ShowMission(loc("First Blood"), loc("The Torment"),
   586     loc("Your next task is to collect some crates by using the rope!") .. "|" ..
   586     loc("Your next task is to collect some crates by using the rope!") .. "|" ..
   587     loc("Press [Left] and [Right] to change the difficulty.") .. "| |" ..
   587     loc("Press [Left] and [Right] to change the difficulty.") .. "| |" ..
   588     dstr .. "| |" ..
   588     dstr .. "| |" ..
   589     loc("Press [Attack] to begin."),
   589     loc("Press [Attack] to begin."),
   590     0, 300000)
   590     0, 9999000)
   591 end
   591 end
   592 
   592 
   593 function SetChoice()
   593 function SetChoice()
   594   AnimSetInputMask(0)
   594   AnimSetInputMask(0)
   595   difficultyChoice = true
   595   difficultyChoice = true
   685   if ShowAnimation() == false then
   685   if ShowAnimation() == false then
   686     return
   686     return
   687   end
   687   end
   688   ExecuteAfterAnimations()
   688   ExecuteAfterAnimations()
   689   CheckEvents()
   689   CheckEvents()
       
   690 end
       
   691 
       
   692 local choiceDialogTimer = 0
       
   693 function onGameTick20()
       
   694   -- Make sure the choice dialog never disappears while it is active
       
   695   if difficultyChoice then
       
   696     choiceDialogTimer = choiceDialogTimer + 20
       
   697     if choiceDialogTimer > 9990000 then
       
   698       ChoiceDialog()
       
   699       choiceDialogTimer = 0
       
   700     end
       
   701   end
   690 end
   702 end
   691 
   703 
   692 function onGearDelete(gear)
   704 function onGearDelete(gear)
   693   if gear == ropeCrate1 then
   705   if gear == ropeCrate1 then
   694     rope1Taken = true
   706     rope1Taken = true