106 AnimInsertStepNext({func = AnimVisualGear, args = {dense, GetX(dense) + dif, GetY(dense) + dif, vgtSteam, 0, true}, swh = false}) |
106 AnimInsertStepNext({func = AnimVisualGear, args = {dense, GetX(dense) + dif, GetY(dense) + dif, vgtSteam, 0, true}, swh = false}) |
107 end |
107 end |
108 |
108 |
109 function AnimationSetup() |
109 function AnimationSetup() |
110 table.insert(startAnim, {func = AnimWait, args = {leaks, 4000}}) |
110 table.insert(startAnim, {func = AnimWait, args = {leaks, 4000}}) |
111 table.insert(startAnim, {func = AnimCaption, args = {leaks, "Back in the village, after telling the villagers about the threat...", 5000}}) |
111 table.insert(startAnim, {func = AnimCaption, args = {leaks, loc("Back in the village, after telling the villagers about the threat..."), 5000}}) |
112 table.insert(startAnim, {func = AnimCaption, args = {leaks, "Their buildings were very primitive back then, even for an uncivilised island.", 7000}}) |
112 table.insert(startAnim, {func = AnimCaption, args = {leaks, loc("Their buildings were very primitive back then, even for an uncivilised island."), 7000}}) |
113 table.insert(startAnim, {func = AnimSay, args = {chief, "Young one, you are telling us that they can instantly change location without a shaman?", SAY_SAY, 8000}}) |
113 table.insert(startAnim, {func = AnimSay, args = {chief, loc("Young one, you are telling us that they can instantly change location without a shaman?"), SAY_SAY, 8000}}) |
114 table.insert(startAnim, {func = AnimSay, args = {chief, "That is, indeed, very weird...", SAY_SAY, 3500}}) |
114 table.insert(startAnim, {func = AnimSay, args = {chief, loc("That is, indeed, very weird..."), SAY_SAY, 3500}}) |
115 table.insert(startAnim, {func = AnimSay, args = {buffalo, "If they try coming here, they can have a taste of my delicious knuckles!", SAY_SHOUT, 8000}}) |
115 table.insert(startAnim, {func = AnimSay, args = {buffalo, loc("If they try coming here, they can have a taste of my delicious knuckles!"), SAY_SHOUT, 8000}}) |
116 table.insert(startAnim, {func = AnimSay, args = {buffalo, "Haha!", SAY_SHOUT, 2000}}) |
116 table.insert(startAnim, {func = AnimSay, args = {buffalo, loc("Haha!"), SAY_SHOUT, 2000}}) |
117 if denseDead == false then |
117 if denseDead == false then |
118 table.insert(startAnim, {func = AnimSay, args = {dense, "I'm not sure about that!", SAY_SAY, 3400}}) |
118 table.insert(startAnim, {func = AnimSay, args = {dense, loc("I'm not sure about that!"), SAY_SAY, 3400}}) |
119 table.insert(startAnim, {func = AnimSay, args = {dense, "They have weapons we've never seen before!", SAY_SAY, 5000}}) |
119 table.insert(startAnim, {func = AnimSay, args = {dense, loc("They have weapons we've never seen before!"), SAY_SAY, 5000}}) |
120 table.insert(startAnim, {func = AnimSay, args = {dense, "Luckily, I've managed to snatch some of them.", SAY_SAY, 5000}}) |
120 table.insert(startAnim, {func = AnimSay, args = {dense, loc("Luckily, I've managed to snatch some of them."), SAY_SAY, 5000}}) |
121 table.insert(startAnim, {func = AnimCustomFunction, args = {dense, SpawnCrates, {1}}}) |
121 table.insert(startAnim, {func = AnimCustomFunction, args = {dense, SpawnCrates, {1}}}) |
122 table.insert(startAnim, {func = AnimSay, args = {dense, "Oops...I dropped them.", SAY_SAY, 3000}}) |
122 table.insert(startAnim, {func = AnimSay, args = {dense, loc("Oops...I dropped them."), SAY_SAY, 3000}}) |
123 else |
123 else |
124 table.insert(startAnim, {func = AnimSay, args = {leaks, "I'm not sure about that!", SAY_SAY, 3400}}) |
124 table.insert(startAnim, {func = AnimSay, args = {leaks, loc("I'm not sure about that!"), SAY_SAY, 3400}}) |
125 table.insert(startAnim, {func = AnimSay, args = {leaks, "They have weapons we've never seen before!", SAY_SAY, 5000}}) |
125 table.insert(startAnim, {func = AnimSay, args = {leaks, loc("They have weapons we've never seen before!"), SAY_SAY, 5000}}) |
126 table.insert(startAnim, {func = AnimCustomFunction, args = {leaks, SpawnCrates, {1}}}) |
126 table.insert(startAnim, {func = AnimCustomFunction, args = {leaks, SpawnCrates, {1}}}) |
127 table.insert(startAnim, {func = AnimWait, args = {leaks, 1000}}) |
127 table.insert(startAnim, {func = AnimWait, args = {leaks, 1000}}) |
128 table.insert(startAnim, {func = AnimSay, args = {leaks, "They keep appearing like this. It's weird!", SAY_SAY, 5000}}) |
128 table.insert(startAnim, {func = AnimSay, args = {leaks, loc("They keep appearing like this. It's weird!"), SAY_SAY, 5000}}) |
129 end |
129 end |
130 table.insert(startAnim, {func = AnimSay, args = {chief, "Did anyone follow you?", SAY_SAY, 3000}}) |
130 table.insert(startAnim, {func = AnimSay, args = {chief, loc("Did anyone follow you?"), SAY_SAY, 3000}}) |
131 table.insert(startAnim, {func = AnimSay, args = {leaks, "No, we made sure of that!", SAY_SAY, 3500}}) |
131 table.insert(startAnim, {func = AnimSay, args = {leaks, loc("No, we made sure of that!"), SAY_SAY, 3500}}) |
132 table.insert(startAnim, {func = AnimCustomFunction, args = {leaks, SpawnHealthCrates, {1}}}) |
132 table.insert(startAnim, {func = AnimCustomFunction, args = {leaks, SpawnHealthCrates, {1}}}) |
133 table.insert(startAnim, {func = AnimWait, args = {leaks, 1000}}) |
133 table.insert(startAnim, {func = AnimWait, args = {leaks, 1000}}) |
134 table.insert(startAnim, {func = AnimSay, args = {chief, "First aid kits?!", SAY_SAY, 3000}}) |
134 table.insert(startAnim, {func = AnimSay, args = {chief, loc("First aid kits?!"), SAY_SAY, 3000}}) |
135 table.insert(startAnim, {func = AnimSay, args = {leaks, "I've seen this before. They just appear out of thin air.", SAY_SAY, 7000}}) |
135 table.insert(startAnim, {func = AnimSay, args = {leaks, loc("I've seen this before. They just appear out of thin air."), SAY_SAY, 7000}}) |
136 table.insert(startAnim, {func = AnimMove, args = {water, "left", 3000, 0}}) |
136 table.insert(startAnim, {func = AnimMove, args = {water, "left", 3000, 0}}) |
137 table.insert(startAnim, {func = AnimJump, args = {water, "long"}}) |
137 table.insert(startAnim, {func = AnimJump, args = {water, "long"}}) |
138 table.insert(startAnim, {func = AnimMove, args = {water, "left", 2655, 0}}) |
138 table.insert(startAnim, {func = AnimMove, args = {water, "left", 2655, 0}}) |
139 table.insert(startAnim, {func = AnimTurn, args = {water, "Right"}}) |
139 table.insert(startAnim, {func = AnimTurn, args = {water, "Right"}}) |
140 table.insert(startAnim, {func = AnimJump, args = {water, "back"}}) |
140 table.insert(startAnim, {func = AnimJump, args = {water, "back"}}) |
141 table.insert(startAnim, {func = AnimJump, args = {water, "back"}}) |
141 table.insert(startAnim, {func = AnimJump, args = {water, "back"}}) |
142 table.insert(startAnim, {func = AnimTurn, args = {water, "Left"}}) |
142 table.insert(startAnim, {func = AnimTurn, args = {water, "Left"}}) |
143 table.insert(startAnim, {func = AnimMove, args = {water, "left", 2467, 754}}) |
143 table.insert(startAnim, {func = AnimMove, args = {water, "left", 2467, 754}}) |
144 table.insert(startAnim, {func = AnimSay, args = {water, "Hey guys!", SAY_SAY, 2500}}) |
144 table.insert(startAnim, {func = AnimSay, args = {water, loc("Hey guys!"), SAY_SAY, 2500}}) |
145 table.insert(startAnim, {func = AnimTurn, args = {chief, "Right"}}) |
145 table.insert(startAnim, {func = AnimTurn, args = {chief, "Right"}}) |
146 table.insert(startAnim, {func = AnimSay, args = {chief, "...", SAY_THINK, 1500}}) |
146 table.insert(startAnim, {func = AnimSay, args = {chief, loc("..."), SAY_THINK, 1500}}) |
147 table.insert(startAnim, {func = AnimSay, args = {chief, "Where have you been?", SAY_SAY, 4000}}) |
147 table.insert(startAnim, {func = AnimSay, args = {chief, loc("Where have you been?"), SAY_SAY, 4000}}) |
148 table.insert(startAnim, {func = AnimSay, args = {water, "Just on a walk.", SAY_SAY, 3000}}) |
148 table.insert(startAnim, {func = AnimSay, args = {water, loc("Just on a walk."), SAY_SAY, 3000}}) |
149 table.insert(startAnim, {func = AnimSay, args = {chief, "You have chosen the perfect moment to leave.", SAY_SAY, 6000}}) |
149 table.insert(startAnim, {func = AnimSay, args = {chief, loc("You have chosen the perfect moment to leave."), SAY_SAY, 6000}}) |
150 table.insert(startAnim, {func = AnimCustomFunction, args = {chief, RestoreWave, {1}}}) |
150 table.insert(startAnim, {func = AnimCustomFunction, args = {chief, RestoreWave, {1}}}) |
151 for i = 1, 4 do |
151 for i = 1, 4 do |
152 table.insert(startAnim, {func = AnimOutOfNowhere, args = {cannibals[i], unpack(cannibalPos[i])}}) |
152 table.insert(startAnim, {func = AnimOutOfNowhere, args = {cannibals[i], unpack(cannibalPos[i])}}) |
153 end |
153 end |
154 table.insert(startAnim, {func = AnimWait, args = {chief, 1500}}) |
154 table.insert(startAnim, {func = AnimWait, args = {chief, 1500}}) |
155 table.insert(startAnim, {func = AnimSay, args = {leaks, "HOW DO THEY KNOW WHERE WE ARE???", SAY_SHOUT, 5000}}) |
155 table.insert(startAnim, {func = AnimSay, args = {leaks, loc("HOW DO THEY KNOW WHERE WE ARE???"), SAY_SHOUT, 5000}}) |
156 table.insert(startAnim, {func = AnimSay, args = {chief, "We have to protect the village!", SAY_SAY, 5000}}) |
156 table.insert(startAnim, {func = AnimSay, args = {chief, loc("We have to protect the village!"), SAY_SAY, 5000}}) |
157 table.insert(startAnim, {func = AnimSwitchHog, args = {leaks}}) |
157 table.insert(startAnim, {func = AnimSwitchHog, args = {leaks}}) |
158 AddSkipFunction(startAnim, SkipStartAnim, {}) |
158 AddSkipFunction(startAnim, SkipStartAnim, {}) |
159 |
159 |
160 table.insert(wave2Anim, {func = AnimCustomFunction, args = {leaks, RestoreWave, {2}}, swh = false}) |
160 table.insert(wave2Anim, {func = AnimCustomFunction, args = {leaks, RestoreWave, {2}}, swh = false}) |
161 for i = 5, 8 do |
161 for i = 5, 8 do |
180 end |
180 end |
181 if chiefDead ~= true then |
181 if chiefDead ~= true then |
182 hogs[2] = chief |
182 hogs[2] = chief |
183 end |
183 end |
184 table.insert(finalAnim, {func = AnimCustomFunction, args = {hogs[1], CondNeedToTurn, {hogs[1], hogs[2]}}}) |
184 table.insert(finalAnim, {func = AnimCustomFunction, args = {hogs[1], CondNeedToTurn, {hogs[1], hogs[2]}}}) |
185 table.insert(finalAnim, {func = AnimSay, args = {hogs[1], "We can't hold them up much longer!", SAY_SAY, 5000}}) |
185 table.insert(finalAnim, {func = AnimSay, args = {hogs[1], loc("We can't hold them up much longer!"), SAY_SAY, 5000}}) |
186 table.insert(finalAnim, {func = AnimSay, args = {hogs[1], "We need to move!", SAY_SAY, 3000}}) |
186 table.insert(finalAnim, {func = AnimSay, args = {hogs[1], loc("We need to move!"), SAY_SAY, 3000}}) |
187 table.insert(finalAnim, {func = AnimSay, args = {hogs[2], "But where can we go?", SAY_SAY, 3000}}) |
187 table.insert(finalAnim, {func = AnimSay, args = {hogs[2], loc("But where can we go?"), SAY_SAY, 3000}}) |
188 table.insert(finalAnim, {func = AnimSay, args = {hogs[1], "To the caves...", SAY_SAY, 2500}}) |
188 table.insert(finalAnim, {func = AnimSay, args = {hogs[1], loc("To the caves..."), SAY_SAY, 2500}}) |
189 table.insert(finalAnim, {func = AnimSay, args = {hogs[2], "Good idea, they'll never find us there!", SAY_SAY, 5000}}) |
189 table.insert(finalAnim, {func = AnimSay, args = {hogs[2], loc("Good idea, they'll never find us there!"), SAY_SAY, 5000}}) |
190 else |
190 else |
191 for i = 1, 5 do |
191 for i = 1, 5 do |
192 if nativesDead[i] ~= true then |
192 if nativesDead[i] ~= true then |
193 hogs[1] = natives[i] |
193 hogs[1] = natives[i] |
194 end |
194 end |
195 end |
195 end |
196 table.insert(finalAnim, {func = AnimSay, args = {hogs[1], "I need to move the tribe!", SAY_THINK, 4000}}) |
196 table.insert(finalAnim, {func = AnimSay, args = {hogs[1], loc("I need to move the tribe!"), SAY_THINK, 4000}}) |
197 table.insert(finalAnim, {func = AnimSay, args = {hogs[1], "The caves are well hidden, they won't find us there!", SAY_THINK, 7000}}) |
197 table.insert(finalAnim, {func = AnimSay, args = {hogs[1], loc("The caves are well hidden, they won't find us there!"), SAY_THINK, 7000}}) |
198 end |
198 end |
199 end |
199 end |
200 -----------------------------Misc-------------------------------------- |
200 -----------------------------Misc-------------------------------------- |
201 function RestoreWave(index) |
201 function RestoreWave(index) |
202 for i = (index - 1) * 4 + 1, index * 4 do |
202 for i = (index - 1) * 4 + 1, index * 4 do |
241 AddAmmo(cannibals[2], amMolotov, 2) |
241 AddAmmo(cannibals[2], amMolotov, 2) |
242 AddAmmo(cannibals[2], amFlamethrower, 3) |
242 AddAmmo(cannibals[2], amFlamethrower, 3) |
243 end |
243 end |
244 |
244 |
245 function AddHogs() |
245 function AddHogs() |
246 AddTeam("Natives", 2567585, "Bone", "Island", "HillBilly", "cm_birdy") |
246 AddTeam(loc("Natives"), 29439, "Bone", "Island", "HillBilly", "cm_birdy") |
247 leaks = AddHog("Leaks A Lot", 0, 100, "Rambo") |
247 leaks = AddHog(loc("Leaks A Lot"), 0, 100, "Rambo") |
248 dense = AddHog("Dense Cloud", 0, 100, "RobinHood") |
248 dense = AddHog(loc("Dense Cloud"), 0, 100, "RobinHood") |
249 water = AddHog("Fiery Water", 0, 100, "pirate_jack") |
249 water = AddHog(loc("Fiery Water"), 0, 100, "pirate_jack") |
250 buffalo = AddHog("Raging Buffalo", 0, 100, "zoo_Bunny") |
250 buffalo = AddHog(loc("Raging Buffalo"), 0, 100, "zoo_Bunny") |
251 chief = AddHog("Righteous Beard", 0, 100, "IndianChief") |
251 chief = AddHog(loc("Righteous Beard"), 0, 100, "IndianChief") |
252 natives = {leaks, dense, water, buffalo, chief} |
252 natives = {leaks, dense, water, buffalo, chief} |
253 nativesNum = 5 |
253 nativesNum = 5 |
254 |
254 |
255 AddTeam("Light Cannfantry", 14483456, "Skull", "Island", "Pirate", "cm_vampire") |
255 AddTeam(loc("Light Cannfantry"), 14483456, "Skull", "Island", "Pirate", "cm_vampire") |
256 for i = 1, 4 do |
256 for i = 1, 4 do |
257 cannibals[i] = AddHog(HogNames[i], 3, 70, "Zombi") |
257 cannibals[i] = AddHog(HogNames[i], 3, 70, "Zombi") |
258 end |
258 end |
259 |
259 |
260 AddTeam("Heavy Cannfantry", 14483456, "Skull", "Island", "Pirate", "cm_vampire") |
260 AddTeam(loc("Heavy Cannfantry"), 14483456, "Skull", "Island", "Pirate", "cm_vampire") |
261 for i = 5, 8 do |
261 for i = 5, 8 do |
262 cannibals[i] = AddHog(HogNames[i], 2, 100, "vampirichog") |
262 cannibals[i] = AddHog(HogNames[i], 2, 100, "vampirichog") |
263 end |
263 end |
264 |
264 |
265 AddTeam("011101001", 14483456, "ring", "UFO", "Robot", "cm_star") |
265 AddTeam(loc("011101001"), 14483456, "ring", "UFO", "Robot", "cm_star") |
266 cyborg = AddHog("Unit 334a$7%;.*", 0, 200, "cyborg1") |
266 cyborg = AddHog(loc("Unit 334a$7%;.*"), 0, 200, "cyborg1") |
267 |
267 |
268 SetGearPosition(leaks, unpack(leaksPos)) |
268 SetGearPosition(leaks, unpack(leaksPos)) |
269 SetGearPosition(dense, unpack(densePos)) |
269 SetGearPosition(dense, unpack(densePos)) |
270 SetGearPosition(water, unpack(waterPos)) |
270 SetGearPosition(water, unpack(waterPos)) |
271 HogTurnLeft(water, true) |
271 HogTurnLeft(water, true) |