author | Wuzzy <almikes@aol.com> |
Wed, 26 Apr 2017 23:05:05 +0200 | |
changeset 12344 | 877f55c77a3f |
parent 12225 | 93079fecbc77 |
child 13065 | a297e06d1607 |
permissions | -rw-r--r-- |
11015 | 1 |
HedgewarsScriptLoad("/Scripts/Locale.lua") |
2 |
||
3 |
local player = nil |
|
4 |
local RCGear = nil |
|
5 |
local planesUsed = 0 |
|
6 |
local planeTimer = 0 |
|
7 |
local planeUhOh = false |
|
8 |
local cratesLeft = 0 |
|
9 |
local crateStreak = 0 |
|
10 |
local longestCrateStreak = 0 |
|
11 |
local commentTimer = 0 |
|
12 |
local missiles = 0 |
|
13 |
local totalMissiles = 0 |
|
14 |
local missileScanTimer = 0 |
|
15 |
local nextComment = sndNone |
|
16 |
||
17 |
function onGameInit() |
|
18 |
||
19 |
Seed = 1 |
|
20 |
GameFlags = gfInfAttack + gfInvulnerable + gfOneClanMode + gfSolidLand |
|
21 |
||
12225
93079fecbc77
Set infinite turn time in RC Plane Challenge
Wuzzy <almikes@aol.com>
parents:
12224
diff
changeset
|
22 |
-- Basically unlimited turn time |
93079fecbc77
Set infinite turn time in RC Plane Challenge
Wuzzy <almikes@aol.com>
parents:
12224
diff
changeset
|
23 |
TurnTime = 100000000 |
11015 | 24 |
|
25 |
Map = "Ropes" |
|
26 |
Theme = "Eyes" |
|
27 |
||
12224
d62d6f8ebef1
Disable Sudden Death consistently in all missions which don't require it
Wuzzy <almikes@aol.com>
parents:
12077
diff
changeset
|
28 |
-- Disable Sudden Death |
d62d6f8ebef1
Disable Sudden Death consistently in all missions which don't require it
Wuzzy <almikes@aol.com>
parents:
12077
diff
changeset
|
29 |
WaterRise = 0 |
d62d6f8ebef1
Disable Sudden Death consistently in all missions which don't require it
Wuzzy <almikes@aol.com>
parents:
12077
diff
changeset
|
30 |
HealthDecrease = 0 |
d62d6f8ebef1
Disable Sudden Death consistently in all missions which don't require it
Wuzzy <almikes@aol.com>
parents:
12077
diff
changeset
|
31 |
|
11015 | 32 |
CaseFreq = 0 |
33 |
MinesNum = 0 |
|
34 |
Explosives = 0 |
|
35 |
||
12049
030464f34d47
Tweak flags used in all missions to fit more to the theme
Wuzzy <almikes@aol.com>
parents:
11968
diff
changeset
|
36 |
AddTeam(loc("Wannabe Flyboys"), 14483456, "Simple", "Island", "Default", "cm_scout") |
11015 | 37 |
player = AddHog(loc("Ace"), 0, 80, "Gasmask") |
38 |
SetGearPosition(player, 1380, 1500) |
|
39 |
||
40 |
end |
|
41 |
||
42 |
||
43 |
||
44 |
function onGameStart() |
|
45 |
||
46 |
SendHealthStatsOff() |
|
47 |
||
48 |
ShowMission ( |
|
12077
ce3860c82c8b
Rewrite 2nd line of mission panel of most missions for consistency
Wuzzy <almikes@aol.com>
parents:
12049
diff
changeset
|
49 |
loc("RC Plane Challenge"), |
ce3860c82c8b
Rewrite 2nd line of mission panel of most missions for consistency
Wuzzy <almikes@aol.com>
parents:
12049
diff
changeset
|
50 |
loc("Challenge"), |
11015 | 51 |
|
52 |
loc("Collect or destroy all the health crates.") .. "|" .. |
|
53 |
loc("Compete to use as few planes as possible!") .. "|" .. |
|
54 |
"", -amRCPlane, 4000 |
|
55 |
) |
|
56 |
||
57 |
PlaceGirder(2192, 508, 6) |
|
58 |
PlaceGirder(2192, 670, 6) |
|
59 |
PlaceGirder(2193, 792, 2) |
|
60 |
PlaceGirder(2100, 825, 4) |
|
61 |
PlaceGirder(2009, 899, 6) |
|
62 |
PlaceGirder(2084, 992, 4) |
|
63 |
PlaceGirder(2145, 1087, 6) |
|
64 |
PlaceGirder(2199, 1235, 5) |
|
65 |
PlaceGirder(2308, 1296, 0) |
|
66 |
PlaceGirder(2424, 1234, 7) |
|
67 |
PlaceGirder(2473, 1129, 2) |
|
68 |
PlaceGirder(2437, 1046, 1) |
|
69 |
PlaceGirder(2409, 927, 6) |
|
70 |
PlaceGirder(2408, 763, 6) |
|
71 |
PlaceGirder(2404, 540, 6) |
|
72 |
PlaceGirder(2426, 423, 3) |
|
73 |
PlaceGirder(2550, 400, 4) |
|
74 |
PlaceGirder(2668, 425, 1) |
|
75 |
PlaceGirder(2707, 541, 6) |
|
76 |
PlaceGirder(2706, 703, 6) |
|
77 |
PlaceGirder(2705, 867, 6) |
|
78 |
PlaceGirder(2779, 962, 4) |
|
79 |
PlaceGirder(2894, 924, 3) |
|
80 |
PlaceGirder(2908, 802, 6) |
|
81 |
PlaceGirder(2907, 639, 6) |
|
82 |
PlaceGirder(3052, 566, 4) |
|
83 |
PlaceGirder(2971, 394, 4) |
|
84 |
PlaceGirder(3103, 448, 7) |
|
85 |
PlaceGirder(3047, 654, 0) |
|
86 |
PlaceGirder(3043, 746, 6) |
|
87 |
PlaceGirder(3265, 1583, 6) |
|
88 |
PlaceGirder(3256, 1491, 4) |
|
89 |
PlaceGirder(3187, 1401, 6) |
|
90 |
PlaceGirder(3326, 1400, 6) |
|
91 |
PlaceGirder(774, 530, 5) |
|
92 |
PlaceGirder(922, 595, 4) |
|
93 |
PlaceGirder(1079, 533, 7) |
|
94 |
PlaceGirder(1139, 386, 6) |
|
95 |
PlaceGirder(1074, 237, 5) |
|
96 |
PlaceGirder(723, 381, 6) |
|
97 |
PlaceGirder(781, 229, 7) |
|
98 |
PlaceGirder(927, 746, 6) |
|
99 |
PlaceGirder(874, 736, 0) |
|
100 |
PlaceGirder(982, 737, 0) |
|
101 |
PlaceGirder(2430, 1730, 4) |
|
102 |
||
103 |
PlaceGirder(1613, 1104, 7) |
|
104 |
PlaceGirder(1564, 1256, 6) |
|
105 |
PlaceGirder(1643, 1341, 5) |
|
106 |
PlaceGirder(1780, 1372, 4) |
|
107 |
PlaceGirder(1869, 1296, 7) |
|
108 |
PlaceGirder(1858, 1163, 5) |
|
109 |
PlaceGirder(1739, 1044, 5) |
|
110 |
PlaceGirder(1621, 926, 5) |
|
111 |
PlaceGirder(1597, 985, 5) |
|
112 |
PlaceGirder(1449, 939, 4) |
|
113 |
PlaceGirder(1473, 874, 4) |
|
114 |
PlaceGirder(2092, 1352, 7) |
|
115 |
PlaceGirder(2145, 1444, 7) |
|
116 |
PlaceGirder(2004, 1443, 3) |
|
117 |
PlaceGirder(1978, 1523, 2) |
|
118 |
PlaceGirder(2021, 1596, 1) |
|
119 |
PlaceGirder(2103, 1625, 0) |
|
120 |
PlaceGirder(2208, 1551, 7) |
|
121 |
PlaceGirder(2327, 1431, 7) |
|
122 |
PlaceGirder(2395, 1478, 6) |
|
123 |
PlaceGirder(2396, 1600, 2) |
|
124 |
PlaceGirder(2495, 1285, 6) |
|
125 |
PlaceGirder(2494, 1408, 2) |
|
126 |
PlaceGirder(2547, 530, 0) |
|
127 |
||
128 |
PlaceGirder(2451, 1551, 0) |
|
129 |
PlaceGirder(2551, 706, 6) |
|
130 |
PlaceGirder(2551, 869, 6) |
|
131 |
PlaceGirder(2623, 1016, 5) |
|
132 |
PlaceGirder(2773, 1083, 4) |
|
133 |
PlaceGirder(2924, 1019, 7) |
|
134 |
PlaceGirder(2568, 1491, 7) |
|
135 |
PlaceGirder(2618, 1346, 6) |
|
136 |
PlaceGirder(2674, 1195, 7) |
|
137 |
PlaceGirder(2822, 1142, 4) |
|
138 |
PlaceGirder(2963, 1069, 7) |
|
139 |
PlaceGirder(3067, 938, 5) |
|
140 |
PlaceGirder(2803, 1373, 2) |
|
141 |
PlaceGirder(2811, 1559, 2) |
|
142 |
||
143 |
tempG = SpawnHealthCrate(930, 557) |
|
144 |
SetHealth(tempG, 25) |
|
145 |
tempG = SpawnHealthCrate(979, 692) |
|
146 |
SetHealth(tempG, 25) |
|
147 |
tempG = SpawnHealthCrate(876, 703) |
|
148 |
SetHealth(tempG, 25) |
|
149 |
tempG = SpawnHealthCrate(2309, 1260) |
|
150 |
SetHealth(tempG, 25) |
|
151 |
tempG = SpawnHealthCrate(1733, 1127) |
|
152 |
SetHealth(tempG, 25) |
|
153 |
tempG = SpawnHealthCrate(1738, 1320) |
|
154 |
SetHealth(tempG, 25) |
|
155 |
tempG = SpawnHealthCrate(3249, 1460) |
|
156 |
SetHealth(tempG, 25) |
|
157 |
tempG = SpawnHealthCrate(3051, 617) |
|
158 |
SetHealth(tempG, 25) |
|
159 |
tempG = SpawnHealthCrate(2972, 353) |
|
160 |
SetHealth(tempG, 25) |
|
161 |
tempG = SpawnHealthCrate(2548, 358) |
|
162 |
||
163 |
SetHealth(tempG, 25) |
|
164 |
tempG = SpawnHealthCrate(2090, 1580) |
|
165 |
SetHealth(tempG, 25) |
|
166 |
tempG = SpawnHealthCrate(1752, 1753) |
|
167 |
SetHealth(tempG, 25) |
|
168 |
tempG = SpawnHealthCrate(1865, 1758) |
|
169 |
SetHealth(tempG, 25) |
|
170 |
tempG = SpawnHealthCrate(1985, 1760) |
|
171 |
SetHealth(tempG, 25) |
|
172 |
tempG = SpawnHealthCrate(2429, 1760) |
|
173 |
SetHealth(tempG, 25) |
|
174 |
tempG = SpawnHealthCrate(2810, 1480) |
|
175 |
SetHealth(tempG, 25) |
|
176 |
tempG = SpawnHealthCrate(2800, 1277) |
|
177 |
SetHealth(tempG, 25) |
|
178 |
tempG = SpawnHealthCrate(2806, 1107) |
|
179 |
SetHealth(tempG, 25) |
|
180 |
||
181 |
PlaceGirder(1897, 903, 6) |
|
182 |
PlaceGirder(1916, 784, 3) |
|
183 |
PlaceGirder(2010, 732, 4) |
|
184 |
PlaceGirder(2082, 639, 6) |
|
185 |
PlaceGirder(2081, 516, 2) |
|
186 |
PlaceGirder(1985, 487, 4) |
|
187 |
PlaceGirder(1862, 407, 5) |
|
188 |
PlaceGirder(1855, 224, 7) |
|
189 |
PlaceGirder(2006, 163, 4) |
|
190 |
PlaceGirder(2128, 187, 1) |
|
191 |
PlaceGirder(2251, 213, 4) |
|
192 |
PlaceGirder(2413, 213, 4) |
|
193 |
PlaceGirder(1952, 618, 0) |
|
194 |
PlaceGirder(957, 1068, 4) |
|
195 |
PlaceGirder(794, 1069, 4) |
|
196 |
PlaceGirder(728, 1163, 6) |
|
197 |
PlaceGirder(728, 1287, 2) |
|
198 |
PlaceGirder(802, 1342, 4) |
|
199 |
PlaceGirder(966, 1342, 4) |
|
200 |
PlaceGirder(674, 1032, 1) |
|
201 |
PlaceGirder(554, 1011, 4) |
|
202 |
PlaceGirder(445, 1056, 3) |
|
203 |
PlaceGirder(422, 1174, 6) |
|
204 |
PlaceGirder(369, 1341, 5) |
|
205 |
PlaceGirder(495, 1313, 5) |
|
206 |
PlaceGirder(568, 1379, 3) |
|
207 |
PlaceGirder(577, 1202, 2) |
|
208 |
PlaceGirder(744, 1490, 5) |
|
209 |
PlaceGirder(760, 1617, 7) |
|
210 |
PlaceGirder(622, 1693, 4) |
|
211 |
PlaceGirder(476, 1623, 5) |
|
212 |
PlaceGirder(376, 1697, 1) |
|
213 |
PlaceGirder(955, 1746, 2) |
|
214 |
PlaceGirder(1025, 1746, 2) |
|
215 |
PlaceGirder(1090, 1745, 2) |
|
216 |
PlaceGirder(1156, 1746, 2) |
|
217 |
PlaceGirder(3806, 1530, 2) |
|
218 |
PlaceGirder(3880, 1464, 2) |
|
219 |
PlaceGirder(3738, 1458, 2) |
|
220 |
PlaceGirder(3806, 1390, 2) |
|
221 |
PlaceGirder(3805, 1588, 0) |
|
222 |
PlaceGirder(3676, 1609, 3) |
|
223 |
PlaceGirder(3930, 1615, 1) |
|
224 |
PlaceGirder(3719, 1295, 0) |
|
225 |
PlaceGirder(3888, 1294, 0) |
|
226 |
PlaceGirder(3661, 1385, 2) |
|
227 |
PlaceGirder(3955, 1377, 2) |
|
228 |
PlaceGirder(3982, 1518, 0) |
|
229 |
PlaceGirder(3378, 440, 2) |
|
230 |
PlaceGirder(3447, 492, 4) |
|
231 |
PlaceGirder(3564, 529, 1) |
|
232 |
PlaceGirder(3596, 647, 6) |
|
233 |
PlaceGirder(3521, 740, 4) |
|
234 |
PlaceGirder(3524, 838, 4) |
|
235 |
PlaceGirder(3644, 819, 3) |
|
236 |
PlaceGirder(3691, 708, 6) |
|
237 |
PlaceGirder(3690, 545, 6) |
|
238 |
PlaceGirder(3612, 433, 5) |
|
239 |
PlaceGirder(3463, 383, 4) |
|
240 |
PlaceGirder(2815, 122, 7) |
|
241 |
PlaceGirder(2960, 72, 4) |
|
242 |
PlaceGirder(3032, 123, 2) |
|
243 |
PlaceGirder(3063, 174, 0) |
|
244 |
PlaceGirder(3095, 124, 2) |
|
245 |
PlaceGirder(3169, 71, 4) |
|
246 |
PlaceGirder(3320, 124, 5) |
|
247 |
PlaceGirder(3210, 179, 2) |
|
248 |
PlaceGirder(2932, 181, 2) |
|
249 |
||
250 |
tempG = SpawnHealthCrate(3804, 1461) |
|
251 |
SetHealth(tempG, 25) |
|
252 |
tempG = SpawnHealthCrate(3269, 1742) |
|
253 |
SetHealth(tempG, 25) |
|
254 |
tempG = SpawnHealthCrate(3066, 121) |
|
255 |
SetHealth(tempG, 25) |
|
256 |
tempG = SpawnHealthCrate(3207, 104) |
|
257 |
SetHealth(tempG, 25) |
|
258 |
tempG = SpawnHealthCrate(2928, 103) |
|
259 |
SetHealth(tempG, 25) |
|
260 |
tempG = SpawnHealthCrate(1997, 202) |
|
261 |
SetHealth(tempG, 25) |
|
262 |
tempG = SpawnHealthCrate(2253, 159) |
|
263 |
SetHealth(tempG, 25) |
|
264 |
tempG = SpawnHealthCrate(2132, 774) |
|
265 |
SetHealth(tempG, 25) |
|
266 |
tempG = SpawnHealthCrate(2549, 490) |
|
267 |
SetHealth(tempG, 25) |
|
268 |
tempG = SpawnHealthCrate(3527, 694) |
|
269 |
SetHealth(tempG, 25) |
|
270 |
tempG = SpawnHealthCrate(3777, 78) |
|
271 |
SetHealth(tempG, 25) |
|
272 |
tempG = SpawnHealthCrate(1124, 1746) |
|
273 |
SetHealth(tempG, 25) |
|
274 |
tempG = SpawnHealthCrate(1056, 1740) |
|
275 |
SetHealth(tempG, 25) |
|
276 |
tempG = SpawnHealthCrate(993, 1742) |
|
277 |
SetHealth(tempG, 25) |
|
278 |
tempG = SpawnHealthCrate(799, 1298) |
|
279 |
SetHealth(tempG, 25) |
|
280 |
tempG = SpawnHealthCrate(577, 1126) |
|
281 |
SetHealth(tempG, 25) |
|
282 |
tempG = SpawnHealthCrate(596, 1463) |
|
283 |
SetHealth(tempG, 25) |
|
284 |
tempG = SpawnHealthCrate(3854, 1043) |
|
285 |
SetHealth(tempG, 25) |
|
286 |
tempG = SpawnHealthCrate(1944, 567) |
|
287 |
SetHealth(tempG, 25) |
|
288 |
tempG = SpawnHealthCrate(338, 1748) |
|
289 |
SetHealth(tempG, 25) |
|
290 |
||
291 |
||
292 |
end |
|
293 |
||
294 |
--function onGameTick() |
|
295 |
||
296 |
--if RCGear ~= nil then |
|
297 |
-- AddCaption(GetTimer(RCGear)) |
|
298 |
--end |
|
299 |
||
300 |
--end |
|
301 |
||
302 |
function onGameTick20() |
|
303 |
if RCGear ~= nil then |
|
304 |
if(GetTimer(RCGear) < 3000 and planeUhOh == false) then |
|
305 |
PlaySound(sndUhOh, player) |
|
306 |
planeUhOh = true |
|
307 |
end |
|
308 |
planeTimer = planeTimer + 20 |
|
309 |
end |
|
310 |
if commentTimer > 0 then |
|
311 |
commentTimer = commentTimer - 20 |
|
312 |
elseif(nextComment ~= sndNone) then |
|
313 |
PlaySound(nextComment, player) |
|
314 |
nextComment = sndNone |
|
315 |
end |
|
316 |
if missileScanTimer > 0 then |
|
317 |
missileScanTimer = missileScanTimer - 20 |
|
318 |
else |
|
319 |
if crateStreak == 0 and missiles == 3 then |
|
320 |
PlaySound(sndMissed, player) |
|
321 |
missiles = 4 |
|
322 |
end |
|
323 |
end |
|
324 |
end |
|
325 |
||
326 |
function onNewTurn() |
|
327 |
TurnTimeLeft = -1 |
|
328 |
end |
|
329 |
||
330 |
function onGearAdd(gear) |
|
331 |
||
332 |
if GetGearType(gear) == gtRCPlane then |
|
333 |
RCGear = gear |
|
334 |
planesUsed = planesUsed + 1 |
|
335 |
planeTimer = 0 |
|
336 |
missiles = 0 |
|
337 |
end |
|
338 |
||
339 |
if GetGearType(gear) == gtCase then |
|
340 |
cratesLeft = cratesLeft + 1 |
|
341 |
end |
|
342 |
||
343 |
if GetGearType(gear) == gtAirBomb then |
|
344 |
totalMissiles = totalMissiles + 1 |
|
345 |
end |
|
346 |
end |
|
347 |
||
348 |
function onGearDelete(gear) |
|
349 |
||
350 |
if GetGearType(gear) == gtRCPlane then |
|
351 |
||
352 |
RCGear = nil |
|
353 |
planeUhOh = false |
|
354 |
missiles = 0 |
|
355 |
AddCaption(string.format(loc("Planes used: %d"), planesUsed)) |
|
356 |
||
357 |
if(planeTimer < 2000 and crateStreak == 0) then |
|
358 |
nextComment = sndStupid |
|
359 |
commentTimer = math.min(2000-planeTimer, 800) |
|
360 |
elseif(planeTimer < 5000 and crateStreak == 0) then |
|
361 |
PlaySound(sndOops, player) |
|
362 |
elseif(planesUsed == 72) then |
|
363 |
PlaySound(sndStupid, player) |
|
364 |
elseif(planesUsed == 50) then |
|
365 |
PlaySound(sndNutter, player) |
|
366 |
elseif(planesUsed == 30) then |
|
367 |
PlaySound(sndOops, player) |
|
368 |
end |
|
369 |
||
370 |
crateStreak = 0 |
|
371 |
||
372 |
elseif GetGearType(gear) == gtAirBomb then |
|
373 |
missiles = missiles + 1 |
|
374 |
missileScanTimer = 500 |
|
375 |
||
376 |
elseif GetGearType(gear) == gtCase then |
|
377 |
||
378 |
cratesLeft = cratesLeft - 1 |
|
379 |
crateStreak = crateStreak + 1 |
|
380 |
if(crateStreak > longestCrateStreak) then |
|
381 |
longestCrateStreak = crateStreak |
|
382 |
end |
|
383 |
||
384 |
AddCaption(string.format(loc("Crates left: %d"), cratesLeft)) |
|
385 |
||
386 |
if cratesLeft == 0 then |
|
387 |
||
388 |
local rank = "unknown" |
|
389 |
local color = 0xFFFFFFFF |
|
390 |
local sound = sndVictory |
|
391 |
if planesUsed >= 156 then |
|
392 |
rank = loc("Destroyer of planes") |
|
393 |
color = 0xD06700FF |
|
394 |
sound = sndLaugh |
|
395 |
elseif planesUsed >= 98 then |
|
396 |
rank = loc("Hopeless case") |
|
397 |
color = 0xFF0000FF |
|
398 |
elseif planesUsed >= 72 then |
|
399 |
rank = loc("Drunk greenhorn") |
|
400 |
color = 0xFF0040FF |
|
401 |
elseif planesUsed >= 50 then |
|
402 |
rank = loc("Greenhorn") -- a.k.a. "absolute beginner" |
|
403 |
color = 0xFF0080FF |
|
404 |
elseif planesUsed >= 39 then |
|
405 |
rank = loc("Beginner") |
|
406 |
color = 0xFF00BFFF |
|
407 |
elseif planesUsed >= 30 then |
|
408 |
rank = loc("Experienced beginner") |
|
409 |
color = 0xFF00CCFF |
|
410 |
elseif planesUsed >= 21 then |
|
411 |
rank = loc("Below-average pilot") |
|
412 |
color = 0xFF00FFFF |
|
413 |
elseif planesUsed >= 17 then |
|
414 |
rank = loc("Average pilot") |
|
415 |
color = 0xBF00FFFF |
|
416 |
elseif planesUsed >= 13 then |
|
417 |
rank = loc("Above-average pilot") |
|
418 |
color = 0x8000FFFF |
|
419 |
elseif planesUsed >= 8 then |
|
420 |
rank = loc("Professional pilot") |
|
421 |
color = 0x4000FFFF |
|
422 |
elseif planesUsed >= 5 then |
|
423 |
rank = loc("Professional stunt pilot") |
|
424 |
color = 0x0000FFFF |
|
425 |
elseif planesUsed >= 3 then |
|
426 |
rank = loc("Elite pilot") |
|
427 |
color = 0x0040FFFF |
|
428 |
elseif planesUsed == 2 then |
|
429 |
rank = loc("Upper-class elite pilot") |
|
430 |
color = 0x0080FFFF |
|
431 |
elseif planesUsed == 1 then |
|
432 |
rank = loc("Top-class elite pilot") |
|
433 |
color = 0x00FFFFFF |
|
434 |
sound = sndFlawless |
|
435 |
else |
|
436 |
rank = loc("Cheater") |
|
437 |
color = 0xFF0000FF |
|
438 |
sound = sndCoward |
|
439 |
end |
|
440 |
AddCaption(string.format(loc("Rank: %s"), rank), color, capgrpMessage2) |
|
441 |
SendStat(siCustomAchievement, string.format(loc("Your rank: %s"), rank)) |
|
442 |
if planesUsed == 1 then |
|
443 |
AddCaption(loc("Flawless victory!")) |
|
444 |
SendStat(siGameResult, loc("You have perfectly beaten the challenge!")) |
|
445 |
SendStat(siCustomAchievement, loc("You have used only 1 RC plane. Outstanding!")) |
|
446 |
else |
|
447 |
AddCaption(loc("Victory!")) |
|
448 |
SendStat(siGameResult, loc("You have finished the challenge!")) |
|
449 |
SendStat(siCustomAchievement, string.format(loc("You have used %d RC planes."), planesUsed)) |
|
450 |
end |
|
451 |
||
452 |
if(totalMissiles > 1) then |
|
453 |
SendStat(siCustomAchievement, string.format(loc("You have dropped %d missiles."), totalMissiles)) |
|
454 |
end |
|
455 |
||
456 |
if(longestCrateStreak > 5) then |
|
457 |
if(planesUsed == 1) then |
|
458 |
SendStat(siCustomAchievement, string.format(loc("In your best (and only) flight you took out %d crates with one RC plane!"), longestCrateStreak)) |
|
459 |
else |
|
460 |
SendStat(siCustomAchievement, string.format(loc("In your best flight you took out %d crates with one RC plane."), longestCrateStreak)) |
|
461 |
end |
|
462 |
end |
|
463 |
||
464 |
if(planesUsed == 2) then |
|
465 |
SendStat(siCustomAchievement, loc("This was an awesome performance! But this challenge can be finished with even just one RC plane. Can you figure out how?")) |
|
466 |
end |
|
467 |
if(planesUsed == 1) then |
|
468 |
SendStat(siCustomAchievement, loc("Congratulations! You have truly mastered this challenge! Don't forget to save the demo.")) |
|
12344
877f55c77a3f
Standardize the secret achievements strings in Lua scripts
Wuzzy <almikes@aol.com>
parents:
12225
diff
changeset
|
469 |
SendStat(siCustomAchievement, string.format(loc("Achievement gotten: %s"), loc("Prestigious Pilot"))) |
11015 | 470 |
end |
471 |
||
472 |
ShowMission ( |
|
473 |
loc("CHALLENGE COMPLETE"), |
|
474 |
loc("Congratulations!"), |
|
475 |
string.format(loc("Planes used: %d"), planesUsed) .. "|" .. |
|
476 |
"", 0, 0 |
|
477 |
) |
|
478 |
SetState(player, gstWinner) |
|
479 |
PlaySound(sound, player) |
|
480 |
||
481 |
||
482 |
DismissTeam(loc("Wannabe Flyboys")) |
|
483 |
EndGame() |
|
484 |
end |
|
485 |
||
486 |
if RCGear ~= nil then |
|
487 |
SetTimer(RCGear, GetTimer(RCGear) + 10000) |
|
488 |
end |
|
489 |
end |
|
490 |
||
491 |
end |
|
492 |
||
493 |
function onAmmoStoreInit() |
|
494 |
SetAmmo(amRCPlane, 9, 0, 0, 0) |
|
11689 | 495 |
end |
496 |
||
497 |
function onNewTurn() |
|
498 |
SetWeapon(amRCPlane) |
|
499 |
end |