302 table.insert(wave2Anim, {func = AnimOutOfNowhere, args = {cannibals[6], unpack(cannibalPos[6])}}) |
304 table.insert(wave2Anim, {func = AnimOutOfNowhere, args = {cannibals[6], unpack(cannibalPos[6])}}) |
303 table.insert(wave2Anim, {func = AnimSay, args = {speakerHog, loc("Look out! There's more of them!"), SAY_SHOUT, 5000}}) |
305 table.insert(wave2Anim, {func = AnimSay, args = {speakerHog, loc("Look out! There's more of them!"), SAY_SHOUT, 5000}}) |
304 AddSkipFunction(wave2Anim, SkipWave2Anim, {}) |
306 AddSkipFunction(wave2Anim, SkipWave2Anim, {}) |
305 end |
307 end |
306 |
308 |
|
309 function PutCircles() |
|
310 if circlesPut then |
|
311 return |
|
312 end |
|
313 vCircs[1] = AddVisualGear(0,0,vgtCircle,0,true) |
|
314 vCircs[2] = AddVisualGear(0,0,vgtCircle,0,true) |
|
315 vCircs[3] = AddVisualGear(0,0,vgtCircle,0,true) |
|
316 SetVisualGearValues(vCircs[1], cannibalPos[7][1], cannibalPos[7][2], 100, 255, 1, 10, 0, 120, 3, 0xff00ffff) |
|
317 SetVisualGearValues(vCircs[2], cannibalPos[8][1], cannibalPos[8][2], 100, 255, 1, 10, 0, 120, 3, 0xff00ffff) |
|
318 SetVisualGearValues(vCircs[3], cannibalPos[9][1], cannibalPos[9][2], 100, 255, 1, 10, 0, 120, 3, 0xff00ffff) |
|
319 circlesPut = true |
|
320 end |
|
321 |
307 function SetupWave2DeadAnim() |
322 function SetupWave2DeadAnim() |
308 for i = 7, 1, -1 do |
323 for i = 7, 1, -1 do |
309 if nativeDead[i] ~= true then |
324 if nativeDead[i] ~= true then |
310 deployedHog = natives[i] |
325 deployedHog = natives[i] |
311 end |
326 end |
319 table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], loc("Oh, silly me! I forgot that I'm the shaman."), SAY_THINK, 6000}}) |
334 table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], loc("Oh, silly me! I forgot that I'm the shaman."), SAY_THINK, 6000}}) |
320 table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {natives[wiseNum], TeleportNatives, {}}}) |
335 table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {natives[wiseNum], TeleportNatives, {}}}) |
321 table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {natives[wiseNum], TurnNatives, {natives[wiseNum]}}}) |
336 table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {natives[wiseNum], TurnNatives, {natives[wiseNum]}}}) |
322 table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {natives[wiseNum], CondNeedToTurn, {natives[wiseNum], deployedHog}}}) |
337 table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {natives[wiseNum], CondNeedToTurn, {natives[wiseNum], deployedHog}}}) |
323 table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], loc("I sense another wave of cannibals heading our way!"), SAY_SAY, 6500}}) |
338 table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], loc("I sense another wave of cannibals heading our way!"), SAY_SAY, 6500}}) |
324 table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], loc("I feel something...a place! They will arrive near the graves!"), SAY_SAY, 7500}}) |
339 table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], loc("I feel something...a place! They will arrive near the circles!"), SAY_SAY, 7500}}) |
325 table.insert(wave2DeadAnim, {func = AddGear, swh = false, args = {cannibalPos[7][1], cannibalPos[7][2], gtGrave, 0, 0, 0, 0}}) |
340 table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {natives[wiseNum], PutCircles, {}}}) |
326 table.insert(wave2DeadAnim, {func = AddGear, swh = false, args = {cannibalPos[8][1], cannibalPos[8][2], gtGrave, 0, 0, 0, 0}}) |
341 table.insert(wave2DeadAnim, {func = AnimFollowGear, swh = false, args = {vCircs[1]}}) |
327 table.insert(wave2DeadAnim, {func = AddGear, swh = false, args = {cannibalPos[9][1], cannibalPos[9][2], gtGrave, 0, 0, 0, 0}}) |
342 table.insert(wave2DeadAnim, {func = AnimWait, args = {natives[wiseNum], 1500}}) |
328 table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], loc("We need to prevent their arrival!"), SAY_SAY, 4500}}) |
343 table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], loc("We need to prevent their arrival!"), SAY_SAY, 4500}}) |
329 table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], loc("Go, quick!"), SAY_SAY, 2500}}) |
344 table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], loc("Go, quick!"), SAY_SAY, 2500}}) |
330 table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {natives[wiseNum], DeployHog, {}}}) |
345 table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {natives[wiseNum], DeployHog, {}}}) |
331 table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {natives[wiseNum], RestoreCyborg, {}}}) |
346 table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {natives[wiseNum], RestoreCyborg, {}}}) |
332 table.insert(wave2DeadAnim, {func = AnimOutOfNowhere, swh = false, args = {cyborg, cyborgPos2[1], cyborgPos2[2]}}) |
347 table.insert(wave2DeadAnim, {func = AnimOutOfNowhere, swh = false, args = {cyborg, cyborgPos2[1], cyborgPos2[2]}}) |
340 table.insert(wave2DeadAnim, {func = AnimCustomFunction, swh = false, args = {cyborg, HideCyborg, {}}}) |
355 table.insert(wave2DeadAnim, {func = AnimCustomFunction, swh = false, args = {cyborg, HideCyborg, {}}}) |
341 else |
356 else |
342 table.insert(wave2DeadAnim, {func = AnimWait, args = {natives[wiseNum], 1500}}) |
357 table.insert(wave2DeadAnim, {func = AnimWait, args = {natives[wiseNum], 1500}}) |
343 table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], loc("What a strange feeling!"), SAY_THINK, 3000}}) |
358 table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], loc("What a strange feeling!"), SAY_THINK, 3000}}) |
344 table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], loc("I sense another wave of cannibals heading my way!"), SAY_THINK, 6500}}) |
359 table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], loc("I sense another wave of cannibals heading my way!"), SAY_THINK, 6500}}) |
345 table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], loc("I feel something...a place! They will arrive near the graves!"), SAY_SAY, 7500}}) |
360 table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], loc("I feel something...a place! They will arrive near the circles!"), SAY_SAY, 7500}}) |
346 table.insert(wave2DeadAnim, {func = AddGear, swh = false, args = {cannibalPos[7][1], cannibalPos[7][2], gtGrave, 0, 0, 0, 0}}) |
361 table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {natives[wiseNum], PutCircles, {}}}) |
347 table.insert(wave2DeadAnim, {func = AddGear, swh = false, args = {cannibalPos[8][1], cannibalPos[8][2], gtGrave, 0, 0, 0, 0}}) |
362 table.insert(wave2DeadAnim, {func = AnimFollowGear, swh = false, args = {vCircs[1]}}) |
348 table.insert(wave2DeadAnim, {func = AddGear, swh = false, args = {cannibalPos[9][1], cannibalPos[9][2], gtGrave, 0, 0, 0, 0}}) |
|
349 table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], loc("I need to prevent their arrival!"), SAY_THINK, 4500}}) |
363 table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], loc("I need to prevent their arrival!"), SAY_THINK, 4500}}) |
350 table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], loc("If only I had a way..."), SAY_THINK, 3000}}) |
364 table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], loc("If only I had a way..."), SAY_THINK, 3000}}) |
351 table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], loc("Oh, silly me! I forgot that I'm the shaman."), SAY_THINK, 6000}}) |
365 table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], loc("Oh, silly me! I forgot that I'm the shaman."), SAY_THINK, 6000}}) |
352 end |
366 end |
353 else |
367 else |
354 table.insert(wave2DeadAnim, {func = AnimWait, args = {cyborg, 1500}}) |
368 table.insert(wave2DeadAnim, {func = AnimWait, args = {cyborg, 1500}}) |
355 table.insert(wave2DeadAnim, {func = AnimCustomFunction, swh = false, args = {cyborg, RestoreCyborg, {}}}) |
369 table.insert(wave2DeadAnim, {func = AnimCustomFunction, swh = false, args = {cyborg, RestoreCyborg, {}}}) |
356 table.insert(wave2DeadAnim, {func = AnimOutOfNowhere, args = {cyborg, cyborgPos2[1], cyborgPos2[2]}}) |
370 table.insert(wave2DeadAnim, {func = AnimOutOfNowhere, args = {cyborg, cyborgPos2[1], cyborgPos2[2]}}) |
|
371 table.insert(wave2DeadAnim, {func = AnimTurn, args = {cyborg, "Left"}}) |
357 table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {cyborg, TeleportNatives, {}}}) |
372 table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {cyborg, TeleportNatives, {}}}) |
358 table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {cyborg, TurnNatives, {cyborg}}}) |
373 table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {cyborg, TurnNatives, {cyborg}}}) |
359 table.insert(wave2DeadAnim, {func = AnimSay, args = {cyborg, loc("Oh, my! This is even more entertaining than I've expected!"), SAY_SAY, 7500}}) |
374 table.insert(wave2DeadAnim, {func = AnimSay, args = {cyborg, loc("Oh, my! This is even more entertaining than I've expected!"), SAY_SAY, 7500}}) |
360 table.insert(wave2DeadAnim, {func = AnimSay, args = {cyborg, loc("You might want to find a way to instantly kill arriving cannibals!"), SAY_SAY, 8000}}) |
375 table.insert(wave2DeadAnim, {func = AnimSay, args = {cyborg, loc("You might want to find a way to instantly kill arriving cannibals!"), SAY_SAY, 8000}}) |
361 table.insert(wave2DeadAnim, {func = AnimSay, args = {cyborg, loc("I believe there's more of them."), SAY_SAY, 4000}}) |
376 table.insert(wave2DeadAnim, {func = AnimSay, args = {cyborg, loc("I believe there's more of them."), SAY_SAY, 4000}}) |
362 table.insert(wave2DeadAnim, {func = AnimSay, args = {cyborg, loc("I marked the place of their arrival. You're welcome!"), SAY_SAY, 6000}}) |
377 table.insert(wave2DeadAnim, {func = AnimSay, args = {cyborg, loc("I marked the place of their arrival. You're welcome!"), SAY_SAY, 6000}}) |
363 table.insert(wave2DeadAnim, {func = AddGear, swh = false, args = {cannibalPos[7][1], cannibalPos[7][2], gtGrave, 0, 0, 0, 0}}) |
378 table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {natives[wiseNum], PutCircles, {}}}) |
364 table.insert(wave2DeadAnim, {func = AddGear, swh = false, args = {cannibalPos[8][1], cannibalPos[8][2], gtGrave, 0, 0, 0, 0}}) |
379 table.insert(wave2DeadAnim, {func = AnimFollowGear, swh = false, args = {vCircs[1]}}) |
365 table.insert(wave2DeadAnim, {func = AddGear, swh = false, args = {cannibalPos[9][1], cannibalPos[9][2], gtGrave, 0, 0, 0, 0}}) |
|
366 table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {deployedHog, DeployHog, {}}}) |
380 table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {deployedHog, DeployHog, {}}}) |
367 if nativesNum > 1 then |
381 if nativesNum > 1 then |
368 -- table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {natives[wiseNum], RestoreCyborg, {}}}) |
382 -- table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {natives[wiseNum], RestoreCyborg, {}}}) |
369 -- table.insert(wave2DeadAnim, {func = AnimOutOfNowhere, swh = false, args = {cyborg, cyborgPos2[1], cyborgPos2[2]}}) |
383 -- table.insert(wave2DeadAnim, {func = AnimOutOfNowhere, swh = false, args = {cyborg, cyborgPos2[1], cyborgPos2[2]}}) |
370 -- table.insert(wave2DeadAnim, {func = AnimTurn, args = {cyborg, "Left"}}) |
384 -- table.insert(wave2DeadAnim, {func = AnimTurn, args = {cyborg, "Left"}}) |
895 end |
896 end |
896 |
897 |
897 |
898 |
898 AddTeam(loc("Assault Team"), 14483456, "Skull", "Island", "Pirate", "cm_vampire") |
899 AddTeam(loc("Assault Team"), 14483456, "Skull", "Island", "Pirate", "cm_vampire") |
899 for i = 1, 6 do |
900 for i = 1, 6 do |
900 cannibals[i] = AddHog(cannibalNames[i], 1, 50, "vampirichog") |
901 -- cannibals[i] = AddHog(cannibalNames[i], 1, 50, "vampirichog") |
|
902 cannibals[i] = AddHog(cannibalNames[i], 1, 5, "vampirichog") |
901 end |
903 end |
902 |
904 |
903 AddTeam(loc("Reinforcements"), 14483456, "Skull", "Island", "Pirate", "cm_vampire") |
905 AddTeam(loc("Reinforcements"), 14483456, "Skull", "Island", "Pirate", "cm_vampire") |
904 for i = 7, 9 do |
906 for i = 7, 9 do |
905 cannibals[i] = AddHog(cannibalNames[i], 1, 50, "vampirichog") |
907 -- cannibals[i] = AddHog(cannibalNames[i], 1, 50, "vampirichog") |
|
908 cannibals[i] = AddHog(cannibalNames[i], 1, 5, "vampirichog") |
906 end |
909 end |
907 |
910 |
908 AddTeam(loc("011101001"), 14483456, "ring", "UFO", "Robot", "cm_star") |
911 AddTeam(loc("011101001"), 14483456, "ring", "UFO", "Robot", "cm_star") |
909 cyborg = AddHog(loc("Unit 334a$7%;.*"), 0, 200, "cyborg1") |
912 cyborg = AddHog(loc("Unit 334a$7%;.*"), 0, 200, "cyborg1") |
910 |
913 |
911 for i = 1, 9 do |
914 for i = 1, 9 do |
912 SetGearPosition(natives[i], unpack(nativePos[i])) |
915 AnimSetGearPosition(natives[i], unpack(nativePos[i])) |
913 AnimTurn(natives[i], nativeDir[i]) |
916 AnimTurn(natives[i], nativeDir[i]) |
914 end |
917 end |
915 |
918 |
916 SetGearPosition(cyborg, 0, 0) |
919 AnimSetGearPosition(cyborg, 0, 0) |
917 |
920 |
918 for i = 1, 9 do |
921 for i = 1, 9 do |
919 SetGearPosition(cannibals[i], unpack(cannibalPos[i])) |
922 AnimSetGearPosition(cannibals[i], unpack(cannibalPos[i])) |
920 AnimTurn(cannibals[i], cannibalDir[i]) |
923 AnimTurn(cannibals[i], cannibalDir[i]) |
921 end |
924 end |
922 end |
925 end |
923 |
926 |
924 function CondNeedToTurn(hog1, hog2) |
927 function CondNeedToTurn(hog1, hog2) |