author | Wuzzy <Wuzzy2@mail.ru> |
Sun, 16 Jun 2019 13:48:22 +0200 | |
changeset 15169 | 2ad1f0bdc1f3 |
parent 15167 | 7416f6319de9 |
child 15170 | a251d8757e8c |
permissions | -rw-r--r-- |
12799
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12784
diff
changeset
|
1 |
--[[ |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12784
diff
changeset
|
2 |
A Classic Fairytale: Backstab |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12784
diff
changeset
|
3 |
|
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12784
diff
changeset
|
4 |
= SUMMARY = |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12784
diff
changeset
|
5 |
It is revealed that there's a traitor among the natives. |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12784
diff
changeset
|
6 |
Player decides whether to kill him or not. |
12906
bdf8e80a97b8
Fix some minor formatting and grammar flaws in script strings
Wuzzy <Wuzzy2@mail.ru>
parents:
12905
diff
changeset
|
7 |
After this, the natives must defeat 3 waves of cannibals. |
12799
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12784
diff
changeset
|
8 |
|
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12784
diff
changeset
|
9 |
= FLOW CHART = |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12784
diff
changeset
|
10 |
|
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12784
diff
changeset
|
11 |
== Linear events == |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12784
diff
changeset
|
12 |
|
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12784
diff
changeset
|
13 |
- Cut scene: startScene (traitor is revealed) |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12784
diff
changeset
|
14 |
- Player is instructed to decide what to do with the traitor |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12784
diff
changeset
|
15 |
| Player kills traitor |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12784
diff
changeset
|
16 |
- Cut scene: afterChoiceAnim |
14644
3e15412536c8
ACF5: Register is as "spare traitor" if player walks too far away
Wuzzy <Wuzzy2@mail.ru>
parents:
14625
diff
changeset
|
17 |
| Player spares traitor (skips turn or moves too far away) |
12799
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12784
diff
changeset
|
18 |
- Cut scene: afterChoiceAnim (different) |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12784
diff
changeset
|
19 |
| Player kills any other hog or own hog |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12784
diff
changeset
|
20 |
> Game over |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12784
diff
changeset
|
21 |
- First turn of cannibals |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12784
diff
changeset
|
22 |
- TBS |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12784
diff
changeset
|
23 |
- First wave of cannibals dead |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12784
diff
changeset
|
24 |
- Cut scene: wave2Anim |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12784
diff
changeset
|
25 |
- Spawn 2nd cannibal wave |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12784
diff
changeset
|
26 |
- TBS |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12784
diff
changeset
|
27 |
- 2nd wave dead |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12784
diff
changeset
|
28 |
- Cut scene: wave2DeadAnim |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12784
diff
changeset
|
29 |
- All natives but one are encaged |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12784
diff
changeset
|
30 |
- 7 turns till arrival of 3rd wave |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12784
diff
changeset
|
31 |
- Arrival points are marked with circles |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12784
diff
changeset
|
32 |
- One hero is deployed near the circles |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12784
diff
changeset
|
33 |
- Player now only controls the hero, switch hog is removed |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12784
diff
changeset
|
34 |
- TBS |
15060
3e79818e21b1
ACF5: Spawn final wave at end of 7th turn instead of beginning of 8th turn
Wuzzy <Wuzzy2@mail.ru>
parents:
15059
diff
changeset
|
35 |
- 3rd wave appears at end of 7th turn |
12799
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12784
diff
changeset
|
36 |
- TBS |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12784
diff
changeset
|
37 |
- 3rd wave dead |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12784
diff
changeset
|
38 |
- Final cut scene |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12784
diff
changeset
|
39 |
> Victory |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12784
diff
changeset
|
40 |
|
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12784
diff
changeset
|
41 |
=== The traitor === |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12784
diff
changeset
|
42 |
The traitor is chosen based on the past player decisions in the campaign. |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12784
diff
changeset
|
43 |
|
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12784
diff
changeset
|
44 |
== Non-linear events == |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12784
diff
changeset
|
45 |
|
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12784
diff
changeset
|
46 |
| Any native hog dies after traitor decision: |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12784
diff
changeset
|
47 |
- Another hog (if alive) mourns the loss |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12784
diff
changeset
|
48 |
|
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12784
diff
changeset
|
49 |
]] |
bca911f8e804
Add comments for all A Classic Fairytale missions to summarize the story in a flow chart-like fashion
Wuzzy <Wuzzy2@mail.ru>
parents:
12784
diff
changeset
|
50 |
|
8043 | 51 |
HedgewarsScriptLoad("/Scripts/Locale.lua") |
52 |
HedgewarsScriptLoad("/Scripts/Animate.lua") |
|
14881
543729d313f5
ACF5, ACF9: Clear mines around cyborg when it appears
Wuzzy <Wuzzy2@mail.ru>
parents:
14781
diff
changeset
|
53 |
HedgewarsScriptLoad("/Scripts/Utils.lua") |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
54 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
55 |
-----------------------------Constants--------------------------------- |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
56 |
choiceAccepted = 1 |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
57 |
choiceRefused = 2 |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
58 |
choiceAttacked = 3 |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
59 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
60 |
choiceEliminate = 1 |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
61 |
choiceSpare = 2 |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
62 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
63 |
leaksNum = 1 |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
64 |
denseNum = 2 |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
65 |
waterNum = 3 |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
66 |
buffaloNum = 4 |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
67 |
chiefNum = 5 |
7417
2520705b857f
Switched Fell From Heaven to Fell From Grace on missions 5, 6.
belphegorr <szabibibi@gmail.com>
parents:
7259
diff
changeset
|
68 |
girlNum = 6 |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
69 |
wiseNum = 7 |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
70 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
71 |
spyKillStage = 1 |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
72 |
platformStage = 2 |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
73 |
wave3Stage = 3 |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
74 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
75 |
tmpVar = 0 |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
76 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
77 |
nativeNames = {loc("Leaks A Lot"), loc("Dense Cloud"), loc("Fiery Water"), |
7417
2520705b857f
Switched Fell From Heaven to Fell From Grace on missions 5, 6.
belphegorr <szabibibi@gmail.com>
parents:
7259
diff
changeset
|
78 |
loc("Raging Buffalo"), loc("Righteous Beard"), loc("Fell From Grace"), |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
79 |
loc("Wise Oak"), loc("Eagle Eye"), loc("Flaming Worm")} |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
80 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
81 |
nativeHats = {"Rambo", "RobinHood", "pirate_jack", "zoo_Bunny", "IndianChief", |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
82 |
"tiara", "AkuAku", "None", "None"} |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
83 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
84 |
nativePos = {{887, 329}, {1050, 288}, {1731, 707}, |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
85 |
{830, 342}, {1001, 290}, {773, 340}, |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
86 |
{953, 305}, {347, 648}, {314, 647}} |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
87 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
88 |
nativeDir = {"Right", "Left", "Left", |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
89 |
"Right", "Left", "Right", |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
90 |
"Left", "Right", "Right"} |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
91 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
92 |
cannibalNames = {loc("Brain Teaser"), loc("Bone Jackson"), loc("Gimme Bones"), |
7463
bd5c7b8db666
Crashfix, healthfix in mission 5
belphegorr <szabibibi@gmail.com>
parents:
7448
diff
changeset
|
93 |
loc("Hedgibal Lecter"), loc("Bloodpie"), loc("Scalp Muncher"), |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
94 |
loc("Back Breaker"), loc("Dahmer"), loc("Meiwes"), |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
95 |
loc("Ear Sniffer"), loc("Regurgitator"), loc("Muriel")} |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
96 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
97 |
cannibalPos = {{3607, 1472}, {3612, 1487}, {3646, 1502}, |
7425 | 98 |
{3507, 195}, {3612, 1487}, {840, 1757}, |
99 |
{3056, 1231}, {2981, 1222}, {2785, 1258}} |
|
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
100 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
101 |
cannibalDir = {"Left", "Left", "Left", |
7425 | 102 |
"Left", "Right", "Right", |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
103 |
"Left", "Left", "Left"} |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
104 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
105 |
cyborgPos = {1369, 574} |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
106 |
cyborgPos2 = {1308, 148} |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
107 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
108 |
deployedPos = {2522, 1365} |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
109 |
-----------------------------Variables--------------------------------- |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
110 |
natives = {} |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
111 |
nativeDead = {} |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
112 |
nativeHidden = {} |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
113 |
nativeRevived = {} |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
114 |
nativesNum = 0 |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
115 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
116 |
cannibals = {} |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
117 |
cannibalDead = {} |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
118 |
cannibalHidden = {} |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
119 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
120 |
speakerHog = nil |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
121 |
spyHog = nil |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
122 |
deployedHog = nil |
7463
bd5c7b8db666
Crashfix, healthfix in mission 5
belphegorr <szabibibi@gmail.com>
parents:
7448
diff
changeset
|
123 |
deployedDead = false |
12366
05fe955e2763
Fix engine crash in ACF mission 5 when skipping animation after killing wave 2 while the cyborg is talking
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
124 |
nativesTeleported = false |
05fe955e2763
Fix engine crash in ACF mission 5 when skipping animation after killing wave 2 while the cyborg is talking
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
125 |
nativesIsolated = false |
05fe955e2763
Fix engine crash in ACF mission 5 when skipping animation after killing wave 2 while the cyborg is talking
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
126 |
hogDeployed = false |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
127 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
128 |
cyborgHidden = false |
7448
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
129 |
needToAct = 0 |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
130 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
131 |
m2Choice = 0 |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
132 |
m4DenseDead = 0 |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
133 |
m4BuffaloDead = 0 |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
134 |
m4WaterDead = 0 |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
135 |
m4ChiefDead = 0 |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
136 |
m4LeaksDead = 0 |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
137 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
138 |
needRevival = false |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
139 |
gearr = nil |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
140 |
startElimination = 0 |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
141 |
stage = 0 |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
142 |
choice = 0 |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
143 |
highJumped = false |
15059
c59bdec25012
ACF5: Fix number of turns before 3rd wave appears not always being 7
Wuzzy <Wuzzy2@mail.ru>
parents:
15034
diff
changeset
|
144 |
wave3TurnsLeft = nil |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
145 |
startNativesNum = 0 |
14490
f37910a73c19
Refactor ACF missions, store team names in variables
Wuzzy <Wuzzy2@mail.ru>
parents:
14450
diff
changeset
|
146 |
nativesTeamName = nil |
f37910a73c19
Refactor ACF missions, store team names in variables
Wuzzy <Wuzzy2@mail.ru>
parents:
14450
diff
changeset
|
147 |
tribeTeamName = nil |
f37910a73c19
Refactor ACF missions, store team names in variables
Wuzzy <Wuzzy2@mail.ru>
parents:
14450
diff
changeset
|
148 |
cyborgTeamName = nil |
f37910a73c19
Refactor ACF missions, store team names in variables
Wuzzy <Wuzzy2@mail.ru>
parents:
14450
diff
changeset
|
149 |
cannibalsTeamName1 = nil |
f37910a73c19
Refactor ACF missions, store team names in variables
Wuzzy <Wuzzy2@mail.ru>
parents:
14450
diff
changeset
|
150 |
cannibalsTeamName2 = nil |
14644
3e15412536c8
ACF5: Register is as "spare traitor" if player walks too far away
Wuzzy <Wuzzy2@mail.ru>
parents:
14625
diff
changeset
|
151 |
runawayX, runawayY = 1932, 829 |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
152 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
153 |
startAnim = {} |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
154 |
afterChoiceAnim = {} |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
155 |
wave2Anim = {} |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
156 |
wave2DeadAnim = {} |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
157 |
wave3DeadAnim = {} |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
158 |
|
7448
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
159 |
vCircs = {} |
14881
543729d313f5
ACF5, ACF9: Clear mines around cyborg when it appears
Wuzzy <Wuzzy2@mail.ru>
parents:
14781
diff
changeset
|
160 |
|
15167
7416f6319de9
ACF5: Also clear crates around cyborg
Wuzzy <Wuzzy2@mail.ru>
parents:
15073
diff
changeset
|
161 |
trackedNonCyborgGears = {} |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
162 |
-----------------------------Animations-------------------------------- |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
163 |
function Wave2Reaction() |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
164 |
local i = 1 |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
165 |
local gearr = nil |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
166 |
while nativeDead[i] == true do |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
167 |
i = i + 1 |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
168 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
169 |
gearr = natives[i] |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
170 |
if nativeDead[denseNum] ~= true and band(GetState(natives[denseNum]), gstDrowning) == 0 then |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
171 |
AnimInsertStepNext({func = AnimCustomFunction, args = {dense, EmitDenseClouds, {"Left"}}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
172 |
AnimInsertStepNext({func = AnimTurn, args = {dense, "Left"}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
173 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
174 |
if nativeDead[buffaloNum] ~= true and band(GetState(natives[buffaloNum]), gstDrowning) == 0 then |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
175 |
AnimInsertStepNext({func = AnimSay, args = {natives[buffaloNum], loc("Let them have a taste of my fury!"), SAY_SHOUT, 6000}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
176 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
177 |
AnimInsertStepNext({func = AnimSay, args = {gearr, loc("There's more of them? When did they become so hungry?"), SAY_SHOUT, 8000}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
178 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
179 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
180 |
function EmitDenseClouds(dir) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
181 |
local dif |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
182 |
if dir == "Left" then |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
183 |
dif = 10 |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
184 |
else |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
185 |
dif = -10 |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
186 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
187 |
AnimInsertStepNext({func = AnimVisualGear, args = {natives[denseNum], GetX(natives[denseNum]) + dif, GetY(natives[denseNum]) + dif, vgtSteam, 0, true}, swh = false}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
188 |
AnimInsertStepNext({func = AnimVisualGear, args = {natives[denseNum], GetX(natives[denseNum]) + dif, GetY(natives[denseNum]) + dif, vgtSteam, 0, true}, swh = false}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
189 |
AnimInsertStepNext({func = AnimVisualGear, args = {natives[denseNum], GetX(natives[denseNum]) + dif, GetY(natives[denseNum]) + dif, vgtSteam, 0, true}, swh = false}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
190 |
AnimInsertStepNext({func = AnimWait, args = {natives[denseNum], 800}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
191 |
AnimInsertStepNext({func = AnimVisualGear, args = {natives[denseNum], GetX(natives[denseNum]) + dif, GetY(natives[denseNum]) + dif, vgtSteam, 0, true}, swh = false}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
192 |
AnimInsertStepNext({func = AnimVisualGear, args = {natives[denseNum], GetX(natives[denseNum]) + dif, GetY(natives[denseNum]) + dif, vgtSteam, 0, true}, swh = false}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
193 |
AnimInsertStepNext({func = AnimWait, args = {natives[denseNum], 800}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
194 |
AnimInsertStepNext({func = AnimVisualGear, args = {natives[denseNum], GetX(natives[denseNum]) + dif, GetY(natives[denseNum]) + dif, vgtSteam, 0, true}, swh = false}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
195 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
196 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
197 |
function SaySafe() |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
198 |
local i = 1 |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
199 |
while gearr == nil do |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
200 |
if nativeDead[i] ~= true and nativeHidden[i] ~= true then |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
201 |
gearr = natives[i] |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
202 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
203 |
i = i + 1 |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
204 |
end |
7259 | 205 |
AnimInsertStepNext({func = AnimSay, args = {natives[wiseNum], loc("We are indeed."), SAY_SAY, 2500}}) |
206 |
AnimInsertStepNext({func = AnimSay, args = {gearr, loc("I think we are safe here."), SAY_SAY, 4000}}) |
|
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
207 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
208 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
209 |
function ReviveNatives() |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
210 |
for i = 1, 7 do |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
211 |
if nativeHidden[i] == true and nativeDead[i] ~= true then |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
212 |
RestoreHog(natives[i]) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
213 |
nativeHidden[i] = false |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
214 |
nativeRevived[i] = true |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
215 |
AnimInsertStepNext({func = AnimOutOfNowhere, args = {natives[i], unpack(nativePos[i])}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
216 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
217 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
218 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
219 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
220 |
function WonderAlive() |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
221 |
if nativeRevived[waterNum] == true then |
7259 | 222 |
AnimInsertStepNext({func = AnimSay, args = {natives[waterNum], loc("I'm...alive? How? Why?"), SAY_THINK, 3500}}) |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
223 |
AnimInsertStepNext({func = AnimWait, args = {natives[waterNum], 800}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
224 |
AnimInsertStepNext({func = AnimTurn, args = {natives[waterNum], "Left"}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
225 |
AnimInsertStepNext({func = AnimWait, args = {natives[waterNum], 800}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
226 |
AnimInsertStepNext({func = AnimTurn, args = {natives[waterNum], "Right"}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
227 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
228 |
if nativeRevived[leaksNum] == true and nativeRevived[denseNum] == true then |
7259 | 229 |
AnimInsertStepNext({func = AnimSay, args = {natives[leaksNum], loc("But why would they help us?"), SAY_SAY, 4000}}) |
230 |
AnimInsertStepNext({func = AnimSay, args = {natives[leaksNum], loc("It must be the aliens!"), SAY_SAY, 3500}}) |
|
7417
2520705b857f
Switched Fell From Heaven to Fell From Grace on missions 5, 6.
belphegorr <szabibibi@gmail.com>
parents:
7259
diff
changeset
|
231 |
AnimInsertStepNext({func = AnimSay, args = {natives[girlNum], loc("You just appeared out of thin air!"), SAY_SAY, 5000}}) |
7259 | 232 |
AnimInsertStepNext({func = AnimSay, args = {natives[leaksNum], loc("But...we died!"), SAY_SAY, 2500}}) |
233 |
AnimInsertStepNext({func = AnimSay, args = {natives[leaksNum], loc("This must be the caves!"), SAY_SAY, 3500}}) |
|
234 |
AnimInsertStepNext({func = AnimSay, args = {natives[denseNum], loc("Dude, where are we?"), SAY_SAY, 3000}}) |
|
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
235 |
AnimInsertStepNext({func = AnimWait, args = {natives[leaksNum], 800}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
236 |
AnimInsertStepNext({func = AnimTurn, args = {natives[leaksNum], "Right"}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
237 |
AnimInsertStepNext({func = AnimTurn, args = {natives[denseNum], "Left"}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
238 |
AnimInsertStepNext({func = AnimWait, args = {natives[leaksNum], 800}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
239 |
AnimInsertStepNext({func = AnimTurn, args = {natives[leaksNum], "Left"}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
240 |
AnimInsertStepNext({func = AnimTurn, args = {natives[denseNum], "Right"}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
241 |
AnimInsertStepNext({func = AnimWait, args = {natives[leaksNum], 800}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
242 |
AnimInsertStepNext({func = AnimTurn, args = {natives[leaksNum], "Right"}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
243 |
AnimInsertStepNext({func = AnimTurn, args = {natives[denseNum], "Left"}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
244 |
AnimInsertStepNext({func = AnimWait, args = {natives[leaksNum], 800}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
245 |
AnimInsertStepNext({func = AnimTurn, args = {natives[leaksNum], "Left"}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
246 |
AnimInsertStepNext({func = AnimTurn, args = {natives[denseNum], "Right"}}) |
7417
2520705b857f
Switched Fell From Heaven to Fell From Grace on missions 5, 6.
belphegorr <szabibibi@gmail.com>
parents:
7259
diff
changeset
|
247 |
AnimInsertStepNext({func = AnimCustomFunction, swh = false, args = {natives[leaksNum], CondNeedToTurn, {natives[leaksNum], natives[girlNum]}}}) |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
248 |
if nativeDead[chiefNum] ~= true then |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
249 |
AnimInsertStepNext({func = AnimTurn, args = {natives[chiefNum], "Right"}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
250 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
251 |
elseif nativeRevived[leaksNum] == true then |
7259 | 252 |
AnimInsertStepNext({func = AnimSay, args = {natives[leaksNum], loc("Why would they do this?"), SAY_SAY, 6000}}) |
253 |
AnimInsertStepNext({func = AnimSay, args = {natives[wiseNum], loc("It must be the aliens' deed."), SAY_SAY, 5000}}) |
|
254 |
AnimInsertStepNext({func = AnimSay, args = {natives[wiseNum], loc("Do not laugh, inexperienced one, for he speaks the truth!"), SAY_SAY, 10000}}) |
|
13359 | 255 |
AnimInsertStepNext({func = AnimSay, args = {natives[leaksNum], loc("Yeah, sure! I died. Hilarious!"), SAY_SAY, 6000}}) |
7259 | 256 |
AnimInsertStepNext({func = AnimSay, args = {gearr, loc("You're...alive!? But we saw you die!"), SAY_SAY, 6000}}) |
12268
2c8e7e73ef58
Use format strings everywhere in A Classic Fairytale (for translators)
Wuzzy <almikes@aol.com>
parents:
12054
diff
changeset
|
257 |
AnimInsertStepNext({func = AnimSay, args = {gearr, loc("Huh?"), SAY_SAY, 2000}}) |
7259 | 258 |
AnimInsertStepNext({func = AnimSay, args = {natives[leaksNum], loc("Wow, what a dream!"), SAY_SAY, 3000}}) |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
259 |
if nativeDead[chiefNum] ~= true then |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
260 |
AnimInsertStepNext({func = AnimTurn, args = {natives[chiefNum], "Right"}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
261 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
262 |
AnimInsertStepNext({func = AnimCustomFunction, swh = false, args = {natives[leaksNum], CondNeedToTurn, {natives[leaksNum], natives[wiseNum]}}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
263 |
AnimInsertStepNext({func = AnimCustomFunction, swh = false, args = {natives[leaksNum], CondNeedToTurn, {natives[leaksNum], gearr}}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
264 |
elseif nativeRevived[denseNum] == true then |
7259 | 265 |
AnimInsertStepNext({func = AnimSay, args = {natives[denseNum], loc("Dude, that's so cool!"), SAY_SAY, 3000}}) |
266 |
AnimInsertStepNext({func = AnimSay, args = {natives[wiseNum], loc("It must be the aliens' deed."), SAY_SAY, 5000}}) |
|
267 |
AnimInsertStepNext({func = AnimSay, args = {natives[denseNum], loc("But that's impossible!"), SAY_SAY, 3000}}) |
|
268 |
AnimInsertStepNext({func = AnimSay, args = {natives[wiseNum], loc("It was not a dream, unwise one!"), SAY_SAY, 5000}}) |
|
269 |
AnimInsertStepNext({func = AnimSay, args = {natives[denseNum], loc("Exactly, man! That was my dream."), SAY_SAY, 5000}}) |
|
270 |
AnimInsertStepNext({func = AnimSay, args = {gearr, loc("You're...alive!? But we saw you die!"), SAY_SAY, 6000}}) |
|
12268
2c8e7e73ef58
Use format strings everywhere in A Classic Fairytale (for translators)
Wuzzy <almikes@aol.com>
parents:
12054
diff
changeset
|
271 |
AnimInsertStepNext({func = AnimSay, args = {gearr, loc("Huh?"), SAY_SAY, 2000}}) |
7259 | 272 |
AnimInsertStepNext({func = AnimSay, args = {natives[denseNum], loc("Dude, wow! I just had the weirdest high!"), SAY_SAY, 6000}}) |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
273 |
if nativeDead[chiefNum] ~= true then |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
274 |
AnimInsertStepNext({func = AnimTurn, args = {natives[chiefNum], "Right"}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
275 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
276 |
AnimInsertStepNext({func = AnimCustomFunction, swh = false, args = {natives[denseNum], CondNeedToTurn, {natives[denseNum], natives[wiseNum]}}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
277 |
AnimInsertStepNext({func = AnimCustomFunction, swh = false, args = {natives[denseNum], CondNeedToTurn, {natives[denseNum], gearr}}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
278 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
279 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
280 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
281 |
function ExplainAlive() |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
282 |
if needRevival == true and m4WaterDead == 1 then |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
283 |
RestoreCyborg() |
7448
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
284 |
AnimSetGearPosition(cyborg, unpack(cyborgPos)) |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
285 |
AnimInsertStepNext({func = AnimCustomFunction, args = {water, HideCyborg, {}}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
286 |
AnimInsertStepNext({func = AnimSwitchHog, args = {water}}) |
13359 | 287 |
AnimInsertStepNext({func = AnimSay, args = {cyborg, loc("The answer is ... entertainment. You'll see what I mean."), SAY_SAY, 8000}}) |
12905
a9e4e8fa852c
Fix various typos in translatable strings
Wuzzy <Wuzzy2@mail.ru>
parents:
12799
diff
changeset
|
288 |
AnimInsertStepNext({func = AnimSay, args = {cyborg, loc("You're probably wondering why I brought you back ..."), SAY_SAY, 8000}}) |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
289 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
290 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
291 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
292 |
function SpyDebate() |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
293 |
if m2Choice == choiceAccepted then |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
294 |
spyHog = natives[denseNum] |
7259 | 295 |
AnimInsertStepNext({func = AnimSay, args = {natives[wiseNum], loc("What shall we do with the traitor?"), SAY_SAY, 6000}}) |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
296 |
AnimInsertStepNext({func = SetHealth, swh = false, args = {natives[denseNum], 26}}) |
7425 | 297 |
AnimInsertStepNext({func = AnimVisualGear, args = {natives[wiseNum], GetGearPosition(natives[denseNum]), vgtExplosion, 0, true}}) |
7259 | 298 |
AnimInsertStepNext({func = AnimSay, args = {natives[wiseNum], loc("Here, let me help you!"), SAY_SAY, 3000}}) |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
299 |
if nativeDead[chiefNum] == true then |
7417
2520705b857f
Switched Fell From Heaven to Fell From Grace on missions 5, 6.
belphegorr <szabibibi@gmail.com>
parents:
7259
diff
changeset
|
300 |
AnimInsertStepNext({func = AnimSay, args = {natives[leaksNum], loc("I forgot that she's the daughter of the chief, too..."), SAY_THINK, 7000}}) |
2520705b857f
Switched Fell From Heaven to Fell From Grace on missions 5, 6.
belphegorr <szabibibi@gmail.com>
parents:
7259
diff
changeset
|
301 |
AnimInsertStepNext({func = AnimSay, args = {natives[girlNum], loc("You killed my father, you monster!"), SAY_SAY, 5000}}) |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
302 |
end |
7259 | 303 |
AnimInsertStepNext({func = AnimSay, args = {natives[denseNum], loc("Look, I had no choice!"), SAY_SAY, 3000}}) |
304 |
AnimInsertStepNext({func = AnimSay, args = {natives[leaksNum], loc("You have been giving us out to the enemy, haven't you!"), SAY_SAY, 7000}}) |
|
305 |
AnimInsertStepNext({func = AnimSay, args = {natives[leaksNum], loc("You're a pathetic liar!"), SAY_SAY, 3000}}) |
|
306 |
AnimInsertStepNext({func = AnimSay, args = {natives[leaksNum], loc("Interesting! Last time you said you killed a cannibal!"), SAY_SAY, 7000}}) |
|
307 |
AnimInsertStepNext({func = AnimSay, args = {natives[denseNum], loc("I told you, I just found them."), SAY_SAY, 4500}}) |
|
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
308 |
AnimInsertStepNext({func = AnimCustomFunction, args = {natives[denseNum], EmitDenseClouds, {"Left"}}}) |
7259 | 309 |
AnimInsertStepNext({func = AnimSay, args = {natives[leaksNum], loc("Where did you get the weapons in the forest, Dense Cloud?"), SAY_SAY, 8000}}) |
310 |
AnimInsertStepNext({func = AnimSay, args = {natives[leaksNum], loc("Not now, Fiery Water!"), SAY_SAY, 3000}}) |
|
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
311 |
else |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
312 |
spyHog = natives[waterNum] |
7259 | 313 |
AnimInsertStepNext({func = AnimSay, args = {natives[wiseNum], loc("What shall we do with the traitor?"), SAY_SAY, 5000}}) |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
314 |
AnimInsertStepNext({func = SetHealth, swh = false, args = {natives[waterNum], 26}}) |
7425 | 315 |
AnimInsertStepNext({func = AnimVisualGear, args = {natives[wiseNum], nativePos[denseNum][1] + 50, nativePos[denseNum][2], vgtExplosion, 0, true}}) |
7417
2520705b857f
Switched Fell From Heaven to Fell From Grace on missions 5, 6.
belphegorr <szabibibi@gmail.com>
parents:
7259
diff
changeset
|
316 |
AnimInsertStepNext({func = AnimSay, args = {natives[girlNum], loc("I can't believe what I'm hearing!"), SAY_SAY, 5500}}) |
7259 | 317 |
AnimInsertStepNext({func = AnimSay, args = {natives[waterNum], loc("You know what? I don't even regret anything!"), SAY_SAY, 7000}}) |
7417
2520705b857f
Switched Fell From Heaven to Fell From Grace on missions 5, 6.
belphegorr <szabibibi@gmail.com>
parents:
7259
diff
changeset
|
318 |
AnimInsertStepNext({func = AnimSay, args = {natives[girlNum], loc("In fact, you are the only one that's been acting strangely."), SAY_SAY, 8000}}) |
7259 | 319 |
AnimInsertStepNext({func = AnimSay, args = {natives[waterNum], loc("Are you accusing me of something?"), SAY_SAY, 3500}}) |
12268
2c8e7e73ef58
Use format strings everywhere in A Classic Fairytale (for translators)
Wuzzy <almikes@aol.com>
parents:
12054
diff
changeset
|
320 |
AnimInsertStepNext({func = AnimSay, args = {natives[leaksNum], loc("Seems like every time you take a \"walk\", the enemy finds us!"), SAY_SAY, 8000}}) |
7259 | 321 |
AnimInsertStepNext({func = AnimSay, args = {natives[waterNum], loc("You know...taking a stroll."), SAY_SAY, 3500}}) |
322 |
AnimInsertStepNext({func = AnimSay, args = {natives[leaksNum], loc("Where have you been?!"), SAY_SAY, 3000}}) |
|
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
323 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
324 |
if nativeRevived[waterNum] == true then |
7259 | 325 |
AnimInsertStepNext({func = AnimSay, args = {natives[waterNum], loc("You won't believe what happened to me!"), SAY_SAY, 5500}}) |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
326 |
end |
7259 | 327 |
AnimInsertStepNext({func = AnimSay, args = {natives[waterNum], loc("Hey, guys!"), SAY_SAY, 2000}}) |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
328 |
AnimInsertStepNext({func = AnimMove, args = {natives[waterNum], "Left", nativePos[denseNum][1] + 50, nativePos[denseNum][2]}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
329 |
AnimInsertStepNext({func = AnimJump, args = {natives[waterNum], "back"}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
330 |
AnimInsertStepNext({func = AnimTurn, args = {natives[waterNum], "Right"}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
331 |
AnimInsertStepNext({func = AnimMove, args = {natives[waterNum], "Left", 1228, 412}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
332 |
AnimInsertStepNext({func = AnimJump, args = {natives[waterNum], "long"}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
333 |
AnimInsertStepNext({func = AnimJump, args = {natives[waterNum], "long"}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
334 |
AnimInsertStepNext({func = AnimJump, args = {natives[waterNum], "long"}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
335 |
AnimInsertStepNext({func = AnimTurn, args = {natives[waterNum], "Left"}}) |
7259 | 336 |
AnimInsertStepNext({func = AnimSay, args = {natives[wiseNum], loc("There must be a spy among us!"), SAY_SAY, 4000}}) |
7417
2520705b857f
Switched Fell From Heaven to Fell From Grace on missions 5, 6.
belphegorr <szabibibi@gmail.com>
parents:
7259
diff
changeset
|
337 |
AnimInsertStepNext({func = AnimSay, args = {natives[girlNum], loc("We made sure noone followed us!"), SAY_SAY, 4000}}) |
7259 | 338 |
AnimInsertStepNext({func = AnimSay, args = {natives[leaksNum], loc("What? Here? How did they find us?!"), SAY_SAY, 5000}}) |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
339 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
340 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
341 |
function AnimationSetup() |
7518
70babd9073a2
Mission 5: fixed a few bugs that came with the update (ammo menu bug and initial gear elimination bug)
belphegorr <szabibibi@gmail.com>
parents:
7512
diff
changeset
|
342 |
table.insert(startAnim, {func = AnimWait, swh = false, args = {natives[leaksNum], 3000}}) |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
343 |
table.insert(startAnim, {func = AnimCustomFunction, swh = false, args = {natives[leaksNum], SaySafe, {}}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
344 |
if needRevival == true then |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
345 |
table.insert(startAnim, {func = AnimCustomFunction, swh = false, args = {cyborg, ReviveNatives, {}}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
346 |
table.insert(startAnim, {func = AnimCustomFunction, swh = false, args = {natives[leaksNum], WonderAlive, {}}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
347 |
table.insert(startAnim, {func = AnimCustomFunction, swh = false, args = {cyborg, ExplainAlive, {}}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
348 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
349 |
table.insert(startAnim, {func = AnimCustomFunction, swh = false, args = {natives[leaksNum], RestoreWave, {1}}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
350 |
table.insert(startAnim, {func = AnimOutOfNowhere, args = {cannibals[1], unpack(cannibalPos[1])}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
351 |
table.insert(startAnim, {func = AnimOutOfNowhere, args = {cannibals[2], unpack(cannibalPos[2])}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
352 |
table.insert(startAnim, {func = AnimOutOfNowhere, args = {cannibals[3], unpack(cannibalPos[3])}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
353 |
table.insert(startAnim, {func = AnimWait, args = {natives[leaksNum], 1000}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
354 |
table.insert(startAnim, {func = AnimCustomFunction, swh = false, args = {natives[leaksNum], SpyDebate, {}}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
355 |
AddSkipFunction(startAnim, SkipStartAnim, {}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
356 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
357 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
358 |
function SetupWave2Anim() |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
359 |
for i = 7, 1, -1 do |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
360 |
if nativeDead[i] ~= true then |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
361 |
speakerHog = natives[i] |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
362 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
363 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
364 |
table.insert(wave2Anim, {func = AnimOutOfNowhere, args = {cannibals[4], unpack(cannibalPos[4])}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
365 |
table.insert(wave2Anim, {func = AnimOutOfNowhere, args = {cannibals[5], unpack(cannibalPos[5])}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
366 |
table.insert(wave2Anim, {func = AnimOutOfNowhere, args = {cannibals[6], unpack(cannibalPos[6])}}) |
7259 | 367 |
table.insert(wave2Anim, {func = AnimSay, args = {speakerHog, loc("Look out! There's more of them!"), SAY_SHOUT, 5000}}) |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
368 |
AddSkipFunction(wave2Anim, SkipWave2Anim, {}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
369 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
370 |
|
7448
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
371 |
function PutCircles() |
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
372 |
if circlesPut then |
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
373 |
return |
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
374 |
end |
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
375 |
vCircs[1] = AddVisualGear(0,0,vgtCircle,0,true) |
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
376 |
vCircs[2] = AddVisualGear(0,0,vgtCircle,0,true) |
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
377 |
vCircs[3] = AddVisualGear(0,0,vgtCircle,0,true) |
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
378 |
SetVisualGearValues(vCircs[1], cannibalPos[7][1], cannibalPos[7][2], 100, 255, 1, 10, 0, 120, 3, 0xff00ffff) |
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
379 |
SetVisualGearValues(vCircs[2], cannibalPos[8][1], cannibalPos[8][2], 100, 255, 1, 10, 0, 120, 3, 0xff00ffff) |
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
380 |
SetVisualGearValues(vCircs[3], cannibalPos[9][1], cannibalPos[9][2], 100, 255, 1, 10, 0, 120, 3, 0xff00ffff) |
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
381 |
circlesPut = true |
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
382 |
end |
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
383 |
|
14597
32cf7472da06
ACF5: Delete circles vgears after wave3 appeared
Wuzzy <Wuzzy2@mail.ru>
parents:
14505
diff
changeset
|
384 |
function DeleteCircles() |
32cf7472da06
ACF5: Delete circles vgears after wave3 appeared
Wuzzy <Wuzzy2@mail.ru>
parents:
14505
diff
changeset
|
385 |
for i=1, #vCircs do |
32cf7472da06
ACF5: Delete circles vgears after wave3 appeared
Wuzzy <Wuzzy2@mail.ru>
parents:
14505
diff
changeset
|
386 |
DeleteVisualGear(vCircs[i]) |
32cf7472da06
ACF5: Delete circles vgears after wave3 appeared
Wuzzy <Wuzzy2@mail.ru>
parents:
14505
diff
changeset
|
387 |
end |
32cf7472da06
ACF5: Delete circles vgears after wave3 appeared
Wuzzy <Wuzzy2@mail.ru>
parents:
14505
diff
changeset
|
388 |
end |
32cf7472da06
ACF5: Delete circles vgears after wave3 appeared
Wuzzy <Wuzzy2@mail.ru>
parents:
14505
diff
changeset
|
389 |
|
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
390 |
function SetupWave2DeadAnim() |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
391 |
for i = 7, 1, -1 do |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
392 |
if nativeDead[i] ~= true then |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
393 |
deployedHog = natives[i] |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
394 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
395 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
396 |
if nativeDead[wiseNum] ~= true and band(GetState(natives[wiseNum]), gstDrowning) == 0 then |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
397 |
if nativesNum > 1 then |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
398 |
table.insert(wave2DeadAnim, {func = AnimWait, args = {natives[wiseNum], 1500}}) |
7259 | 399 |
table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], loc("What a strange feeling!"), SAY_THINK, 3000}}) |
400 |
table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], loc("I need to warn the others."), SAY_THINK, 3000}}) |
|
401 |
table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], loc("If only I had a way..."), SAY_THINK, 3000}}) |
|
402 |
table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], loc("Oh, silly me! I forgot that I'm the shaman."), SAY_THINK, 6000}}) |
|
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
403 |
table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {natives[wiseNum], TeleportNatives, {}}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
404 |
table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {natives[wiseNum], TurnNatives, {natives[wiseNum]}}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
405 |
table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {natives[wiseNum], CondNeedToTurn, {natives[wiseNum], deployedHog}}}) |
7259 | 406 |
table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], loc("I sense another wave of cannibals heading our way!"), SAY_SAY, 6500}}) |
7448
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
407 |
table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], loc("I feel something...a place! They will arrive near the circles!"), SAY_SAY, 7500}}) |
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
408 |
table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {natives[wiseNum], PutCircles, {}}}) |
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
409 |
table.insert(wave2DeadAnim, {func = AnimWait, args = {natives[wiseNum], 1500}}) |
7259 | 410 |
table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], loc("We need to prevent their arrival!"), SAY_SAY, 4500}}) |
411 |
table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], loc("Go, quick!"), SAY_SAY, 2500}}) |
|
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
412 |
table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {natives[wiseNum], DeployHog, {}}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
413 |
table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {natives[wiseNum], RestoreCyborg, {}}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
414 |
table.insert(wave2DeadAnim, {func = AnimOutOfNowhere, swh = false, args = {cyborg, cyborgPos2[1], cyborgPos2[2]}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
415 |
table.insert(wave2DeadAnim, {func = AnimTurn, args = {cyborg, "Left"}}) |
14779
d0ad9fd923fd
ACF5: Fix crash when skipping wave2 cut sequence with cyborg
Wuzzy <Wuzzy2@mail.ru>
parents:
14666
diff
changeset
|
416 |
if nativesNum > 1 then |
d0ad9fd923fd
ACF5: Fix crash when skipping wave2 cut sequence with cyborg
Wuzzy <Wuzzy2@mail.ru>
parents:
14666
diff
changeset
|
417 |
table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {cyborg, IsolateNatives, {}}}) |
d0ad9fd923fd
ACF5: Fix crash when skipping wave2 cut sequence with cyborg
Wuzzy <Wuzzy2@mail.ru>
parents:
14666
diff
changeset
|
418 |
table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {cyborg, PutCGI, {}}}) |
d0ad9fd923fd
ACF5: Fix crash when skipping wave2 cut sequence with cyborg
Wuzzy <Wuzzy2@mail.ru>
parents:
14666
diff
changeset
|
419 |
table.insert(wave2DeadAnim, {func = AnimSay, args = {cyborg, loc("I want to see how it handles this!"), SAY_SAY, 6000}}) |
d0ad9fd923fd
ACF5: Fix crash when skipping wave2 cut sequence with cyborg
Wuzzy <Wuzzy2@mail.ru>
parents:
14666
diff
changeset
|
420 |
end |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
421 |
table.insert(wave2DeadAnim, {func = AnimSwitchHog, args = {deployedHog}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
422 |
table.insert(wave2DeadAnim, {func = AnimDisappear, args = {cyborg, 0, 0}}) |
7425 | 423 |
-- table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {cyborg, DeployHog, {}}}) |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
424 |
table.insert(wave2DeadAnim, {func = AnimCustomFunction, swh = false, args = {cyborg, HideCyborg, {}}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
425 |
else |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
426 |
table.insert(wave2DeadAnim, {func = AnimWait, args = {natives[wiseNum], 1500}}) |
7259 | 427 |
table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], loc("What a strange feeling!"), SAY_THINK, 3000}}) |
428 |
table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], loc("I sense another wave of cannibals heading my way!"), SAY_THINK, 6500}}) |
|
7448
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
429 |
table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], loc("I feel something...a place! They will arrive near the circles!"), SAY_SAY, 7500}}) |
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
430 |
table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {natives[wiseNum], PutCircles, {}}}) |
7259 | 431 |
table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], loc("I need to prevent their arrival!"), SAY_THINK, 4500}}) |
432 |
table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], loc("If only I had a way..."), SAY_THINK, 3000}}) |
|
433 |
table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], loc("Oh, silly me! I forgot that I'm the shaman."), SAY_THINK, 6000}}) |
|
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
434 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
435 |
else |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
436 |
table.insert(wave2DeadAnim, {func = AnimWait, args = {cyborg, 1500}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
437 |
table.insert(wave2DeadAnim, {func = AnimCustomFunction, swh = false, args = {cyborg, RestoreCyborg, {}}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
438 |
table.insert(wave2DeadAnim, {func = AnimOutOfNowhere, args = {cyborg, cyborgPos2[1], cyborgPos2[2]}}) |
7448
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
439 |
table.insert(wave2DeadAnim, {func = AnimTurn, args = {cyborg, "Left"}}) |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
440 |
table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {cyborg, TeleportNatives, {}}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
441 |
table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {cyborg, TurnNatives, {cyborg}}}) |
7259 | 442 |
table.insert(wave2DeadAnim, {func = AnimSay, args = {cyborg, loc("Oh, my! This is even more entertaining than I've expected!"), SAY_SAY, 7500}}) |
443 |
table.insert(wave2DeadAnim, {func = AnimSay, args = {cyborg, loc("You might want to find a way to instantly kill arriving cannibals!"), SAY_SAY, 8000}}) |
|
444 |
table.insert(wave2DeadAnim, {func = AnimSay, args = {cyborg, loc("I believe there's more of them."), SAY_SAY, 4000}}) |
|
7425 | 445 |
table.insert(wave2DeadAnim, {func = AnimSay, args = {cyborg, loc("I marked the place of their arrival. You're welcome!"), SAY_SAY, 6000}}) |
7448
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
446 |
table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {natives[wiseNum], PutCircles, {}}}) |
7425 | 447 |
table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {deployedHog, DeployHog, {}}}) |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
448 |
if nativesNum > 1 then |
7425 | 449 |
-- table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {natives[wiseNum], RestoreCyborg, {}}}) |
450 |
-- table.insert(wave2DeadAnim, {func = AnimOutOfNowhere, swh = false, args = {cyborg, cyborgPos2[1], cyborgPos2[2]}}) |
|
451 |
-- table.insert(wave2DeadAnim, {func = AnimTurn, args = {cyborg, "Left"}}) |
|
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
452 |
table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {cyborg, IsolateNatives, {}}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
453 |
table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {cyborg, PutCGI, {}}}) |
7259 | 454 |
table.insert(wave2DeadAnim, {func = AnimSay, args = {cyborg, loc("I want to see how it handles this!"), SAY_SAY, 6000}}) |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
455 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
456 |
table.insert(wave2DeadAnim, {func = AnimSwitchHog, args = {deployedHog}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
457 |
table.insert(wave2DeadAnim, {func = AnimDisappear, swh = false, args = {cyborg, 0, 0}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
458 |
table.insert(wave2DeadAnim, {func = AnimCustomFunction, swh = false, args = {cyborg, HideCyborg, {}}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
459 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
460 |
AddSkipFunction(wave2DeadAnim, SkipWave2DeadAnim, {}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
461 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
462 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
463 |
function IsolateNatives() |
12366
05fe955e2763
Fix engine crash in ACF mission 5 when skipping animation after killing wave 2 while the cyborg is talking
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
464 |
if not nativesIsolated then |
05fe955e2763
Fix engine crash in ACF mission 5 when skipping animation after killing wave 2 while the cyborg is talking
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
465 |
PlaceGirder(710, 299, 6) |
05fe955e2763
Fix engine crash in ACF mission 5 when skipping animation after killing wave 2 while the cyborg is talking
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
466 |
PlaceGirder(690, 299, 6) |
05fe955e2763
Fix engine crash in ACF mission 5 when skipping animation after killing wave 2 while the cyborg is talking
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
467 |
PlaceGirder(761, 209, 4) |
05fe955e2763
Fix engine crash in ACF mission 5 when skipping animation after killing wave 2 while the cyborg is talking
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
468 |
PlaceGirder(921, 209, 4) |
05fe955e2763
Fix engine crash in ACF mission 5 when skipping animation after killing wave 2 while the cyborg is talking
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
469 |
PlaceGirder(1081, 209, 4) |
05fe955e2763
Fix engine crash in ACF mission 5 when skipping animation after killing wave 2 while the cyborg is talking
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
470 |
PlaceGirder(761, 189, 4) |
05fe955e2763
Fix engine crash in ACF mission 5 when skipping animation after killing wave 2 while the cyborg is talking
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
471 |
PlaceGirder(921, 189, 4) |
05fe955e2763
Fix engine crash in ACF mission 5 when skipping animation after killing wave 2 while the cyborg is talking
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
472 |
PlaceGirder(1081, 189, 4) |
05fe955e2763
Fix engine crash in ACF mission 5 when skipping animation after killing wave 2 while the cyborg is talking
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
473 |
PlaceGirder(761, 169, 4) |
05fe955e2763
Fix engine crash in ACF mission 5 when skipping animation after killing wave 2 while the cyborg is talking
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
474 |
PlaceGirder(921, 169, 4) |
05fe955e2763
Fix engine crash in ACF mission 5 when skipping animation after killing wave 2 while the cyborg is talking
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
475 |
PlaceGirder(1081, 169, 4) |
05fe955e2763
Fix engine crash in ACF mission 5 when skipping animation after killing wave 2 while the cyborg is talking
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
476 |
PlaceGirder(761, 149, 4) |
05fe955e2763
Fix engine crash in ACF mission 5 when skipping animation after killing wave 2 while the cyborg is talking
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
477 |
PlaceGirder(921, 149, 4) |
05fe955e2763
Fix engine crash in ACF mission 5 when skipping animation after killing wave 2 while the cyborg is talking
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
478 |
PlaceGirder(1081, 149, 4) |
05fe955e2763
Fix engine crash in ACF mission 5 when skipping animation after killing wave 2 while the cyborg is talking
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
479 |
PlaceGirder(761, 129, 4) |
05fe955e2763
Fix engine crash in ACF mission 5 when skipping animation after killing wave 2 while the cyborg is talking
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
480 |
PlaceGirder(921, 129, 4) |
05fe955e2763
Fix engine crash in ACF mission 5 when skipping animation after killing wave 2 while the cyborg is talking
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
481 |
PlaceGirder(1081, 129, 4) |
05fe955e2763
Fix engine crash in ACF mission 5 when skipping animation after killing wave 2 while the cyborg is talking
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
482 |
PlaceGirder(1120, 261, 2) |
05fe955e2763
Fix engine crash in ACF mission 5 when skipping animation after killing wave 2 while the cyborg is talking
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
483 |
PlaceGirder(1140, 261, 2) |
05fe955e2763
Fix engine crash in ACF mission 5 when skipping animation after killing wave 2 while the cyborg is talking
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
484 |
PlaceGirder(1160, 261, 2) |
05fe955e2763
Fix engine crash in ACF mission 5 when skipping animation after killing wave 2 while the cyborg is talking
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
485 |
AddAmmo(deployedHog, amDEagle, 0) |
05fe955e2763
Fix engine crash in ACF mission 5 when skipping animation after killing wave 2 while the cyborg is talking
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
486 |
AddAmmo(deployedHog, amFirePunch, 0) |
05fe955e2763
Fix engine crash in ACF mission 5 when skipping animation after killing wave 2 while the cyborg is talking
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
487 |
nativesIsolated = true |
05fe955e2763
Fix engine crash in ACF mission 5 when skipping animation after killing wave 2 while the cyborg is talking
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
488 |
end |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
489 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
490 |
|
15169
2ad1f0bdc1f3
ACF5: In final animation, move camera to empty cage
Wuzzy <Wuzzy2@mail.ru>
parents:
15167
diff
changeset
|
491 |
-- Move camera to (x, y) |
2ad1f0bdc1f3
ACF5: In final animation, move camera to empty cage
Wuzzy <Wuzzy2@mail.ru>
parents:
15167
diff
changeset
|
492 |
function MoveCameraCustom(x, y) |
2ad1f0bdc1f3
ACF5: In final animation, move camera to empty cage
Wuzzy <Wuzzy2@mail.ru>
parents:
15167
diff
changeset
|
493 |
-- We use a dummy gear to feed FollowGear |
2ad1f0bdc1f3
ACF5: In final animation, move camera to empty cage
Wuzzy <Wuzzy2@mail.ru>
parents:
15167
diff
changeset
|
494 |
local cameraGear = AddGear(x, y, gtGenericFaller, 0, 0, 0, 5000) |
2ad1f0bdc1f3
ACF5: In final animation, move camera to empty cage
Wuzzy <Wuzzy2@mail.ru>
parents:
15167
diff
changeset
|
495 |
SetState(cameraGear, bor(GetState(cameraGear), gstNoGravity+gstInvisible)) |
2ad1f0bdc1f3
ACF5: In final animation, move camera to empty cage
Wuzzy <Wuzzy2@mail.ru>
parents:
15167
diff
changeset
|
496 |
FollowGear(cameraGear) |
2ad1f0bdc1f3
ACF5: In final animation, move camera to empty cage
Wuzzy <Wuzzy2@mail.ru>
parents:
15167
diff
changeset
|
497 |
end |
2ad1f0bdc1f3
ACF5: In final animation, move camera to empty cage
Wuzzy <Wuzzy2@mail.ru>
parents:
15167
diff
changeset
|
498 |
|
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
499 |
function PutCGI() |
13692
a8b2a5e7e9db
Clean up more visual gears stuff in scripts
Wuzzy <Wuzzy2@mail.ru>
parents:
13588
diff
changeset
|
500 |
AddVisualGear(710, 299, vgtExplosion, 0, false) |
a8b2a5e7e9db
Clean up more visual gears stuff in scripts
Wuzzy <Wuzzy2@mail.ru>
parents:
13588
diff
changeset
|
501 |
AddVisualGear(690, 299, vgtExplosion, 0, false) |
a8b2a5e7e9db
Clean up more visual gears stuff in scripts
Wuzzy <Wuzzy2@mail.ru>
parents:
13588
diff
changeset
|
502 |
AddVisualGear(761, 209, vgtExplosion, 0, false) |
a8b2a5e7e9db
Clean up more visual gears stuff in scripts
Wuzzy <Wuzzy2@mail.ru>
parents:
13588
diff
changeset
|
503 |
AddVisualGear(921, 209, vgtExplosion, 0, false) |
a8b2a5e7e9db
Clean up more visual gears stuff in scripts
Wuzzy <Wuzzy2@mail.ru>
parents:
13588
diff
changeset
|
504 |
AddVisualGear(1081, 209, vgtExplosion, 0, false) |
a8b2a5e7e9db
Clean up more visual gears stuff in scripts
Wuzzy <Wuzzy2@mail.ru>
parents:
13588
diff
changeset
|
505 |
AddVisualGear(761, 189, vgtExplosion, 0, false) |
a8b2a5e7e9db
Clean up more visual gears stuff in scripts
Wuzzy <Wuzzy2@mail.ru>
parents:
13588
diff
changeset
|
506 |
AddVisualGear(921, 189, vgtExplosion, 0, false) |
a8b2a5e7e9db
Clean up more visual gears stuff in scripts
Wuzzy <Wuzzy2@mail.ru>
parents:
13588
diff
changeset
|
507 |
AddVisualGear(1081, 189, vgtExplosion, 0, false) |
a8b2a5e7e9db
Clean up more visual gears stuff in scripts
Wuzzy <Wuzzy2@mail.ru>
parents:
13588
diff
changeset
|
508 |
AddVisualGear(761, 169, vgtExplosion, 0, false) |
a8b2a5e7e9db
Clean up more visual gears stuff in scripts
Wuzzy <Wuzzy2@mail.ru>
parents:
13588
diff
changeset
|
509 |
AddVisualGear(921, 169, vgtExplosion, 0, false) |
a8b2a5e7e9db
Clean up more visual gears stuff in scripts
Wuzzy <Wuzzy2@mail.ru>
parents:
13588
diff
changeset
|
510 |
AddVisualGear(1081, 169, vgtExplosion, 0, false) |
a8b2a5e7e9db
Clean up more visual gears stuff in scripts
Wuzzy <Wuzzy2@mail.ru>
parents:
13588
diff
changeset
|
511 |
AddVisualGear(761, 149, vgtExplosion, 0, false) |
a8b2a5e7e9db
Clean up more visual gears stuff in scripts
Wuzzy <Wuzzy2@mail.ru>
parents:
13588
diff
changeset
|
512 |
AddVisualGear(921, 149, vgtExplosion, 0, false) |
a8b2a5e7e9db
Clean up more visual gears stuff in scripts
Wuzzy <Wuzzy2@mail.ru>
parents:
13588
diff
changeset
|
513 |
AddVisualGear(1081, 149, vgtExplosion, 0, false) |
a8b2a5e7e9db
Clean up more visual gears stuff in scripts
Wuzzy <Wuzzy2@mail.ru>
parents:
13588
diff
changeset
|
514 |
AddVisualGear(761, 129, vgtExplosion, 0, false) |
a8b2a5e7e9db
Clean up more visual gears stuff in scripts
Wuzzy <Wuzzy2@mail.ru>
parents:
13588
diff
changeset
|
515 |
AddVisualGear(921, 129, vgtExplosion, 0, false) |
a8b2a5e7e9db
Clean up more visual gears stuff in scripts
Wuzzy <Wuzzy2@mail.ru>
parents:
13588
diff
changeset
|
516 |
AddVisualGear(1081, 129, vgtExplosion, 0, false) |
a8b2a5e7e9db
Clean up more visual gears stuff in scripts
Wuzzy <Wuzzy2@mail.ru>
parents:
13588
diff
changeset
|
517 |
AddVisualGear(1120, 261, vgtExplosion, 0, false) |
a8b2a5e7e9db
Clean up more visual gears stuff in scripts
Wuzzy <Wuzzy2@mail.ru>
parents:
13588
diff
changeset
|
518 |
AddVisualGear(1140, 261, vgtExplosion, 0, false) |
a8b2a5e7e9db
Clean up more visual gears stuff in scripts
Wuzzy <Wuzzy2@mail.ru>
parents:
13588
diff
changeset
|
519 |
AddVisualGear(1160, 261, vgtExplosion, 0, false) |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
520 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
521 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
522 |
function TeleportNatives() |
12366
05fe955e2763
Fix engine crash in ACF mission 5 when skipping animation after killing wave 2 while the cyborg is talking
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
523 |
if not nativesTeleported then |
05fe955e2763
Fix engine crash in ACF mission 5 when skipping animation after killing wave 2 while the cyborg is talking
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
524 |
nativePos[waterNum] = {1100, 288} |
05fe955e2763
Fix engine crash in ACF mission 5 when skipping animation after killing wave 2 while the cyborg is talking
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
525 |
for i = 1, 7 do |
05fe955e2763
Fix engine crash in ACF mission 5 when skipping animation after killing wave 2 while the cyborg is talking
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
526 |
if nativeDead[i] ~= true then |
05fe955e2763
Fix engine crash in ACF mission 5 when skipping animation after killing wave 2 while the cyborg is talking
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
527 |
AnimTeleportGear(natives[i], unpack(nativePos[i])) |
05fe955e2763
Fix engine crash in ACF mission 5 when skipping animation after killing wave 2 while the cyborg is talking
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
528 |
end |
05fe955e2763
Fix engine crash in ACF mission 5 when skipping animation after killing wave 2 while the cyborg is talking
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
529 |
end |
05fe955e2763
Fix engine crash in ACF mission 5 when skipping animation after killing wave 2 while the cyborg is talking
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
530 |
nativesTeleported = true |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
531 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
532 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
533 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
534 |
function TurnNatives(hog) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
535 |
for i = 1, 7 do |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
536 |
if nativeDead[i] == false then |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
537 |
if GetX(natives[i]) < GetX(hog) then |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
538 |
AnimTurn(natives[i], "Right") |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
539 |
else |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
540 |
AnimTurn(natives[i], "Left") |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
541 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
542 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
543 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
544 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
545 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
546 |
function DeployHog() |
12366
05fe955e2763
Fix engine crash in ACF mission 5 when skipping animation after killing wave 2 while the cyborg is talking
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
547 |
if not hogDeployed then |
12755
6cec6b881a1c
ACF mission 5: Take away switch and always play with deployed hog in final mission stage
Wuzzy <Wuzzy2@mail.ru>
parents:
12616
diff
changeset
|
548 |
-- Steal switch to force the deployed hog to be on its own |
6cec6b881a1c
ACF mission 5: Take away switch and always play with deployed hog in final mission stage
Wuzzy <Wuzzy2@mail.ru>
parents:
12616
diff
changeset
|
549 |
AddAmmo(deployedHog, amSwitch, 0) |
12366
05fe955e2763
Fix engine crash in ACF mission 5 when skipping animation after killing wave 2 while the cyborg is talking
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
550 |
AnimSwitchHog(deployedHog) |
05fe955e2763
Fix engine crash in ACF mission 5 when skipping animation after killing wave 2 while the cyborg is talking
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
551 |
AnimTeleportGear(deployedHog, unpack(deployedPos)) |
05fe955e2763
Fix engine crash in ACF mission 5 when skipping animation after killing wave 2 while the cyborg is talking
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
552 |
if deployedHog ~= natives[wiseNum] then |
05fe955e2763
Fix engine crash in ACF mission 5 when skipping animation after killing wave 2 while the cyborg is talking
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
553 |
AnimSay(deployedHog, loc("Why me?!"), SAY_THINK, 2000) |
05fe955e2763
Fix engine crash in ACF mission 5 when skipping animation after killing wave 2 while the cyborg is talking
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
554 |
end |
05fe955e2763
Fix engine crash in ACF mission 5 when skipping animation after killing wave 2 while the cyborg is talking
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
555 |
hogDeployed = true |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
556 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
557 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
558 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
559 |
function SetupAfterChoiceAnim() |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
560 |
for i = 7, 1, -1 do |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
561 |
if nativeDead[i] ~= true then |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
562 |
if natives[i] ~= spyHog then |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
563 |
speakerHog = natives[i] |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
564 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
565 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
566 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
567 |
if choice == choiceEliminate then |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
568 |
table.insert(afterChoiceAnim, {func = AnimWait, args = {speakerHog, 1500}}) |
7259 | 569 |
table.insert(afterChoiceAnim, {func = AnimSay, args = {speakerHog, loc("He won't be selling us out anymore!"), SAY_SAY, 6000}}) |
7417
2520705b857f
Switched Fell From Heaven to Fell From Grace on missions 5, 6.
belphegorr <szabibibi@gmail.com>
parents:
7259
diff
changeset
|
570 |
if nativeDead[girlNum] ~= true and m4ChiefDead == 1 then |
2520705b857f
Switched Fell From Heaven to Fell From Grace on missions 5, 6.
belphegorr <szabibibi@gmail.com>
parents:
7259
diff
changeset
|
571 |
table.insert(afterChoiceAnim, {func = AnimSay, args = {natives[girlNum], loc("That's for my father!"), SAY_SAY, 3500}}) |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
572 |
end |
7259 | 573 |
table.insert(afterChoiceAnim, {func = AnimSay, args = {speakerHog, loc("Let's show those cannibals what we're made of!"), SAY_SAY, 7000}}) |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
574 |
else |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
575 |
table.insert(afterChoiceAnim, {func = AnimCustomFunction, swh = false, args = {natives[leaksNum], CondNeedToTurn, {speakerHog, spyHog}}}) |
7259 | 576 |
table.insert(afterChoiceAnim, {func = AnimSay, args = {speakerHog, loc("We'll spare your life for now!"), SAY_SAY, 4500}}) |
577 |
table.insert(afterChoiceAnim, {func = AnimSay, args = {spyHog, loc("May the spirits aid you in all your quests!"), SAY_SAY, 7000}}) |
|
578 |
table.insert(afterChoiceAnim, {func = AnimSay, args = {speakerHog, loc("I just don't want to sink to your level."), SAY_SAY, 6000}}) |
|
579 |
table.insert(afterChoiceAnim, {func = AnimSay, args = {speakerHog, loc("Let's show those cannibals what we're made of!"), SAY_SAY, 7000}}) |
|
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
580 |
end |
7259 | 581 |
table.insert(afterChoiceAnim, {func = AnimSay, args = {natives[8], loc("Let us help, too!"), SAY_SAY, 3000}}) |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
582 |
table.insert(afterChoiceAnim, {func = AnimTurn, args = {speakerHog, "Left", SAY_SAY, 7000}}) |
7259 | 583 |
table.insert(afterChoiceAnim, {func = AnimSay, args = {speakerHog, loc("No. You and the rest of the tribe are safer there!"), SAY_SAY, 7000}}) |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
584 |
AddSkipFunction(afterChoiceAnim, SkipAfterChoiceAnim, {}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
585 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
586 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
587 |
function SetupHogDeadAnim(gear) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
588 |
hogDeadAnim = {} |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
589 |
if nativesNum == 0 then |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
590 |
return |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
591 |
end |
12268
2c8e7e73ef58
Use format strings everywhere in A Classic Fairytale (for translators)
Wuzzy <almikes@aol.com>
parents:
12054
diff
changeset
|
592 |
local hogDeadStrings = {string.format(loc("They killed %s! You bastards!"), gear), |
2c8e7e73ef58
Use format strings everywhere in A Classic Fairytale (for translators)
Wuzzy <almikes@aol.com>
parents:
12054
diff
changeset
|
593 |
string.format(loc("%s! Why?!"), gear), |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
594 |
loc("That was just mean!"), |
12268
2c8e7e73ef58
Use format strings everywhere in A Classic Fairytale (for translators)
Wuzzy <almikes@aol.com>
parents:
12054
diff
changeset
|
595 |
string.format(loc("Oh no, not %s!"), gear), |
2c8e7e73ef58
Use format strings everywhere in A Classic Fairytale (for translators)
Wuzzy <almikes@aol.com>
parents:
12054
diff
changeset
|
596 |
string.format(loc("Why %s? Why?"), gear), |
2c8e7e73ef58
Use format strings everywhere in A Classic Fairytale (for translators)
Wuzzy <almikes@aol.com>
parents:
12054
diff
changeset
|
597 |
string.format(loc("What has %s ever done to you?"), gear)} |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
598 |
table.insert(hogDeadAnim, {func = AnimSay, args = {CurrentHedgehog, hogDeadStrings[7 - nativesNum], SAY_SHOUT, 4000}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
599 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
600 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
601 |
function AfterHogDeadAnim() |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
602 |
freshDead = nil |
13745
2bb7141496a9
Use SetTurnTimeLeft and SetReadyTimeLeft in all scripts
Wuzzy <Wuzzy2@mail.ru>
parents:
13692
diff
changeset
|
603 |
SetTurnTimeLeft(TurnTime) |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
604 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
605 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
606 |
--------------------------Anim skip functions-------------------------- |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
607 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
608 |
function AfterAfterChoiceAnim() |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
609 |
stage = 0 |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
610 |
AddEvent(CheckWaveDead, {1}, DoWaveDead, {1}, 0) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
611 |
AddAmmo(speakerHog, amSwitch, 100) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
612 |
SetGearMessage(speakerHog, 0) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
613 |
SetState(speakerHog, 0) |
13755
110d6c1e817f
Lua: Rename globals: NoPointX→NO_CURSOR, cMaxTurnTime→MAX_TURN_TIME, cMaxHogHealth→MAX_HOG_HEALTH
Wuzzy <Wuzzy2@mail.ru>
parents:
13745
diff
changeset
|
614 |
SetTurnTimeLeft(MAX_TURN_TIME) |
14505 | 615 |
ShowMission(loc("Backstab"), loc("The food bites back"), loc("Defeat the cannibals!"), 1, 4000) |
14625
5c52013fd0aa
ACF5: Disable utilities until the traitor has been dealt with
Wuzzy <Wuzzy2@mail.ru>
parents:
14617
diff
changeset
|
616 |
SetAmmoDelay(amBlowTorch, 0) |
5c52013fd0aa
ACF5: Disable utilities until the traitor has been dealt with
Wuzzy <Wuzzy2@mail.ru>
parents:
14617
diff
changeset
|
617 |
SetAmmoDelay(amGirder, 0) |
5c52013fd0aa
ACF5: Disable utilities until the traitor has been dealt with
Wuzzy <Wuzzy2@mail.ru>
parents:
14617
diff
changeset
|
618 |
SetAmmoDelay(amLandGun, 0) |
5c52013fd0aa
ACF5: Disable utilities until the traitor has been dealt with
Wuzzy <Wuzzy2@mail.ru>
parents:
14617
diff
changeset
|
619 |
SetAmmoDelay(amRope, 0) |
5c52013fd0aa
ACF5: Disable utilities until the traitor has been dealt with
Wuzzy <Wuzzy2@mail.ru>
parents:
14617
diff
changeset
|
620 |
SetAmmoDelay(amParachute, 0) |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
621 |
SpawnCrates() |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
622 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
623 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
624 |
function SkipAfterChoiceAnim() |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
625 |
SetGearMessage(CurrentHedgehog, 0) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
626 |
AnimSwitchHog(speakerHog) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
627 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
628 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
629 |
function AfterWave2Anim() |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
630 |
AddEvent(CheckWaveDead, {2}, DoWaveDead, {2}, 0) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
631 |
SetGearMessage(CurrentHedgehog, 0) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
632 |
SetState(CurrentHedgehog, 0) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
633 |
SpawnCrates() |
13745
2bb7141496a9
Use SetTurnTimeLeft and SetReadyTimeLeft in all scripts
Wuzzy <Wuzzy2@mail.ru>
parents:
13692
diff
changeset
|
634 |
SetTurnTimeLeft(TurnTime) |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
635 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
636 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
637 |
function SkipWave2DeadAnim() |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
638 |
TeleportNatives() |
14779
d0ad9fd923fd
ACF5: Fix crash when skipping wave2 cut sequence with cyborg
Wuzzy <Wuzzy2@mail.ru>
parents:
14666
diff
changeset
|
639 |
TurnNatives() |
12366
05fe955e2763
Fix engine crash in ACF mission 5 when skipping animation after killing wave 2 while the cyborg is talking
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
640 |
PutCircles() |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
641 |
DeployHog() |
15062
de864caac024
ACF5: Fix some turn bugs relating to 3rd wave
Wuzzy <Wuzzy2@mail.ru>
parents:
15061
diff
changeset
|
642 |
EndTurn(true) |
14779
d0ad9fd923fd
ACF5: Fix crash when skipping wave2 cut sequence with cyborg
Wuzzy <Wuzzy2@mail.ru>
parents:
14666
diff
changeset
|
643 |
if nativesNum > 1 then |
d0ad9fd923fd
ACF5: Fix crash when skipping wave2 cut sequence with cyborg
Wuzzy <Wuzzy2@mail.ru>
parents:
14666
diff
changeset
|
644 |
IsolateNatives() |
d0ad9fd923fd
ACF5: Fix crash when skipping wave2 cut sequence with cyborg
Wuzzy <Wuzzy2@mail.ru>
parents:
14666
diff
changeset
|
645 |
end |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
646 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
647 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
648 |
function SpawnPlatformCrates() |
12938
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12906
diff
changeset
|
649 |
SpawnSupplyCrate(2494, 1262, amMine) |
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12906
diff
changeset
|
650 |
SpawnSupplyCrate(2574, 1279, amSMine) |
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12906
diff
changeset
|
651 |
SpawnSupplyCrate(2575, 1267, amMine) |
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12906
diff
changeset
|
652 |
SpawnSupplyCrate(2617, 1259, amSMine) |
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12906
diff
changeset
|
653 |
SpawnSupplyCrate(2579, 1254, amMine) |
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12906
diff
changeset
|
654 |
SpawnSupplyCrate(2478, 1243, amMine) |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
655 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
656 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
657 |
function AfterWave2DeadAnim() |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
658 |
stage = platformStage |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
659 |
SpawnPlatformCrates() |
7463
bd5c7b8db666
Crashfix, healthfix in mission 5
belphegorr <szabibibi@gmail.com>
parents:
7448
diff
changeset
|
660 |
SetGearMessage(CurrentHedgehog, 0) |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
661 |
AddEvent(CheckWaveDead, {3}, DoWaveDead, {3}, 0) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
662 |
AddEvent(CheckDeployedDead, {}, DoDeployedDead, {}, 0) |
14779
d0ad9fd923fd
ACF5: Fix crash when skipping wave2 cut sequence with cyborg
Wuzzy <Wuzzy2@mail.ru>
parents:
14666
diff
changeset
|
663 |
HideCyborg() |
12906
bdf8e80a97b8
Fix some minor formatting and grammar flaws in script strings
Wuzzy <Wuzzy2@mail.ru>
parents:
12905
diff
changeset
|
664 |
ShowMission(loc("Backstab"), loc("Drills"), loc("You have 7 turns until the next wave arrives.|Make sure the arriving cannibals are greeted appropriately!|If the hog dies, the cause is lost.|Hint: You might want to use some mines ..."), 1, 12000) |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
665 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
666 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
667 |
function DoTurnsOver() |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
668 |
stage = wave3Stage |
15061
c88201afcc7c
ACF5: Add appear animation for 3rd wave
Wuzzy <Wuzzy2@mail.ru>
parents:
15060
diff
changeset
|
669 |
RestoreWave(3, true) |
14597
32cf7472da06
ACF5: Delete circles vgears after wave3 appeared
Wuzzy <Wuzzy2@mail.ru>
parents:
14505
diff
changeset
|
670 |
DeleteCircles() |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
671 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
672 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
673 |
function SkipWave2Anim() |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
674 |
AnimSwitchHog(speakerHog) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
675 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
676 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
677 |
function SkipStartAnim() |
12616
fb0734d5dd87
ACF5: Fix position of Fiery Water when skipping start anim.
Wuzzy <almikes@aol.com>
parents:
12615
diff
changeset
|
678 |
ReviveNatives() |
7448
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
679 |
AnimSetGearPosition(natives[waterNum], nativePos[denseNum][1] + 50, nativePos[denseNum][2]) |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
680 |
RestoreWave(1) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
681 |
SetGearMessage(CurrentHedgehog, 0) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
682 |
SetState(CurrentHedgehog, 0) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
683 |
if m2Choice == choiceAccepted then |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
684 |
spyHog = natives[denseNum] |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
685 |
else |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
686 |
spyHog = natives[waterNum] |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
687 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
688 |
SetHealth(spyHog, 26) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
689 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
690 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
691 |
function AfterStartAnim() |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
692 |
AnimSwitchHog(natives[leaksNum]) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
693 |
stage = spyKillStage |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
694 |
AddEvent(CheckChoice, {}, DoChoice, {}, 0) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
695 |
AddEvent(CheckKilledOther, {}, DoKilledOther, {}, 0) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
696 |
AddEvent(CheckChoiceRefuse, {}, DoChoiceRefuse, {}, 0) |
14644
3e15412536c8
ACF5: Register is as "spare traitor" if player walks too far away
Wuzzy <Wuzzy2@mail.ru>
parents:
14625
diff
changeset
|
697 |
AddEvent(CheckChoiceRunaway, {}, DoChoiceRefuse, {}, 0) |
12615
dd0fb5b15567
ACF5: Spare traitor's life with skip instead of precise
Wuzzy <almikes@aol.com>
parents:
12559
diff
changeset
|
698 |
ShowMission(loc("Backstab"), loc("Judas"), |
dd0fb5b15567
ACF5: Spare traitor's life with skip instead of precise
Wuzzy <almikes@aol.com>
parents:
12559
diff
changeset
|
699 |
string.format(loc("Kill the traitor, %s, or spare his life!"), GetHogName(spyHog)) .. "|" .. |
dd0fb5b15567
ACF5: Spare traitor's life with skip instead of precise
Wuzzy <almikes@aol.com>
parents:
12559
diff
changeset
|
700 |
loc("Kill him or skip your turn."), |
15073
6f51c75994a4
Semi-standardize usage of icons in many mission panels
Wuzzy <Wuzzy2@mail.ru>
parents:
15062
diff
changeset
|
701 |
3, 8000) |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
702 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
703 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
704 |
-----------------------------Events------------------------------------ |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
705 |
function CheckDeployedDead() |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
706 |
return deployedDead |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
707 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
708 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
709 |
function DoDeployedDead() |
15073
6f51c75994a4
Semi-standardize usage of icons in many mission panels
Wuzzy <Wuzzy2@mail.ru>
parents:
15062
diff
changeset
|
710 |
ShowMission(loc("Backstab"), loc("Brutus"), loc("You have failed to save the tribe!"), -amSkip, 6000) |
14490
f37910a73c19
Refactor ACF missions, store team names in variables
Wuzzy <Wuzzy2@mail.ru>
parents:
14450
diff
changeset
|
711 |
DismissTeam(nativesTeamName) |
f37910a73c19
Refactor ACF missions, store team names in variables
Wuzzy <Wuzzy2@mail.ru>
parents:
14450
diff
changeset
|
712 |
DismissTeam(tribeTeamName) |
f37910a73c19
Refactor ACF missions, store team names in variables
Wuzzy <Wuzzy2@mail.ru>
parents:
14450
diff
changeset
|
713 |
DismissTeam(cyborgTeamName) |
12369
5857936921ec
Get rid of some incorrect timeout messages in ACF, by using EndTurn(true)
Wuzzy <almikes@aol.com>
parents:
12366
diff
changeset
|
714 |
EndTurn(true) |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
715 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
716 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
717 |
function CheckChoice() |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
718 |
return choice ~= 0 and tmpVar == 0 |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
719 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
720 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
721 |
function CheckDeaths() |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
722 |
for i = 1, 7 do |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
723 |
if natives[i] ~= spyHog and band(GetState(natives[i]), gstAttacked) ~= 0 then |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
724 |
return true |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
725 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
726 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
727 |
return false |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
728 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
729 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
730 |
function DoChoice() |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
731 |
RemoveEventFunc(CheckChoiceRefuse) |
14644
3e15412536c8
ACF5: Register is as "spare traitor" if player walks too far away
Wuzzy <Wuzzy2@mail.ru>
parents:
14625
diff
changeset
|
732 |
RemoveEventFunc(CheckChoiceRunaway) |
7448
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
733 |
SetGearMessage(CurrentHedgehog, 0) |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
734 |
SetupAfterChoiceAnim() |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
735 |
AddAnim(afterChoiceAnim) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
736 |
AddFunction({func = AfterAfterChoiceAnim, args = {}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
737 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
738 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
739 |
function CheckChoiceRefuse() |
15034
09c63d4bcf53
ACF: Add some checks before calling StoppedGear
Wuzzy <Wuzzy2@mail.ru>
parents:
15007
diff
changeset
|
740 |
return GetHealth(CurrentHedgehog) and highJumped == true and StoppedGear(CurrentHedgehog) |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
741 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
742 |
|
14644
3e15412536c8
ACF5: Register is as "spare traitor" if player walks too far away
Wuzzy <Wuzzy2@mail.ru>
parents:
14625
diff
changeset
|
743 |
function CheckChoiceRunaway() |
15034
09c63d4bcf53
ACF: Add some checks before calling StoppedGear
Wuzzy <Wuzzy2@mail.ru>
parents:
15007
diff
changeset
|
744 |
return GetHealth(CurrentHedgehog) and band(GetState(CurrentHedgehog), gstHHDriven) ~= 0 and GetHogTeamName(CurrentHedgehog) == nativesTeamName and GetX(CurrentHedgehog) >= runawayX and GetY(CurrentHedgehog) >= runawayY and StoppedGear(CurrentHedgehog) |
14644
3e15412536c8
ACF5: Register is as "spare traitor" if player walks too far away
Wuzzy <Wuzzy2@mail.ru>
parents:
14625
diff
changeset
|
745 |
end |
3e15412536c8
ACF5: Register is as "spare traitor" if player walks too far away
Wuzzy <Wuzzy2@mail.ru>
parents:
14625
diff
changeset
|
746 |
|
3e15412536c8
ACF5: Register is as "spare traitor" if player walks too far away
Wuzzy <Wuzzy2@mail.ru>
parents:
14625
diff
changeset
|
747 |
function CheckChoiceRunawayAll() |
3e15412536c8
ACF5: Register is as "spare traitor" if player walks too far away
Wuzzy <Wuzzy2@mail.ru>
parents:
14625
diff
changeset
|
748 |
for i= 1, 7 do |
3e15412536c8
ACF5: Register is as "spare traitor" if player walks too far away
Wuzzy <Wuzzy2@mail.ru>
parents:
14625
diff
changeset
|
749 |
local hog = natives[i] |
14781
1aea457856e2
ACF5: Fix Lua error when not hitting traitor in first turn
Wuzzy <Wuzzy2@mail.ru>
parents:
14779
diff
changeset
|
750 |
if hog ~= nil and GetHealth(hog) and hog ~= spyHog and GetX(hog) >= runawayX and GetY(hog) >= runawayY and StoppedGear(hog) then |
14644
3e15412536c8
ACF5: Register is as "spare traitor" if player walks too far away
Wuzzy <Wuzzy2@mail.ru>
parents:
14625
diff
changeset
|
751 |
return true |
3e15412536c8
ACF5: Register is as "spare traitor" if player walks too far away
Wuzzy <Wuzzy2@mail.ru>
parents:
14625
diff
changeset
|
752 |
end |
3e15412536c8
ACF5: Register is as "spare traitor" if player walks too far away
Wuzzy <Wuzzy2@mail.ru>
parents:
14625
diff
changeset
|
753 |
end |
3e15412536c8
ACF5: Register is as "spare traitor" if player walks too far away
Wuzzy <Wuzzy2@mail.ru>
parents:
14625
diff
changeset
|
754 |
return false |
3e15412536c8
ACF5: Register is as "spare traitor" if player walks too far away
Wuzzy <Wuzzy2@mail.ru>
parents:
14625
diff
changeset
|
755 |
end |
3e15412536c8
ACF5: Register is as "spare traitor" if player walks too far away
Wuzzy <Wuzzy2@mail.ru>
parents:
14625
diff
changeset
|
756 |
|
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
757 |
function DoChoiceRefuse() |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
758 |
choice = choiceSpare |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
759 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
760 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
761 |
function CheckKilledOther() |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
762 |
if stage ~= spyKillStage then |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
763 |
return false |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
764 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
765 |
return (nativesNum < startNativesNum and choice ~= choiceEliminate) or |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
766 |
(nativesNum < startNativesNum - 1 and choice == choiceEliminate) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
767 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
768 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
769 |
function DoKilledOther() |
15073
6f51c75994a4
Semi-standardize usage of icons in many mission panels
Wuzzy <Wuzzy2@mail.ru>
parents:
15062
diff
changeset
|
770 |
ShowMission(loc("Backstab"), loc("Brutus"), loc("You have killed an innocent hedgehog!"), -amSkip, 6000) |
14490
f37910a73c19
Refactor ACF missions, store team names in variables
Wuzzy <Wuzzy2@mail.ru>
parents:
14450
diff
changeset
|
771 |
DismissTeam(nativesTeamName) |
f37910a73c19
Refactor ACF missions, store team names in variables
Wuzzy <Wuzzy2@mail.ru>
parents:
14450
diff
changeset
|
772 |
DismissTeam(tribeTeamName) |
12369
5857936921ec
Get rid of some incorrect timeout messages in ACF, by using EndTurn(true)
Wuzzy <almikes@aol.com>
parents:
12366
diff
changeset
|
773 |
EndTurn(true) |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
774 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
775 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
776 |
function CheckWaveDead(index) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
777 |
for i = (index - 1) * 3 + 1, index * 3 do |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
778 |
if cannibalDead[i] ~= true or CurrentHedgehog == cannibals[i] then |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
779 |
return false |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
780 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
781 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
782 |
return true |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
783 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
784 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
785 |
function DoWaveDead(index) |
12369
5857936921ec
Get rid of some incorrect timeout messages in ACF, by using EndTurn(true)
Wuzzy <almikes@aol.com>
parents:
12366
diff
changeset
|
786 |
EndTurn(true) |
7448
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
787 |
needToAct = index |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
788 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
789 |
|
7425 | 790 |
function AddWave3DeadAnim() |
7463
bd5c7b8db666
Crashfix, healthfix in mission 5
belphegorr <szabibibi@gmail.com>
parents:
7448
diff
changeset
|
791 |
AnimSwitchHog(deployedHog) |
bd5c7b8db666
Crashfix, healthfix in mission 5
belphegorr <szabibibi@gmail.com>
parents:
7448
diff
changeset
|
792 |
AnimWait(deployedHog, 1) |
bd5c7b8db666
Crashfix, healthfix in mission 5
belphegorr <szabibibi@gmail.com>
parents:
7448
diff
changeset
|
793 |
AddFunction({func = HideNatives, args = {}}) |
bd5c7b8db666
Crashfix, healthfix in mission 5
belphegorr <szabibibi@gmail.com>
parents:
7448
diff
changeset
|
794 |
AddFunction({func = SetupWave3DeadAnim, args = {}}) |
bd5c7b8db666
Crashfix, healthfix in mission 5
belphegorr <szabibibi@gmail.com>
parents:
7448
diff
changeset
|
795 |
AddFunction({func = AddAnim, args = {wave3DeadAnim}}) |
bd5c7b8db666
Crashfix, healthfix in mission 5
belphegorr <szabibibi@gmail.com>
parents:
7448
diff
changeset
|
796 |
AddFunction({func = AddFunction, args = {{func = AfterWave3DeadAnim, args = {}}}}) |
7425 | 797 |
end |
798 |
||
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
799 |
function HideNatives() |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
800 |
for i = 1, 9 do |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
801 |
if nativeDead[i] ~= true and natives[i] ~= deployedHog then |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
802 |
if nativeHidden[i] ~= true then |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
803 |
HideHog(natives[i]) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
804 |
nativeHidden[i] = true |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
805 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
806 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
807 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
808 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
809 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
810 |
function SetupWave3DeadAnim() |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
811 |
table.insert(wave3DeadAnim, {func = AnimTurn, args = {deployedHog, "Left"}}) |
7259 | 812 |
table.insert(wave3DeadAnim, {func = AnimSay, args = {deployedHog, loc("That ought to show them!"), SAY_SAY, 4000}}) |
15169
2ad1f0bdc1f3
ACF5: In final animation, move camera to empty cage
Wuzzy <Wuzzy2@mail.ru>
parents:
15167
diff
changeset
|
813 |
table.insert(wave3DeadAnim, {func = AnimSay, args = {deployedHog, loc("Guys, do you think there's more of them?"), SAY_SHOUT, 5000}}) |
2ad1f0bdc1f3
ACF5: In final animation, move camera to empty cage
Wuzzy <Wuzzy2@mail.ru>
parents:
15167
diff
changeset
|
814 |
table.insert(wave3DeadAnim, {func = AnimCustomFunction, args = {deployedHog, MoveCameraCustom, {unpack(nativePos[wiseNum])}}}) |
7255
93cf6b3b89be
Fixed a visual gear in Mission 5
belphegorr <szabibibi@gmail.com>
parents:
7253
diff
changeset
|
815 |
table.insert(wave3DeadAnim, {func = AnimVisualGear, args = {deployedHog, unpack(nativePos[wiseNum]), vgtFeather, 0, true, true}}) |
15169
2ad1f0bdc1f3
ACF5: In final animation, move camera to empty cage
Wuzzy <Wuzzy2@mail.ru>
parents:
15167
diff
changeset
|
816 |
table.insert(wave3DeadAnim, {func = AnimWait, args = {deployedHog, 1750}}) |
2ad1f0bdc1f3
ACF5: In final animation, move camera to empty cage
Wuzzy <Wuzzy2@mail.ru>
parents:
15167
diff
changeset
|
817 |
table.insert(wave3DeadAnim, {func = AnimCustomFunction, args = {deployedHog, FollowGear, {deployedHog}}}) |
2ad1f0bdc1f3
ACF5: In final animation, move camera to empty cage
Wuzzy <Wuzzy2@mail.ru>
parents:
15167
diff
changeset
|
818 |
table.insert(wave3DeadAnim, {func = AnimWait, args = {deployedHog, 100}}) |
7259 | 819 |
table.insert(wave3DeadAnim, {func = AnimSay, args = {deployedHog, loc("Where are they?!"), SAY_THINK, 3000}}) |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
820 |
table.insert(wave3DeadAnim, {func = AnimCustomFunction, args = {deployedHog, RestoreCyborg, {}}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
821 |
table.insert(wave3DeadAnim, {func = AnimOutOfNowhere, args = {cyborg, 4040, 782}}) |
7259 | 822 |
table.insert(wave3DeadAnim, {func = AnimSay, args = {cyborg, loc("These primitive people are so funny!"), SAY_THINK, 6500}}) |
12784
1f8a62d1609d
ACF5: Fix final animation being stuck when the cyborg's way to the right is blocked
Wuzzy <Wuzzy2@mail.ru>
parents:
12755
diff
changeset
|
823 |
table.insert(wave3DeadAnim, {func = AnimMove, args = {cyborg, "Right", 4060, 0, 7000}}) |
7425 | 824 |
table.insert(wave3DeadAnim, {func = AnimSwitchHog, args = {deployedHog}}) |
825 |
table.insert(wave3DeadAnim, {func = AnimWait, args = {deployedHog, 1}}) |
|
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
826 |
table.insert(wave3DeadAnim, {func = AnimCustomFunction, args = {deployedHog, HideCyborg, {}}}) |
7259 | 827 |
table.insert(wave3DeadAnim, {func = AnimSay, args = {deployedHog, loc("I need to find the others!"), SAY_THINK, 4500}}) |
828 |
table.insert(wave3DeadAnim, {func = AnimSay, args = {deployedHog, loc("I have to follow that alien."), SAY_THINK, 4500}}) |
|
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
829 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
830 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
831 |
function SkipWave3DeadAnim() |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
832 |
AnimSwitchHog(deployedHog) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
833 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
834 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
835 |
function AfterWave3DeadAnim() |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
836 |
if nativeDead[leaksNum] == true then |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
837 |
SaveCampaignVar("M5LeaksDead", "1") |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
838 |
else |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
839 |
SaveCampaignVar("M5LeaksDead", "0") |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
840 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
841 |
if nativeDead[denseNum] == true then |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
842 |
SaveCampaignVar("M5DenseDead", "1") |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
843 |
else |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
844 |
SaveCampaignVar("M5DenseDead", "0") |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
845 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
846 |
if nativeDead[waterNum] == true then |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
847 |
SaveCampaignVar("M5WaterDead", "1") |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
848 |
else |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
849 |
SaveCampaignVar("M5WaterDead", "0") |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
850 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
851 |
if nativeDead[buffaloNum] == true then |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
852 |
SaveCampaignVar("M5BuffaloDead", "1") |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
853 |
else |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
854 |
SaveCampaignVar("M5BuffaloDead", "0") |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
855 |
end |
7417
2520705b857f
Switched Fell From Heaven to Fell From Grace on missions 5, 6.
belphegorr <szabibibi@gmail.com>
parents:
7259
diff
changeset
|
856 |
if nativeDead[girlNum] == true then |
2520705b857f
Switched Fell From Heaven to Fell From Grace on missions 5, 6.
belphegorr <szabibibi@gmail.com>
parents:
7259
diff
changeset
|
857 |
SaveCampaignVar("M5GirlDead", "1") |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
858 |
else |
7417
2520705b857f
Switched Fell From Heaven to Fell From Grace on missions 5, 6.
belphegorr <szabibibi@gmail.com>
parents:
7259
diff
changeset
|
859 |
SaveCampaignVar("M5GirlDead", "0") |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
860 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
861 |
if nativeDead[wiseNum] == true then |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
862 |
SaveCampaignVar("M5WiseDead", "1") |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
863 |
else |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
864 |
SaveCampaignVar("M5WiseDead", "0") |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
865 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
866 |
if nativeDead[chiefNum] == true then |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
867 |
SaveCampaignVar("M5ChiefDead", "1") |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
868 |
else |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
869 |
SaveCampaignVar("M5ChiefDead", "0") |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
870 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
871 |
SaveCampaignVar("M5Choice", "" .. choice) |
8944
ed2509832311
fix bug that locked unlocked campaign missions, see issue 452
Periklis Ntanasis <pntanasis@gmail.com>
parents:
8043
diff
changeset
|
872 |
if progress and progress<5 then |
ed2509832311
fix bug that locked unlocked campaign missions, see issue 452
Periklis Ntanasis <pntanasis@gmail.com>
parents:
8043
diff
changeset
|
873 |
SaveCampaignVar("Progress", "5") |
ed2509832311
fix bug that locked unlocked campaign missions, see issue 452
Periklis Ntanasis <pntanasis@gmail.com>
parents:
8043
diff
changeset
|
874 |
end |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
875 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
876 |
for i = 1, 7 do |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
877 |
if natives[i] == deployedHog then |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
878 |
SaveCampaignVar("M5DeployedNum", "" .. i) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
879 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
880 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
881 |
|
14490
f37910a73c19
Refactor ACF missions, store team names in variables
Wuzzy <Wuzzy2@mail.ru>
parents:
14450
diff
changeset
|
882 |
DismissTeam(tribeTeamName) |
f37910a73c19
Refactor ACF missions, store team names in variables
Wuzzy <Wuzzy2@mail.ru>
parents:
14450
diff
changeset
|
883 |
DismissTeam(cannibalsTeamName1) |
f37910a73c19
Refactor ACF missions, store team names in variables
Wuzzy <Wuzzy2@mail.ru>
parents:
14450
diff
changeset
|
884 |
DismissTeam(cannibalsTeamName2) |
f37910a73c19
Refactor ACF missions, store team names in variables
Wuzzy <Wuzzy2@mail.ru>
parents:
14450
diff
changeset
|
885 |
DismissTeam(cyborgTeamName) |
12369
5857936921ec
Get rid of some incorrect timeout messages in ACF, by using EndTurn(true)
Wuzzy <almikes@aol.com>
parents:
12366
diff
changeset
|
886 |
EndTurn(true) |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
887 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
888 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
889 |
-----------------------------Misc-------------------------------------- |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
890 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
891 |
function SpawnCrates() |
12938
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12906
diff
changeset
|
892 |
SpawnSupplyCrate(0, 0, amDrill) |
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12906
diff
changeset
|
893 |
SpawnSupplyCrate(0, 0, amGrenade) |
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12906
diff
changeset
|
894 |
SpawnSupplyCrate(0, 0, amBazooka) |
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12906
diff
changeset
|
895 |
SpawnSupplyCrate(0, 0, amDynamite) |
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12906
diff
changeset
|
896 |
SpawnSupplyCrate(0, 0, amGrenade) |
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12906
diff
changeset
|
897 |
SpawnSupplyCrate(0, 0, amMine) |
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12906
diff
changeset
|
898 |
SpawnSupplyCrate(0, 0, amShotgun) |
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12906
diff
changeset
|
899 |
SpawnSupplyCrate(0, 0, amFlamethrower) |
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12906
diff
changeset
|
900 |
SpawnSupplyCrate(0, 0, amMolotov) |
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12906
diff
changeset
|
901 |
SpawnSupplyCrate(0, 0, amSMine) |
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12906
diff
changeset
|
902 |
SpawnSupplyCrate(0, 0, amMortar) |
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12906
diff
changeset
|
903 |
SpawnSupplyCrate(0, 0, amRope) |
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12906
diff
changeset
|
904 |
SpawnSupplyCrate(0, 0, amRope) |
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12906
diff
changeset
|
905 |
SpawnSupplyCrate(0, 0, amParachute) |
e65aa3c3d4e6
Refactor scripts to use SpawnSupplyCrate (where it makes sense)
Wuzzy <Wuzzy2@mail.ru>
parents:
12906
diff
changeset
|
906 |
SpawnSupplyCrate(0, 0, amParachute) |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
907 |
SetHealth(SpawnHealthCrate(0, 0), 25) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
908 |
SetHealth(SpawnHealthCrate(0, 0), 25) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
909 |
SetHealth(SpawnHealthCrate(0, 0), 25) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
910 |
SetHealth(SpawnHealthCrate(0, 0), 25) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
911 |
SetHealth(SpawnHealthCrate(0, 0), 25) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
912 |
SetHealth(SpawnHealthCrate(0, 0), 25) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
913 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
914 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
915 |
|
15061
c88201afcc7c
ACF5: Add appear animation for 3rd wave
Wuzzy <Wuzzy2@mail.ru>
parents:
15060
diff
changeset
|
916 |
function RestoreWave(index, animate) |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
917 |
for i = (index - 1) * 3 + 1, index * 3 do |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
918 |
if cannibalHidden[i] == true then |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
919 |
RestoreHog(cannibals[i]) |
15061
c88201afcc7c
ACF5: Add appear animation for 3rd wave
Wuzzy <Wuzzy2@mail.ru>
parents:
15060
diff
changeset
|
920 |
if animate then |
c88201afcc7c
ACF5: Add appear animation for 3rd wave
Wuzzy <Wuzzy2@mail.ru>
parents:
15060
diff
changeset
|
921 |
AnimOutOfNowhere(cannibals[i], unpack(cannibalPos[i])) |
c88201afcc7c
ACF5: Add appear animation for 3rd wave
Wuzzy <Wuzzy2@mail.ru>
parents:
15060
diff
changeset
|
922 |
else |
c88201afcc7c
ACF5: Add appear animation for 3rd wave
Wuzzy <Wuzzy2@mail.ru>
parents:
15060
diff
changeset
|
923 |
AnimSetGearPosition(cannibals[i], unpack(cannibalPos[i])) |
c88201afcc7c
ACF5: Add appear animation for 3rd wave
Wuzzy <Wuzzy2@mail.ru>
parents:
15060
diff
changeset
|
924 |
FollowGear(cannibals[i]) |
c88201afcc7c
ACF5: Add appear animation for 3rd wave
Wuzzy <Wuzzy2@mail.ru>
parents:
15060
diff
changeset
|
925 |
end |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
926 |
cannibalHidden[i] = false |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
927 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
928 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
929 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
930 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
931 |
function GetVariables() |
8944
ed2509832311
fix bug that locked unlocked campaign missions, see issue 452
Periklis Ntanasis <pntanasis@gmail.com>
parents:
8043
diff
changeset
|
932 |
progress = tonumber(GetCampaignVar("Progress")) |
13150
5083fb0a2992
A Classic Fairytale: Harden all missions against missing campaign variables in team file and assume default values
Wuzzy <Wuzzy2@mail.ru>
parents:
13123
diff
changeset
|
933 |
m2Choice = tonumber(GetCampaignVar("M2Choice")) or choiceRefused |
14666
0bba06a05d52
ACF: Dump unused campaign vars, use fallback values
Wuzzy <Wuzzy2@mail.ru>
parents:
14644
diff
changeset
|
934 |
m4DenseDead = tonumber(GetCampaignVar("M4DenseDead")) or 0 |
0bba06a05d52
ACF: Dump unused campaign vars, use fallback values
Wuzzy <Wuzzy2@mail.ru>
parents:
14644
diff
changeset
|
935 |
m4LeaksDead = tonumber(GetCampaignVar("M4LeaksDead")) or 0 |
0bba06a05d52
ACF: Dump unused campaign vars, use fallback values
Wuzzy <Wuzzy2@mail.ru>
parents:
14644
diff
changeset
|
936 |
m4ChiefDead = tonumber(GetCampaignVar("M4ChiefDead")) or 0 |
0bba06a05d52
ACF: Dump unused campaign vars, use fallback values
Wuzzy <Wuzzy2@mail.ru>
parents:
14644
diff
changeset
|
937 |
m4WaterDead = tonumber(GetCampaignVar("M4WaterDead")) or 0 |
0bba06a05d52
ACF: Dump unused campaign vars, use fallback values
Wuzzy <Wuzzy2@mail.ru>
parents:
14644
diff
changeset
|
938 |
m4BuffaloDead = tonumber(GetCampaignVar("M4BuffaloDead")) or 0 |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
939 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
940 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
941 |
function HideCyborg() |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
942 |
if cyborgHidden == false then |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
943 |
HideHog(cyborg) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
944 |
cyborgHidden = true |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
945 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
946 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
947 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
948 |
function RestoreCyborg() |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
949 |
if cyborgHidden == true then |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
950 |
RestoreHog(cyborg) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
951 |
cyborgHidden = false |
15167
7416f6319de9
ACF5: Also clear crates around cyborg
Wuzzy <Wuzzy2@mail.ru>
parents:
15073
diff
changeset
|
952 |
-- Clear mines and crates around cyborg |
14881
543729d313f5
ACF5, ACF9: Clear mines around cyborg when it appears
Wuzzy <Wuzzy2@mail.ru>
parents:
14781
diff
changeset
|
953 |
local vaporized = 0 |
15167
7416f6319de9
ACF5: Also clear crates around cyborg
Wuzzy <Wuzzy2@mail.ru>
parents:
15073
diff
changeset
|
954 |
for gear, _ in pairs(trackedNonCyborgGears) do |
7416f6319de9
ACF5: Also clear crates around cyborg
Wuzzy <Wuzzy2@mail.ru>
parents:
15073
diff
changeset
|
955 |
if GetHealth(gear) and GetHealth(cyborg) and gearIsInBox(gear, GetX(cyborg) - 50, GetY(cyborg) - 50, 100, 100) == true then |
7416f6319de9
ACF5: Also clear crates around cyborg
Wuzzy <Wuzzy2@mail.ru>
parents:
15073
diff
changeset
|
956 |
AddVisualGear(GetX(gear), GetY(gear), vgtSmoke, 0, false) |
7416f6319de9
ACF5: Also clear crates around cyborg
Wuzzy <Wuzzy2@mail.ru>
parents:
15073
diff
changeset
|
957 |
DeleteGear(gear) |
14881
543729d313f5
ACF5, ACF9: Clear mines around cyborg when it appears
Wuzzy <Wuzzy2@mail.ru>
parents:
14781
diff
changeset
|
958 |
vaporized = vaporized + 1 |
543729d313f5
ACF5, ACF9: Clear mines around cyborg when it appears
Wuzzy <Wuzzy2@mail.ru>
parents:
14781
diff
changeset
|
959 |
end |
543729d313f5
ACF5, ACF9: Clear mines around cyborg when it appears
Wuzzy <Wuzzy2@mail.ru>
parents:
14781
diff
changeset
|
960 |
end |
543729d313f5
ACF5, ACF9: Clear mines around cyborg when it appears
Wuzzy <Wuzzy2@mail.ru>
parents:
14781
diff
changeset
|
961 |
if vaporized > 0 then |
543729d313f5
ACF5, ACF9: Clear mines around cyborg when it appears
Wuzzy <Wuzzy2@mail.ru>
parents:
14781
diff
changeset
|
962 |
PlaySound(sndVaporize) |
543729d313f5
ACF5, ACF9: Clear mines around cyborg when it appears
Wuzzy <Wuzzy2@mail.ru>
parents:
14781
diff
changeset
|
963 |
end |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
964 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
965 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
966 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
967 |
function SetupPlace() |
7518
70babd9073a2
Mission 5: fixed a few bugs that came with the update (ammo menu bug and initial gear elimination bug)
belphegorr <szabibibi@gmail.com>
parents:
7512
diff
changeset
|
968 |
startNativesNum = nativesNum |
12366
05fe955e2763
Fix engine crash in ACF mission 5 when skipping animation after killing wave 2 while the cyborg is talking
Wuzzy <almikes@aol.com>
parents:
12268
diff
changeset
|
969 |
HideCyborg() |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
970 |
for i = 1, 9 do |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
971 |
HideHog(cannibals[i]) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
972 |
cannibalHidden[i] = true |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
973 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
974 |
if m4LeaksDead == 1 then |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
975 |
HideHog(natives[leaksNum]) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
976 |
nativeHidden[leaksNum] = true |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
977 |
needRevival = true |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
978 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
979 |
if m4DenseDead == 1 then |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
980 |
if m2Choice ~= choiceAccepted then |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
981 |
DeleteGear(natives[denseNum]) |
7518
70babd9073a2
Mission 5: fixed a few bugs that came with the update (ammo menu bug and initial gear elimination bug)
belphegorr <szabibibi@gmail.com>
parents:
7512
diff
changeset
|
982 |
startNativesNum = startNativesNum - 1 |
70babd9073a2
Mission 5: fixed a few bugs that came with the update (ammo menu bug and initial gear elimination bug)
belphegorr <szabibibi@gmail.com>
parents:
7512
diff
changeset
|
983 |
nativeDead[denseNum] = true |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
984 |
else |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
985 |
HideHog(natives[denseNum]) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
986 |
nativeHidden[denseNum] = true |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
987 |
needRevival = true |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
988 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
989 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
990 |
if m4WaterDead == 1 then |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
991 |
HideHog(natives[waterNum]) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
992 |
nativeHidden[waterNum] = true |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
993 |
needRevival = true |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
994 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
995 |
if m4ChiefDead == 1 then |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
996 |
DeleteGear(natives[chiefNum]) |
7518
70babd9073a2
Mission 5: fixed a few bugs that came with the update (ammo menu bug and initial gear elimination bug)
belphegorr <szabibibi@gmail.com>
parents:
7512
diff
changeset
|
997 |
startNativesNum = startNativesNum - 1 |
70babd9073a2
Mission 5: fixed a few bugs that came with the update (ammo menu bug and initial gear elimination bug)
belphegorr <szabibibi@gmail.com>
parents:
7512
diff
changeset
|
998 |
nativeDead[chiefNum] = true |
7448
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
999 |
AnimSetGearPosition(natives[girlNum], unpack(nativePos[buffaloNum])) |
7417
2520705b857f
Switched Fell From Heaven to Fell From Grace on missions 5, 6.
belphegorr <szabibibi@gmail.com>
parents:
7259
diff
changeset
|
1000 |
nativePos[girlNum] = nativePos[buffaloNum] |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1001 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1002 |
if m4BuffaloDead == 1 then |
7518
70babd9073a2
Mission 5: fixed a few bugs that came with the update (ammo menu bug and initial gear elimination bug)
belphegorr <szabibibi@gmail.com>
parents:
7512
diff
changeset
|
1003 |
startNativesNum = startNativesNum - 1 |
70babd9073a2
Mission 5: fixed a few bugs that came with the update (ammo menu bug and initial gear elimination bug)
belphegorr <szabibibi@gmail.com>
parents:
7512
diff
changeset
|
1004 |
nativeDead[buffaloNum] = true |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1005 |
DeleteGear(natives[buffaloNum]) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1006 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1007 |
PlaceGirder(3568, 1461, 1) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1008 |
PlaceGirder(440, 523, 5) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1009 |
PlaceGirder(350, 441, 1) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1010 |
PlaceGirder(405, 553, 5) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1011 |
PlaceGirder(316, 468, 1) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1012 |
PlaceGirder(1319, 168, 0) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1013 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1014 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1015 |
function SetupAmmo() |
7417
2520705b857f
Switched Fell From Heaven to Fell From Grace on missions 5, 6.
belphegorr <szabibibi@gmail.com>
parents:
7259
diff
changeset
|
1016 |
AddAmmo(natives[girlNum], amSwitch, 0) |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1017 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1018 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1019 |
function AddHogs() |
14937
ff4003a90ff8
Enable automatic voicepack language selection for all missions
Wuzzy <Wuzzy2@mail.ru>
parents:
14903
diff
changeset
|
1020 |
tribeTeamName = AddTeam(loc("Tribe"), -2, "Bone", "Island", "HillBilly_qau", "cm_birdy") |
14617
bd15c8551318
Make use of passive teams in various campaign missions
Wuzzy <Wuzzy2@mail.ru>
parents:
14597
diff
changeset
|
1021 |
SetTeamPassive(tribeTeamName, true) |
13480
2a0df4705849
ACF5: Fix Tribe not being in same clan as Natives
Wuzzy <Wuzzy2@mail.ru>
parents:
13359
diff
changeset
|
1022 |
for i = 8, 9 do |
2a0df4705849
ACF5: Fix Tribe not being in same clan as Natives
Wuzzy <Wuzzy2@mail.ru>
parents:
13359
diff
changeset
|
1023 |
natives[i] = AddHog(nativeNames[i], 0, 100, nativeHats[i]) |
2a0df4705849
ACF5: Fix Tribe not being in same clan as Natives
Wuzzy <Wuzzy2@mail.ru>
parents:
13359
diff
changeset
|
1024 |
end |
2a0df4705849
ACF5: Fix Tribe not being in same clan as Natives
Wuzzy <Wuzzy2@mail.ru>
parents:
13359
diff
changeset
|
1025 |
|
14491
f8c2b995c009
Use player team name in ACF campaign
Wuzzy <Wuzzy2@mail.ru>
parents:
14490
diff
changeset
|
1026 |
nativesTeamName = AddMissionTeam(-2) |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1027 |
for i = 1, 7 do |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1028 |
natives[i] = AddHog(nativeNames[i], 0, 100, nativeHats[i]) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1029 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1030 |
nativesNum = 7 |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1031 |
|
14937
ff4003a90ff8
Enable automatic voicepack language selection for all missions
Wuzzy <Wuzzy2@mail.ru>
parents:
14903
diff
changeset
|
1032 |
cannibalsTeamName1 = AddTeam(loc("Assault Team"), -1, "skull", "Island", "Pirate_qau", "cm_vampire") |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1033 |
for i = 1, 6 do |
13123
1ddb8aac5e30
ACF: Reduce computer hog levels in missions 2 and 6.
Wuzzy <Wuzzy2@mail.ru>
parents:
12938
diff
changeset
|
1034 |
cannibals[i] = AddHog(cannibalNames[i], 3, 50, "vampirichog") |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1035 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1036 |
|
14937
ff4003a90ff8
Enable automatic voicepack language selection for all missions
Wuzzy <Wuzzy2@mail.ru>
parents:
14903
diff
changeset
|
1037 |
cannibalsTeamName2 = AddTeam(loc("Reinforcements"), -1, "skull", "Island", "Pirate_qau", "cm_vampire") |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1038 |
for i = 7, 9 do |
13123
1ddb8aac5e30
ACF: Reduce computer hog levels in missions 2 and 6.
Wuzzy <Wuzzy2@mail.ru>
parents:
12938
diff
changeset
|
1039 |
cannibals[i] = AddHog(cannibalNames[i], 2, 50, "vampirichog") |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1040 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1041 |
|
14937
ff4003a90ff8
Enable automatic voicepack language selection for all missions
Wuzzy <Wuzzy2@mail.ru>
parents:
14903
diff
changeset
|
1042 |
cyborgTeamName = AddTeam(loc("011101001"), -1, "ring", "UFO", "Robot_qau", "cm_binary") |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1043 |
cyborg = AddHog(loc("Unit 334a$7%;.*"), 0, 200, "cyborg1") |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1044 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1045 |
for i = 1, 9 do |
7448
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
1046 |
AnimSetGearPosition(natives[i], unpack(nativePos[i])) |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1047 |
AnimTurn(natives[i], nativeDir[i]) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1048 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1049 |
|
7448
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
1050 |
AnimSetGearPosition(cyborg, 0, 0) |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1051 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1052 |
for i = 1, 9 do |
7466
5cb1b21b3176
Fixed bug in mission 5 with invisible obstacles
belphegorr <szabibibi@gmail.com>
parents:
7463
diff
changeset
|
1053 |
AnimSetGearPosition(cannibals[i], cannibalPos[i][1], cannibalPos[i][2] + 40) |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1054 |
AnimTurn(cannibals[i], cannibalDir[i]) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1055 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1056 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1057 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1058 |
function CondNeedToTurn(hog1, hog2) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1059 |
xl, xd = GetX(hog1), GetX(hog2) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1060 |
if xl > xd then |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1061 |
AnimInsertStepNext({func = AnimTurn, args = {hog1, "Left"}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1062 |
AnimInsertStepNext({func = AnimTurn, args = {hog2, "Right"}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1063 |
elseif xl < xd then |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1064 |
AnimInsertStepNext({func = AnimTurn, args = {hog2, "Left"}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1065 |
AnimInsertStepNext({func = AnimTurn, args = {hog1, "Right"}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1066 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1067 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1068 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1069 |
-----------------------------Main Functions---------------------------- |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1070 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1071 |
function onGameInit() |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1072 |
Seed = 2 |
14617
bd15c8551318
Make use of passive teams in various campaign missions
Wuzzy <Wuzzy2@mail.ru>
parents:
14597
diff
changeset
|
1073 |
GameFlags = gfSolidLand |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1074 |
TurnTime = 60000 |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1075 |
CaseFreq = 0 |
7425 | 1076 |
MinesNum = 0 |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1077 |
MinesTime = 3000 |
7425 | 1078 |
Explosives = 0 |
12554
d8af6f9b51c6
Disable SD in ACF6 and ASA: The first stop
Wuzzy <almikes@aol.com>
parents:
12517
diff
changeset
|
1079 |
Map = "Cave" |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1080 |
Theme = "Nature" |
12554
d8af6f9b51c6
Disable SD in ACF6 and ASA: The first stop
Wuzzy <almikes@aol.com>
parents:
12517
diff
changeset
|
1081 |
WaterRise = 0 |
d8af6f9b51c6
Disable SD in ACF6 and ASA: The first stop
Wuzzy <almikes@aol.com>
parents:
12517
diff
changeset
|
1082 |
HealthDecrease = 0 |
d8af6f9b51c6
Disable SD in ACF6 and ASA: The first stop
Wuzzy <almikes@aol.com>
parents:
12517
diff
changeset
|
1083 |
AddHogs() |
d8af6f9b51c6
Disable SD in ACF6 and ASA: The first stop
Wuzzy <almikes@aol.com>
parents:
12517
diff
changeset
|
1084 |
AnimInit() |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1085 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1086 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1087 |
function onGameStart() |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1088 |
GetVariables() |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1089 |
SetupAmmo() |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1090 |
SetupPlace() |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1091 |
AnimationSetup() |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1092 |
AddAnim(startAnim) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1093 |
AddFunction({func = AfterStartAnim, args = {}}) |
14625
5c52013fd0aa
ACF5: Disable utilities until the traitor has been dealt with
Wuzzy <Wuzzy2@mail.ru>
parents:
14617
diff
changeset
|
1094 |
SetAmmoDelay(amBlowTorch, 9999) |
5c52013fd0aa
ACF5: Disable utilities until the traitor has been dealt with
Wuzzy <Wuzzy2@mail.ru>
parents:
14617
diff
changeset
|
1095 |
SetAmmoDelay(amGirder, 9999) |
5c52013fd0aa
ACF5: Disable utilities until the traitor has been dealt with
Wuzzy <Wuzzy2@mail.ru>
parents:
14617
diff
changeset
|
1096 |
SetAmmoDelay(amLandGun, 9999) |
5c52013fd0aa
ACF5: Disable utilities until the traitor has been dealt with
Wuzzy <Wuzzy2@mail.ru>
parents:
14617
diff
changeset
|
1097 |
SetAmmoDelay(amRope, 9999) |
5c52013fd0aa
ACF5: Disable utilities until the traitor has been dealt with
Wuzzy <Wuzzy2@mail.ru>
parents:
14617
diff
changeset
|
1098 |
SetAmmoDelay(amParachute, 9999) |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1099 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1100 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1101 |
function onGameTick() |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1102 |
AnimUnWait() |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1103 |
if ShowAnimation() == false then |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1104 |
return |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1105 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1106 |
ExecuteAfterAnimations() |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1107 |
CheckEvents() |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1108 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1109 |
|
14881
543729d313f5
ACF5, ACF9: Clear mines around cyborg when it appears
Wuzzy <Wuzzy2@mail.ru>
parents:
14781
diff
changeset
|
1110 |
function onGearAdd(gear) |
543729d313f5
ACF5, ACF9: Clear mines around cyborg when it appears
Wuzzy <Wuzzy2@mail.ru>
parents:
14781
diff
changeset
|
1111 |
local gt = GetGearType(gear) |
15167
7416f6319de9
ACF5: Also clear crates around cyborg
Wuzzy <Wuzzy2@mail.ru>
parents:
15073
diff
changeset
|
1112 |
if gt == gtMine or gt == gtSMine or gt == gtAirMine or gt == gtCase then |
7416f6319de9
ACF5: Also clear crates around cyborg
Wuzzy <Wuzzy2@mail.ru>
parents:
15073
diff
changeset
|
1113 |
trackedNonCyborgGears[gear] = true |
14881
543729d313f5
ACF5, ACF9: Clear mines around cyborg when it appears
Wuzzy <Wuzzy2@mail.ru>
parents:
14781
diff
changeset
|
1114 |
end |
543729d313f5
ACF5, ACF9: Clear mines around cyborg when it appears
Wuzzy <Wuzzy2@mail.ru>
parents:
14781
diff
changeset
|
1115 |
end |
543729d313f5
ACF5, ACF9: Clear mines around cyborg when it appears
Wuzzy <Wuzzy2@mail.ru>
parents:
14781
diff
changeset
|
1116 |
|
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1117 |
function onGearDelete(gear) |
14881
543729d313f5
ACF5, ACF9: Clear mines around cyborg when it appears
Wuzzy <Wuzzy2@mail.ru>
parents:
14781
diff
changeset
|
1118 |
local gt = GetGearType(gear) |
15167
7416f6319de9
ACF5: Also clear crates around cyborg
Wuzzy <Wuzzy2@mail.ru>
parents:
15073
diff
changeset
|
1119 |
if gt == gtMine or gt == gtSMine or gt == gtAirMine or gt == gtCase then |
7416f6319de9
ACF5: Also clear crates around cyborg
Wuzzy <Wuzzy2@mail.ru>
parents:
15073
diff
changeset
|
1120 |
trackedNonCyborgGears[gear] = nil |
14881
543729d313f5
ACF5, ACF9: Clear mines around cyborg when it appears
Wuzzy <Wuzzy2@mail.ru>
parents:
14781
diff
changeset
|
1121 |
end |
543729d313f5
ACF5, ACF9: Clear mines around cyborg when it appears
Wuzzy <Wuzzy2@mail.ru>
parents:
14781
diff
changeset
|
1122 |
|
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1123 |
for i = 1, 7 do |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1124 |
if gear == natives[i] then |
7518
70babd9073a2
Mission 5: fixed a few bugs that came with the update (ammo menu bug and initial gear elimination bug)
belphegorr <szabibibi@gmail.com>
parents:
7512
diff
changeset
|
1125 |
if nativeDead[i] ~= true then |
70babd9073a2
Mission 5: fixed a few bugs that came with the update (ammo menu bug and initial gear elimination bug)
belphegorr <szabibibi@gmail.com>
parents:
7512
diff
changeset
|
1126 |
freshDead = nativeNames[i] |
70babd9073a2
Mission 5: fixed a few bugs that came with the update (ammo menu bug and initial gear elimination bug)
belphegorr <szabibibi@gmail.com>
parents:
7512
diff
changeset
|
1127 |
end |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1128 |
nativeDead[i] = true |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1129 |
nativesNum = nativesNum - 1 |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1130 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1131 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1132 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1133 |
for i = 1, 9 do |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1134 |
if gear == cannibals[i] then |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1135 |
cannibalDead[i] = true |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1136 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1137 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1138 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1139 |
if gear == spyHog and stage == spyKillStage then |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1140 |
freshDead = nil |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1141 |
choice = choiceEliminate |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1142 |
tmpVar = 1 |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1143 |
end |
7463
bd5c7b8db666
Crashfix, healthfix in mission 5
belphegorr <szabibibi@gmail.com>
parents:
7448
diff
changeset
|
1144 |
|
bd5c7b8db666
Crashfix, healthfix in mission 5
belphegorr <szabibibi@gmail.com>
parents:
7448
diff
changeset
|
1145 |
if gear == deployedHog then |
bd5c7b8db666
Crashfix, healthfix in mission 5
belphegorr <szabibibi@gmail.com>
parents:
7448
diff
changeset
|
1146 |
deployedDead = true |
bd5c7b8db666
Crashfix, healthfix in mission 5
belphegorr <szabibibi@gmail.com>
parents:
7448
diff
changeset
|
1147 |
end |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1148 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1149 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1150 |
function onAmmoStoreInit() |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1151 |
SetAmmo(amDEagle, 9, 0, 0, 0) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1152 |
SetAmmo(amSniperRifle, 4, 0, 0, 0) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1153 |
SetAmmo(amFirePunch, 9, 0, 0, 0) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1154 |
SetAmmo(amWhip, 9, 0, 0, 0) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1155 |
SetAmmo(amBaseballBat, 9, 0, 0, 0) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1156 |
SetAmmo(amHammer, 9, 0, 0, 0) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1157 |
SetAmmo(amLandGun, 9, 0, 0, 0) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1158 |
SetAmmo(amSnowball, 8, 0, 0, 0) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1159 |
SetAmmo(amGirder, 4, 0, 0, 2) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1160 |
SetAmmo(amParachute, 4, 0, 0, 2) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1161 |
SetAmmo(amSwitch, 8, 0, 0, 2) |
12557 | 1162 |
SetAmmo(amSkip, 9, 0, 0, 0) |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1163 |
SetAmmo(amRope, 5, 0, 0, 3) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1164 |
SetAmmo(amBlowTorch, 3, 0, 0, 3) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1165 |
SetAmmo(amPickHammer, 0, 0, 0, 3) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1166 |
SetAmmo(amLowGravity, 0, 0, 0, 2) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1167 |
SetAmmo(amDynamite, 0, 0, 0, 3) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1168 |
SetAmmo(amBazooka, 4, 0, 0, 4) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1169 |
SetAmmo(amGrenade, 4, 0, 0, 4) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1170 |
SetAmmo(amMine, 2, 0, 0, 2) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1171 |
SetAmmo(amSMine, 2, 0, 0, 2) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1172 |
SetAmmo(amMolotov, 2, 0, 0, 3) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1173 |
SetAmmo(amFlamethrower, 2, 0, 0, 3) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1174 |
SetAmmo(amShotgun, 4, 0, 0, 4) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1175 |
SetAmmo(amTeleport, 0, 0, 0, 2) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1176 |
SetAmmo(amDrill, 0, 0, 0, 4) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1177 |
SetAmmo(amMortar, 0, 0, 0, 4) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1178 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1179 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1180 |
j = 0 |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1181 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1182 |
function onNewTurn() |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1183 |
tmpVar = 0 |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1184 |
if AnimInProgress() then |
13755
110d6c1e817f
Lua: Rename globals: NoPointX→NO_CURSOR, cMaxTurnTime→MAX_TURN_TIME, cMaxHogHealth→MAX_HOG_HEALTH
Wuzzy <Wuzzy2@mail.ru>
parents:
13745
diff
changeset
|
1185 |
SetTurnTimeLeft(MAX_TURN_TIME) |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1186 |
return |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1187 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1188 |
|
7425 | 1189 |
if stage == platformStage then |
15059
c59bdec25012
ACF5: Fix number of turns before 3rd wave appears not always being 7
Wuzzy <Wuzzy2@mail.ru>
parents:
15034
diff
changeset
|
1190 |
if wave3TurnsLeft == nil then |
c59bdec25012
ACF5: Fix number of turns before 3rd wave appears not always being 7
Wuzzy <Wuzzy2@mail.ru>
parents:
15034
diff
changeset
|
1191 |
wave3TurnsLeft = 7 |
c59bdec25012
ACF5: Fix number of turns before 3rd wave appears not always being 7
Wuzzy <Wuzzy2@mail.ru>
parents:
15034
diff
changeset
|
1192 |
end |
c59bdec25012
ACF5: Fix number of turns before 3rd wave appears not always being 7
Wuzzy <Wuzzy2@mail.ru>
parents:
15034
diff
changeset
|
1193 |
if wave3TurnsLeft > 0 then |
c59bdec25012
ACF5: Fix number of turns before 3rd wave appears not always being 7
Wuzzy <Wuzzy2@mail.ru>
parents:
15034
diff
changeset
|
1194 |
AddCaption(string.format(loc("Turns until arrival: %d"), wave3TurnsLeft)) |
c59bdec25012
ACF5: Fix number of turns before 3rd wave appears not always being 7
Wuzzy <Wuzzy2@mail.ru>
parents:
15034
diff
changeset
|
1195 |
end |
7425 | 1196 |
end |
12755
6cec6b881a1c
ACF mission 5: Take away switch and always play with deployed hog in final mission stage
Wuzzy <Wuzzy2@mail.ru>
parents:
12616
diff
changeset
|
1197 |
if deployedHog then |
14490
f37910a73c19
Refactor ACF missions, store team names in variables
Wuzzy <Wuzzy2@mail.ru>
parents:
14450
diff
changeset
|
1198 |
if GetHogTeamName(CurrentHedgehog) == nativesTeamName then |
12755
6cec6b881a1c
ACF mission 5: Take away switch and always play with deployed hog in final mission stage
Wuzzy <Wuzzy2@mail.ru>
parents:
12616
diff
changeset
|
1199 |
AnimSwitchHog(deployedHog) |
6cec6b881a1c
ACF mission 5: Take away switch and always play with deployed hog in final mission stage
Wuzzy <Wuzzy2@mail.ru>
parents:
12616
diff
changeset
|
1200 |
end |
6cec6b881a1c
ACF mission 5: Take away switch and always play with deployed hog in final mission stage
Wuzzy <Wuzzy2@mail.ru>
parents:
12616
diff
changeset
|
1201 |
end |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1202 |
|
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1203 |
if stage == spyKillStage then |
14490
f37910a73c19
Refactor ACF missions, store team names in variables
Wuzzy <Wuzzy2@mail.ru>
parents:
14450
diff
changeset
|
1204 |
if GetHogTeamName(CurrentHedgehog) ~= nativesTeamName then |
12369
5857936921ec
Get rid of some incorrect timeout messages in ACF, by using EndTurn(true)
Wuzzy <almikes@aol.com>
parents:
12366
diff
changeset
|
1205 |
EndTurn(true) |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1206 |
else |
14448
6b1fe6d0a26b
Faster switch to correct hog in ACF5
Wuzzy <Wuzzy2@mail.ru>
parents:
14406
diff
changeset
|
1207 |
if CurrentHedgehog == spyHog then |
6b1fe6d0a26b
Faster switch to correct hog in ACF5
Wuzzy <Wuzzy2@mail.ru>
parents:
14406
diff
changeset
|
1208 |
AnimSwitchHog(natives[leaksNum]) |
6b1fe6d0a26b
Faster switch to correct hog in ACF5
Wuzzy <Wuzzy2@mail.ru>
parents:
14406
diff
changeset
|
1209 |
end |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1210 |
SetGearMessage(CurrentHedgehog, 0) |
13755
110d6c1e817f
Lua: Rename globals: NoPointX→NO_CURSOR, cMaxTurnTime→MAX_TURN_TIME, cMaxHogHealth→MAX_HOG_HEALTH
Wuzzy <Wuzzy2@mail.ru>
parents:
13745
diff
changeset
|
1211 |
SetTurnTimeLeft(MAX_TURN_TIME) |
14644
3e15412536c8
ACF5: Register is as "spare traitor" if player walks too far away
Wuzzy <Wuzzy2@mail.ru>
parents:
14625
diff
changeset
|
1212 |
if CheckChoiceRunawayAll() then |
3e15412536c8
ACF5: Register is as "spare traitor" if player walks too far away
Wuzzy <Wuzzy2@mail.ru>
parents:
14625
diff
changeset
|
1213 |
highJumped = true |
3e15412536c8
ACF5: Register is as "spare traitor" if player walks too far away
Wuzzy <Wuzzy2@mail.ru>
parents:
14625
diff
changeset
|
1214 |
end |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1215 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1216 |
else |
14490
f37910a73c19
Refactor ACF missions, store team names in variables
Wuzzy <Wuzzy2@mail.ru>
parents:
14450
diff
changeset
|
1217 |
if freshDead ~= nil and GetHogTeamName(CurrentHedgehog) == nativesTeamName then |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1218 |
SetupHogDeadAnim(freshDead) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1219 |
AddAnim(hogDeadAnim) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1220 |
AddFunction({func = AfterHogDeadAnim, args = {}}) |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1221 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1222 |
end |
7448
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
1223 |
if needToAct > 0 then |
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
1224 |
if needToAct == 1 then |
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
1225 |
RestoreWave(2) |
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
1226 |
SetupWave2Anim() |
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
1227 |
AddAnim(wave2Anim) |
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
1228 |
AddFunction({func = AfterWave2Anim, args = {}}) |
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
1229 |
elseif needToAct == 2 then |
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
1230 |
SetupWave2DeadAnim() |
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
1231 |
AddAnim(wave2DeadAnim) |
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
1232 |
AddFunction({func = AfterWave2DeadAnim, args = {}}) |
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
1233 |
elseif needToAct == 3 then |
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
1234 |
AnimSwitchHog(deployedHog) |
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
1235 |
AddFunction({func = AddWave3DeadAnim, args = {}}) |
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
1236 |
end |
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
1237 |
needToAct = 0 |
d0521a3a4358
Solved "floating repositionings" in every mission
belphegorr <szabibibi@gmail.com>
parents:
7425
diff
changeset
|
1238 |
end |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1239 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1240 |
|
15060
3e79818e21b1
ACF5: Spawn final wave at end of 7th turn instead of beginning of 8th turn
Wuzzy <Wuzzy2@mail.ru>
parents:
15059
diff
changeset
|
1241 |
function onEndTurn() |
15062
de864caac024
ACF5: Fix some turn bugs relating to 3rd wave
Wuzzy <Wuzzy2@mail.ru>
parents:
15061
diff
changeset
|
1242 |
if stage == platformStage and wave3TurnsLeft ~= nil then |
15060
3e79818e21b1
ACF5: Spawn final wave at end of 7th turn instead of beginning of 8th turn
Wuzzy <Wuzzy2@mail.ru>
parents:
15059
diff
changeset
|
1243 |
wave3TurnsLeft = wave3TurnsLeft - 1 |
3e79818e21b1
ACF5: Spawn final wave at end of 7th turn instead of beginning of 8th turn
Wuzzy <Wuzzy2@mail.ru>
parents:
15059
diff
changeset
|
1244 |
if wave3TurnsLeft == 0 then |
3e79818e21b1
ACF5: Spawn final wave at end of 7th turn instead of beginning of 8th turn
Wuzzy <Wuzzy2@mail.ru>
parents:
15059
diff
changeset
|
1245 |
DoTurnsOver() |
3e79818e21b1
ACF5: Spawn final wave at end of 7th turn instead of beginning of 8th turn
Wuzzy <Wuzzy2@mail.ru>
parents:
15059
diff
changeset
|
1246 |
end |
3e79818e21b1
ACF5: Spawn final wave at end of 7th turn instead of beginning of 8th turn
Wuzzy <Wuzzy2@mail.ru>
parents:
15059
diff
changeset
|
1247 |
end |
3e79818e21b1
ACF5: Spawn final wave at end of 7th turn instead of beginning of 8th turn
Wuzzy <Wuzzy2@mail.ru>
parents:
15059
diff
changeset
|
1248 |
end |
3e79818e21b1
ACF5: Spawn final wave at end of 7th turn instead of beginning of 8th turn
Wuzzy <Wuzzy2@mail.ru>
parents:
15059
diff
changeset
|
1249 |
|
15007
3ed1cbd31754
Backed out changeset 4596357d002d (onPreciseLocal causes desyncs)
Wuzzy <Wuzzy2@mail.ru>
parents:
14937
diff
changeset
|
1250 |
function onPrecise() |
7425 | 1251 |
if GameTime > 2500 and AnimInProgress() then |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1252 |
SetAnimSkip(true) |
7425 | 1253 |
return |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1254 |
end |
12615
dd0fb5b15567
ACF5: Spare traitor's life with skip instead of precise
Wuzzy <almikes@aol.com>
parents:
12559
diff
changeset
|
1255 |
end |
dd0fb5b15567
ACF5: Spare traitor's life with skip instead of precise
Wuzzy <almikes@aol.com>
parents:
12559
diff
changeset
|
1256 |
|
13177
159004144897
Use onSkipTurn in scripts to detect turn skips
Wuzzy <Wuzzy2@mail.ru>
parents:
13150
diff
changeset
|
1257 |
function onSkipTurn() |
159004144897
Use onSkipTurn in scripts to detect turn skips
Wuzzy <Wuzzy2@mail.ru>
parents:
13150
diff
changeset
|
1258 |
if stage == spyKillStage then |
7253
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1259 |
highJumped = true |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1260 |
end |
86814ed9feab
Added fifth mission and fixed minor control bug with mission 4
belphegorr <szabibibi@gmail.com>
parents:
diff
changeset
|
1261 |
end |