32 hero.dead = false |
32 hero.dead = false |
33 teamA.name = loc("Hog Solo") |
33 teamA.name = loc("Hog Solo") |
34 teamA.color = tonumber("38D61C",16) -- green |
34 teamA.color = tonumber("38D61C",16) -- green |
35 -- way points |
35 -- way points |
36 local current waypoint = 1 |
36 local current waypoint = 1 |
37 local waypoints = { |
37 local waypoints = { |
38 [1] = {x=1450, y=140}, |
38 [1] = {x=1450, y=140}, |
39 [2] = {x=990, y=580}, |
39 [2] = {x=990, y=580}, |
40 [3] = {x=1650, y=950}, |
40 [3] = {x=1650, y=950}, |
41 [4] = {x=620, y=630}, |
41 [4] = {x=620, y=630}, |
42 [5] = {x=1470, y=540}, |
42 [5] = {x=1470, y=540}, |
68 SuddenDeathTurns = 1 |
68 SuddenDeathTurns = 1 |
69 WaterRise = 150 |
69 WaterRise = 150 |
70 HealthDecrease = 0 |
70 HealthDecrease = 0 |
71 Map = "desert02_map" |
71 Map = "desert02_map" |
72 Theme = "Desert" |
72 Theme = "Desert" |
73 |
73 |
74 -- Hog Solo |
74 -- Hog Solo |
75 AddTeam(teamA.name, teamA.color, "Bone", "Island", "HillBilly", "cm_birdy") |
75 AddTeam(teamA.name, teamA.color, "Bone", "Island", "HillBilly", "cm_birdy") |
76 hero.gear = AddHog(hero.name, 0, 100, "war_desertgrenadier1") |
76 hero.gear = AddHog(hero.name, 0, 100, "war_desertgrenadier1") |
77 AnimSetGearPosition(hero.gear, hero.x, hero.y) |
77 AnimSetGearPosition(hero.gear, hero.x, hero.y) |
78 HogTurnLeft(hero.gear, true) |
78 HogTurnLeft(hero.gear, true) |
79 |
79 |
80 initCheckpoint("desert02") |
80 initCheckpoint("desert02") |
81 |
81 |
82 AnimInit() |
82 AnimInit() |
83 AnimationSetup() |
83 AnimationSetup() |
84 end |
84 end |
85 |
85 |
86 function onGameStart() |
86 function onGameStart() |
87 AnimWait(hero.gear, 3000) |
87 AnimWait(hero.gear, 3000) |
88 FollowGear(hero.gear) |
88 FollowGear(hero.gear) |
89 |
89 |
90 AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 0) |
90 AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 0) |
91 AddEvent(onHeroSafe, {hero.gear}, heroSafe, {hero.gear}, 0) |
91 AddEvent(onHeroSafe, {hero.gear}, heroSafe, {hero.gear}, 0) |
92 |
92 |
93 SpawnHealthCrate(healthX, health1Y) |
93 SpawnHealthCrate(healthX, health1Y) |
94 SpawnHealthCrate(healthX, health2Y) |
94 SpawnHealthCrate(healthX, health2Y) |
95 |
95 |
96 AddAmmo(hero.gear, amRope, 99) |
96 AddAmmo(hero.gear, amRope, 99) |
97 |
97 |
98 SendHealthStatsOff() |
98 SendHealthStatsOff() |
99 AddAnim(dialog01) |
99 AddAnim(dialog01) |
100 end |
100 end |
101 |
101 |
102 function onNewTurn() |
102 function onNewTurn() |
172 -- DIALOG 01 - Start |
172 -- DIALOG 01 - Start |
173 AddSkipFunction(dialog01, Skipanim, {dialog01}) |
173 AddSkipFunction(dialog01, Skipanim, {dialog01}) |
174 table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}}) |
174 table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}}) |
175 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Many meters below the surface..."), 5000}}) |
175 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Many meters below the surface..."), 5000}}) |
176 table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("The tunnel is about to get flooded..."), SAY_THINK, 4000}}) |
176 table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("The tunnel is about to get flooded..."), SAY_THINK, 4000}}) |
177 table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("I have to reach the surface asap..."), SAY_THINK, 4000}}) |
177 table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("I have to reach the surface as quickly as I can..."), SAY_THINK, 4000}}) |
178 table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}}) |
178 table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}}) |
179 table.insert(dialog01, {func = challengeStart, args = {hero.gear}}) |
179 table.insert(dialog01, {func = challengeStart, args = {hero.gear}}) |
180 end |
180 end |
181 |
181 |
182 ------------------ Other Functions ------------------- |
182 ------------------ Other Functions ------------------- |