121 professor.bot = AddHog(professor.name, 1, 300, "tophats") |
121 professor.bot = AddHog(professor.name, 1, 300, "tophats") |
122 AnimSetGearPosition(professor.bot, paoth1.x - 100, paoth1.y) |
122 AnimSetGearPosition(professor.bot, paoth1.x - 100, paoth1.y) |
123 HogTurnLeft(professor.bot, true) |
123 HogTurnLeft(professor.bot, true) |
124 professor.gear = professor.bot |
124 professor.gear = professor.bot |
125 for i=1,table.getn(thugs) do |
125 for i=1,table.getn(thugs) do |
126 thugs[i].gear = AddHog(loc("thug").." #"..i, 1, thugs[i].health, "war_desertgrenadier1") |
126 thugs[i].gear = AddHog(string.format(loc("Thug #%d"), i), 1, thugs[i].health, "war_desertgrenadier1") |
127 AnimSetGearPosition(thugs[i].gear, thugs[i].x, thugs[i].y) |
127 AnimSetGearPosition(thugs[i].gear, thugs[i].x, thugs[i].y) |
128 HogTurnLeft(thugs[i].gear, not thugs[i].turnLeft) |
128 HogTurnLeft(thugs[i].gear, not thugs[i].turnLeft) |
129 end |
129 end |
130 |
130 |
131 initCheckpoint("death01") |
131 initCheckpoint("death01") |
263 |
263 |
264 -------------- ACTIONS ------------------ |
264 -------------- ACTIONS ------------------ |
265 |
265 |
266 function heroDeath(gear) |
266 function heroDeath(gear) |
267 SendStat(siGameResult, loc("Hog Solo lost, try again!")) |
267 SendStat(siGameResult, loc("Hog Solo lost, try again!")) |
268 SendStat(siCustomAchievement, loc("To win the game you have to eliminate all your enemies")) |
268 SendStat(siCustomAchievement, loc("To win the game you have to eliminate all your enemies.")) |
269 SendStat(siPlayerKills,'1',teamC.name) |
269 SendStat(siPlayerKills,'1',teamC.name) |
270 SendStat(siPlayerKills,'0',teamA.name) |
270 SendStat(siPlayerKills,'0',teamA.name) |
271 EndGame() |
271 EndGame() |
272 end |
272 end |
273 |
273 |
274 function enemiesDeath(gear) |
274 function enemiesDeath(gear) |
275 saveCompletedStatus(6) |
275 saveCompletedStatus(6) |
276 SendStat(siGameResult, loc("Congratulations, you won!")) |
276 SendStat(siGameResult, loc("Congratulations, you won!")) |
277 SendStat(siCustomAchievement, loc("You have successfully eliminated Professor Hogevil")) |
277 SendStat(siCustomAchievement, loc("You have successfully eliminated Professor Hogevil.")) |
278 SendStat(siCustomAchievement, loc("You have rescued H and Dr.Cornelius")) |
278 SendStat(siCustomAchievement, loc("You have rescued H and Dr. Cornelius.")) |
279 SendStat(siCustomAchievement, loc("You have acquired the last device part")) |
279 SendStat(siCustomAchievement, loc("You have acquired the last device part.")) |
280 SendStat(siCustomAchievement, loc("Now go and play the menu mission to complete the campaign")) |
280 SendStat(siCustomAchievement, loc("Now go and play the menu mission to complete the campaign.")) |
281 SendStat(siPlayerKills,'1',teamA.name) |
281 SendStat(siPlayerKills,'1',teamA.name) |
282 SendStat(siPlayerKills,'0',teamC.name) |
282 SendStat(siPlayerKills,'0',teamC.name) |
283 EndGame() |
283 EndGame() |
284 end |
284 end |
285 |
285 |
294 |
294 |
295 function AnimationSetup() |
295 function AnimationSetup() |
296 -- DIALOG01, GAME START, INTRODUCTION |
296 -- DIALOG01, GAME START, INTRODUCTION |
297 AddSkipFunction(dialog01, Skipanim, {dialog01}) |
297 AddSkipFunction(dialog01, Skipanim, {dialog01}) |
298 table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}}) |
298 table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}}) |
299 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Somewhere in the uninhabitable Death Planet..."), 5000}}) |
299 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Somewhere on the uninhabitable Death Planet ..."), 5000}}) |
300 table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("Welcome Hog Solo, surprised to see me?"), SAY_SAY, 4000}}) |
300 table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("Welcome Hog Solo, surprised to see me?"), SAY_SAY, 4000}}) |
301 table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("As you can see I have survived our last encounter and I had time to plot my master plan!"), SAY_SAY, 4000}}) |
301 table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("As you can see I have survived our last encounter and I had time to plot my master plan!"), SAY_SAY, 4000}}) |
302 table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("I've thought that the best way to get the device is to let you collect most of the parts for me!"), SAY_SAY, 4000}}) |
302 table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("I've thought that the best way to get the device is to let you collect most of the parts for me!"), SAY_SAY, 4000}}) |
303 table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("So, now I got the last part and I have your friends captured..."), SAY_SAY, 4000}}) |
303 table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("So, now I got the last part and I have your friends captured."), SAY_SAY, 4000}}) |
304 table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("Will you give me the other parts?"), SAY_SAY, 4000}}) |
304 table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("Will you give me the other parts?"), SAY_SAY, 4000}}) |
305 table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}}) |
305 table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}}) |
306 table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("I will never hand you the parts!"), SAY_SAY, 4000}}) |
306 table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("I will never hand you the parts!"), SAY_SAY, 4000}}) |
307 table.insert(dialog01, {func = AnimWait, args = {professor.human, 3000}}) |
307 table.insert(dialog01, {func = AnimWait, args = {professor.human, 3000}}) |
308 table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("Then prepare for battle!"), SAY_SAY, 4000}}) |
308 table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("Then prepare for battle!"), SAY_SAY, 4000}}) |