share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon02.lua
changeset 14488 7bb7e5e54f70
parent 13740 2bb7141496a9
child 14576 2087e50e03e2
equal deleted inserted replaced
14487:d72fb761aa59 14488:7bb7e5e54f70
     1 ------------------- ABOUT ----------------------
     1 ------------------- ABOUT ----------------------
     2 --
     2 --
     3 -- Hog Solo has to catch the other hog in order
     3 -- The hero has to catch the other hog in order
     4 -- to get informations about the origin of Pr. Hogevil
     4 -- to get informations about the origin of Pr. Hogevil
     5 
     5 
     6 HedgewarsScriptLoad("/Scripts/Locale.lua")
     6 HedgewarsScriptLoad("/Scripts/Locale.lua")
     7 HedgewarsScriptLoad("/Scripts/Animate.lua")
     7 HedgewarsScriptLoad("/Scripts/Animate.lua")
     8 HedgewarsScriptLoad("/Missions/Campaign/A_Space_Adventure/global_functions.lua")
     8 HedgewarsScriptLoad("/Missions/Campaign/A_Space_Adventure/global_functions.lua")
    61 	Theme = "Cheese"
    61 	Theme = "Cheese"
    62 	-- Disable Sudden Death
    62 	-- Disable Sudden Death
    63 	WaterRise = 0
    63 	WaterRise = 0
    64 	HealthDecrease = 0
    64 	HealthDecrease = 0
    65 
    65 
    66 	-- Hog Solo
    66 	-- Hero
    67 	AddTeam(teamA.name, teamA.color, "Simple", "Island", "Default", "hedgewars")
    67 	teamA.name = AddMissionTeam(teamA.color)
    68 	hero.gear = AddHog(hero.name, 0, 1, "war_desertgrenadier1")
    68 	hero.gear = AddMissionHog(1)
       
    69 	hero.name = GetHogName(hero.gear)
    69 	AnimSetGearPosition(hero.gear, hero.x, hero.y)
    70 	AnimSetGearPosition(hero.gear, hero.x, hero.y)
    70 	-- Crazy Runner
    71 	-- Crazy Runner
    71 	AddTeam(teamB.name, teamB.color, "ring", "Island", "Default", "cm_sonic")
    72 	teamB.name = AddTeam(teamB.name, teamB.color, "ring", "Island", "Default", "cm_sonic")
    72 	runner.gear = AddHog(runner.name, 0, 100, "sth_Sonic")
    73 	runner.gear = AddHog(runner.name, 0, 100, "sth_Sonic")
    73 	AnimSetGearPosition(runner.gear, runner.places[1].x, runner.places[1].y)
    74 	AnimSetGearPosition(runner.gear, runner.places[1].x, runner.places[1].y)
    74 	HogTurnLeft(runner.gear, true)
    75 	HogTurnLeft(runner.gear, true)
    75 
    76 
    76 	initCheckpoint("moon02")
    77 	initCheckpoint("moon02")
   179 	table.insert(dialog01, {func = AnimSay, args = {runner.gear, loc("We'll play a game first."), SAY_SAY, 3000}})
   180 	table.insert(dialog01, {func = AnimSay, args = {runner.gear, loc("We'll play a game first."), SAY_SAY, 3000}})
   180 	table.insert(dialog01, {func = AnimSay, args = {runner.gear, loc("I'll let you know whatever I know about him if you manage to catch me 3 times."), SAY_SAY, 4000}})
   181 	table.insert(dialog01, {func = AnimSay, args = {runner.gear, loc("I'll let you know whatever I know about him if you manage to catch me 3 times."), SAY_SAY, 4000}})
   181 	table.insert(dialog01, {func = AnimSay, args = {runner.gear, loc("Let's go!"), SAY_SAY, 2000}})
   182 	table.insert(dialog01, {func = AnimSay, args = {runner.gear, loc("Let's go!"), SAY_SAY, 2000}})
   182 	table.insert(dialog01, {func = ShowMission, args = goals[dialog01]})
   183 	table.insert(dialog01, {func = ShowMission, args = goals[dialog01]})
   183 	table.insert(dialog01, {func = moveRunner, args = {}})
   184 	table.insert(dialog01, {func = moveRunner, args = {}})
   184 	-- DIALOG 02 - Hog Solo story
   185 	-- DIALOG 02 - Professor Hogevil story
   185 	AddSkipFunction(dialog02, Skipanim, {dialog02})
   186 	AddSkipFunction(dialog02, Skipanim, {dialog02})
   186 	table.insert(dialog02, {func = AnimWait, args = {hero.gear, 3200}})
   187 	table.insert(dialog02, {func = AnimWait, args = {hero.gear, 3200}})
   187 	table.insert(dialog02, {func = AnimCaption, args = {hero.gear, loc("The truth about Professor Hogevil"), 5000}})
   188 	table.insert(dialog02, {func = AnimCaption, args = {hero.gear, loc("The truth about Professor Hogevil"), 5000}})
   188 	table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("Amazing! I was never beaten in a race before!"), SAY_SAY, 4000}})
   189 	table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("Amazing! I was never beaten in a race before!"), SAY_SAY, 4000}})
   189 	table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("So, let me tell you what I know about Professor Hogevil."), SAY_SAY, 4000}})
   190 	table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("So, let me tell you what I know about Professor Hogevil."), SAY_SAY, 4000}})