author | Wuzzy <Wuzzy2@mail.ru> |
Fri, 31 May 2019 21:39:47 +0200 | |
changeset 15096 | 5c8c729a16ce |
parent 15073 | 6f51c75994a4 |
child 15156 | 9d0dc3be6307 |
permissions | -rw-r--r-- |
13075 | 1 |
-- Basic Movement Training |
2 |
-- Teaches the basic movement controls. |
|
3 |
||
4 |
--[[ Lessons: |
|
13190
1b31c3fb65fc
Movement Training: Make the use of the mission panel clearer and harder to overlook
Wuzzy <Wuzzy2@mail.ru>
parents:
13079
diff
changeset
|
5 |
* How to show the mission panel again |
13075 | 6 |
* Walking |
7 |
* Collecting crates |
|
8 |
* Health basics |
|
9 |
* Jumping |
|
10 |
* Fall damage |
|
11 |
* Walking and staying on ice |
|
12 |
* Switching hedgehogs |
|
13 |
* Bouncing on rubber |
|
14 |
]] |
|
15 |
||
16 |
HedgewarsScriptLoad("/Scripts/Locale.lua") |
|
17 |
HedgewarsScriptLoad("/Scripts/Tracker.lua") |
|
13670
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
18 |
HedgewarsScriptLoad("/Scripts/Utils.lua") |
13075 | 19 |
|
20 |
local hhs = {} |
|
21 |
local hog_greenhorn, hog_cappy |
|
22 |
local crates = {} |
|
23 |
local switcherGear |
|
24 |
local tookDamage = false |
|
13079
e69cb8d5512c
Basic Movement Training: Fix inconsistent help texts when switching Cappy a 2nd time
Wuzzy <Wuzzy2@mail.ru>
parents:
13077
diff
changeset
|
25 |
local switchTextDelay = -1 |
13190
1b31c3fb65fc
Movement Training: Make the use of the mission panel clearer and harder to overlook
Wuzzy <Wuzzy2@mail.ru>
parents:
13079
diff
changeset
|
26 |
local missionPanelConfirmed = false |
14456
bb7f22cb0b64
Show mission panel key as permanent caption in movement training
Wuzzy <Wuzzy2@mail.ru>
parents:
14393
diff
changeset
|
27 |
local missionPanelConfirmedTimer = 0 |
13190
1b31c3fb65fc
Movement Training: Make the use of the mission panel clearer and harder to overlook
Wuzzy <Wuzzy2@mail.ru>
parents:
13079
diff
changeset
|
28 |
local turnStarted = false |
13075 | 29 |
|
30 |
local map = { |
|
31 |
"\1\74\7\29\135\1\74\8\11\0\1\83\7\135\135", |
|
32 |
"\1\250\7\135\0\1\204\7\137\135\1\238\7\135\0", |
|
33 |
"\2\17\7\130\0\2\42\7\110\0\2\74\7\94\0", |
|
34 |
"\2\106\7\89\0\2\99\7\121\0\2\76\7\128\0", |
|
35 |
"\2\115\7\98\135\2\147\7\98\0\2\179\7\94\0", |
|
36 |
"\2\147\7\96\0\2\174\7\89\0\2\145\7\91\135", |
|
37 |
"\2\115\7\87\0\2\122\7\89\135\2\154\7\89\0", |
|
38 |
"\2\170\7\89\0\2\179\7\105\135\2\179\7\107\135", |
|
39 |
"\2\177\7\142\135\2\177\8\105\0\3\74\7\94\135", |
|
40 |
"\3\74\8\50\0\3\88\7\89\135\3\129\7\89\0", |
|
41 |
"\3\161\7\91\0\3\193\7\98\0\3\225\7\100\0", |
|
42 |
"\4\1\7\91\0\4\33\7\89\0\4\65\7\98\0", |
|
43 |
"\4\97\7\100\0\4\134\7\103\0\4\166\7\100\0", |
|
44 |
"\4\200\7\98\0\4\232\7\96\0\5\8\7\96\0", |
|
45 |
"\5\40\7\98\0\5\72\7\98\0\5\107\7\100\0", |
|
46 |
"\5\139\7\98\0\5\173\7\89\0\5\207\7\94\0", |
|
47 |
"\5\239\7\100\0\6\15\7\100\0\6\47\7\100\0", |
|
48 |
"\6\86\7\100\0\6\118\7\100\0\6\153\7\94\0", |
|
49 |
"\6\185\7\91\0\6\219\7\91\0\6\251\7\98\0", |
|
50 |
"\7\27\7\103\0\7\61\7\100\0\7\94\7\96\0", |
|
51 |
"\7\126\7\91\0\7\160\7\94\0\7\192\7\105\0", |
|
52 |
"\7\224\7\116\0\7\254\7\126\0\8\34\7\123\0", |
|
53 |
"\8\66\7\119\0\8\98\7\114\0\8\133\7\119\0", |
|
54 |
"\8\165\7\132\0\8\195\7\142\0\8\229\7\146\0", |
|
55 |
"\9\5\7\151\0\9\37\7\155\0\9\69\7\164\0", |
|
56 |
"\9\101\7\174\0\9\131\7\190\0\9\160\7\208\0", |
|
57 |
"\9\186\7\226\0\9\215\7\240\0\9\250\7\238\0", |
|
58 |
"\10\26\7\233\0\10\58\7\233\0\10\90\7\235\0", |
|
59 |
"\10\122\7\238\0\10\154\7\238\0\10\186\7\249\0", |
|
60 |
"\10\213\8\14\0\10\245\8\9\0\11\3\8\39\0", |
|
61 |
"\11\24\8\66\0\11\10\8\62\0\10\213\8\5\135", |
|
62 |
"\10\245\8\7\0\11\21\8\14\0\11\56\8\25\0", |
|
63 |
"\11\92\8\37\0\11\106\8\43\0\9\85\8\0\147", |
|
64 |
"\9\83\8\0\0\8\208\7\233\147\3\168\7\197\147", |
|
65 |
"\8\94\7\197\0\2\83\7\210\147\1\179\7\238\0", |
|
66 |
"\1\44\7\84\139\1\12\7\87\0\0\238\7\98\0", |
|
67 |
"\0\211\7\119\0\0\190\7\144\0\0\165\7\164\0", |
|
68 |
"\0\146\7\190\0\0\140\7\222\0\0\142\7\254\0", |
|
69 |
"\0\153\8\30\0\0\156\8\37\0\1\7\7\178\139", |
|
70 |
"\0\247\7\210\0\0\224\7\238\0\0\215\8\14\0", |
|
71 |
"\0\215\8\18\0\1\5\7\238\139\1\19\8\11\0", |
|
72 |
"\1\32\8\43\0\1\39\8\62\0\1\67\7\32\136", |
|
73 |
"\1\69\6\253\0\1\69\6\219\0\1\69\6\187\0", |
|
74 |
"\1\74\6\155\0\1\80\6\123\0\1\51\6\109\0", |
|
75 |
"\1\35\6\80\0\1\12\6\105\0\0\243\6\132\0", |
|
76 |
"\0\233\6\176\0\0\252\6\212\0\1\14\6\240\0", |
|
77 |
"\0\252\7\13\0\0\233\6\219\0\0\238\6\182\0", |
|
78 |
"\0\238\6\148\0\1\12\6\164\0\1\9\6\201\0", |
|
79 |
"\0\236\6\224\0\0\206\6\251\0\0\165\7\32\0", |
|
80 |
"\0\144\7\57\0\0\124\7\82\0\0\103\7\107\0", |
|
81 |
"\0\96\7\144\0\0\92\7\176\0\0\112\7\139\0", |
|
82 |
"\0\121\7\105\0\0\130\7\61\0\0\142\7\25\0", |
|
83 |
"\0\156\6\251\0\0\188\6\247\0\0\201\6\217\0", |
|
84 |
"\0\167\6\224\0\0\146\6\251\0\0\130\7\25\0", |
|
85 |
"\0\112\7\66\0\0\98\7\110\0\0\98\7\142\0", |
|
86 |
"\0\98\7\174\0\0\101\7\206\0\0\101\7\238\0", |
|
87 |
"\0\126\8\7\0\0\137\8\14\0\10\46\7\245\136", |
|
88 |
"\10\14\7\247\0\9\241\7\229\0\9\209\7\222\0", |
|
89 |
"\9\176\7\226\0\9\138\7\233\0\9\94\7\233\0", |
|
90 |
"\9\62\7\233\0\9\46\7\235\0\2\53\7\139\136", |
|
91 |
"\2\21\7\137\0\1\250\7\119\0\1\218\7\116\0", |
|
92 |
"\1\186\7\119\0\1\151\7\119\0\1\119\7\114\0", |
|
93 |
"\1\92\7\135\0\1\78\7\132\0" } |
|
94 |
||
95 |
local function drawMap() |
|
96 |
for m=1, #map do |
|
97 |
ParseCommand("draw "..map[m]) |
|
98 |
end |
|
99 |
end |
|
100 |
||
101 |
function onGameInit() |
|
102 |
GameFlags = gfDisableWind + gfDisableGirders + gfDisableLandObjects + gfOneClanMode + gfInfAttack |
|
103 |
Map = "" |
|
104 |
Seed = 0 |
|
105 |
Theme = "Brick" |
|
106 |
MapGen = mgDrawn |
|
13755
110d6c1e817f
Lua: Rename globals: NoPointX→NO_CURSOR, cMaxTurnTime→MAX_TURN_TIME, cMaxHogHealth→MAX_HOG_HEALTH
Wuzzy <Wuzzy2@mail.ru>
parents:
13670
diff
changeset
|
107 |
TurnTime = MAX_TURN_TIME |
13075 | 108 |
Explosives = 0 |
109 |
MinesNum = 0 |
|
110 |
CaseFreq = 0 |
|
111 |
WaterRise = 0 |
|
112 |
HealthDecrease = 0 |
|
113 |
||
114 |
-- DRAW MAP -- |
|
115 |
drawMap() |
|
116 |
||
117 |
------ HOG LIST ------ |
|
14485
208359558642
Use player-chosen team identity for training and a few challenges
Wuzzy <Wuzzy2@mail.ru>
parents:
14469
diff
changeset
|
118 |
AddMissionTeam(-1) |
13075 | 119 |
|
14485
208359558642
Use player-chosen team identity for training and a few challenges
Wuzzy <Wuzzy2@mail.ru>
parents:
14469
diff
changeset
|
120 |
hhs[1] = AddMissionHog(100) |
13075 | 121 |
SetGearPosition(hhs[1], 404, 1714) |
122 |
SetEffect(hhs[1], heResurrectable, 1) |
|
123 |
||
14485
208359558642
Use player-chosen team identity for training and a few challenges
Wuzzy <Wuzzy2@mail.ru>
parents:
14469
diff
changeset
|
124 |
hhs[2] = AddMissionHog(100) |
13075 | 125 |
SetGearPosition(hhs[2], 620, 1538) |
126 |
SetEffect(hhs[2], heResurrectable, 1) |
|
127 |
HogTurnLeft(hhs[2], true) |
|
128 |
||
14485
208359558642
Use player-chosen team identity for training and a few challenges
Wuzzy <Wuzzy2@mail.ru>
parents:
14469
diff
changeset
|
129 |
hhs[3] = AddMissionHog(100) |
13075 | 130 |
SetGearPosition(hhs[3], 1573, 1824) |
131 |
SetEffect(hhs[3], heResurrectable, 1) |
|
132 |
||
133 |
hhs[4] = AddHog(loc("Cappy"), 0, 100, "cap_red") |
|
134 |
SetGearPosition(hhs[4], 2114, 1411) |
|
135 |
SetEffect(hhs[4], heResurrectable, 1) |
|
136 |
HogTurnLeft(hhs[4], true) |
|
137 |
||
14485
208359558642
Use player-chosen team identity for training and a few challenges
Wuzzy <Wuzzy2@mail.ru>
parents:
14469
diff
changeset
|
138 |
hhs[5] = AddMissionHog(100) |
13075 | 139 |
SetGearPosition(hhs[5], 1813, 1285) |
140 |
SetEffect(hhs[5], heResurrectable, 1) |
|
141 |
||
142 |
hog_greenhorn = hhs[1] |
|
143 |
hog_cappy = hhs[4] |
|
14485
208359558642
Use player-chosen team identity for training and a few challenges
Wuzzy <Wuzzy2@mail.ru>
parents:
14469
diff
changeset
|
144 |
|
208359558642
Use player-chosen team identity for training and a few challenges
Wuzzy <Wuzzy2@mail.ru>
parents:
14469
diff
changeset
|
145 |
for i=1,#hhs do |
208359558642
Use player-chosen team identity for training and a few challenges
Wuzzy <Wuzzy2@mail.ru>
parents:
14469
diff
changeset
|
146 |
if hhs[i] ~= hog_cappy then |
208359558642
Use player-chosen team identity for training and a few challenges
Wuzzy <Wuzzy2@mail.ru>
parents:
14469
diff
changeset
|
147 |
if GetHogName(hhs[i]) == loc("Cappy") then |
208359558642
Use player-chosen team identity for training and a few challenges
Wuzzy <Wuzzy2@mail.ru>
parents:
14469
diff
changeset
|
148 |
SetHogName(hhs[i], loc("Greenhorn")) |
208359558642
Use player-chosen team identity for training and a few challenges
Wuzzy <Wuzzy2@mail.ru>
parents:
14469
diff
changeset
|
149 |
end |
208359558642
Use player-chosen team identity for training and a few challenges
Wuzzy <Wuzzy2@mail.ru>
parents:
14469
diff
changeset
|
150 |
if GetHogHat(hhs[i]) == "cap_red" then |
208359558642
Use player-chosen team identity for training and a few challenges
Wuzzy <Wuzzy2@mail.ru>
parents:
14469
diff
changeset
|
151 |
SetHogHat(hhs[i], "NoHat") |
208359558642
Use player-chosen team identity for training and a few challenges
Wuzzy <Wuzzy2@mail.ru>
parents:
14469
diff
changeset
|
152 |
end |
208359558642
Use player-chosen team identity for training and a few challenges
Wuzzy <Wuzzy2@mail.ru>
parents:
14469
diff
changeset
|
153 |
end |
208359558642
Use player-chosen team identity for training and a few challenges
Wuzzy <Wuzzy2@mail.ru>
parents:
14469
diff
changeset
|
154 |
end |
13075 | 155 |
|
156 |
SendHealthStatsOff() |
|
14956
c173fae0a223
Hide player ranks in training missions
Wuzzy <Wuzzy2@mail.ru>
parents:
14933
diff
changeset
|
157 |
SendRankingStatsOff() |
13075 | 158 |
end |
159 |
||
160 |
local function LoadGearData() |
|
161 |
||
162 |
--BEGIN CORE DATA-- |
|
163 |
||
164 |
------ GIRDER LIST ------ |
|
13670
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
165 |
PlaceSprite(292, 1488, sprAmGirder, 6, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
166 |
PlaceSprite(454, 1731, sprAmGirder, 4, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
167 |
PlaceSprite(467, 1653, sprAmGirder, 4, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
168 |
PlaceSprite(611, 1702, sprAmGirder, 5, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
169 |
PlaceSprite(426, 1558, sprAmGirder, 7, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
170 |
PlaceSprite(555, 1558, sprAmGirder, 5, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
171 |
PlaceSprite(649, 1600, sprAmGirder, 7, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
172 |
PlaceSprite(1072, 1809, sprAmGirder, 0, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
173 |
PlaceSprite(1040, 1831, sprAmGirder, 0, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
174 |
PlaceSprite(1124, 1805, sprAmGirder, 2, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
175 |
PlaceSprite(1175, 1772, sprAmGirder, 0, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
176 |
PlaceSprite(1226, 1738, sprAmGirder, 2, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
177 |
PlaceSprite(1275, 1705, sprAmGirder, 0, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
13790
4ed202f0428e
Easier back jumps in Basic Movement Training (fixes bug 692)
Wuzzy <Wuzzy2@mail.ru>
parents:
13755
diff
changeset
|
178 |
PlaceSprite(1325, 1700, sprAmGirder, 6, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
4ed202f0428e
Easier back jumps in Basic Movement Training (fixes bug 692)
Wuzzy <Wuzzy2@mail.ru>
parents:
13755
diff
changeset
|
179 |
PlaceSprite(1342, 1638, sprAmGirder, 2, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
13670
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
180 |
PlaceSprite(1368, 1560, sprAmGirder, 3, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
181 |
PlaceSprite(1390, 1665, sprAmGirder, 6, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
182 |
PlaceSprite(1481, 1716, sprAmGirder, 4, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
183 |
PlaceSprite(1625, 1652, sprAmGirder, 7, U_LAND_TINT_ICE, nil, nil, nil, lfIce) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
184 |
PlaceSprite(1729, 1596, sprAmGirder, 0, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
185 |
PlaceSprite(1762, 1545, sprAmGirder, 2, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
186 |
PlaceSprite(1563, 1536, sprAmGirder, 5, U_LAND_TINT_ICE, nil, nil, nil, lfIce) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
187 |
PlaceSprite(1506, 1392, sprAmGirder, 6, U_LAND_TINT_ICE, nil, nil, nil, lfIce) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
188 |
PlaceSprite(1591, 1450, sprAmGirder, 3, U_LAND_TINT_ICE, nil, nil, nil, lfIce) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
189 |
PlaceSprite(1650, 1463, sprAmGirder, 1, U_LAND_TINT_ICE, nil, nil, nil, lfIce) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
190 |
PlaceSprite(1766, 1492, sprAmGirder, 4, U_LAND_TINT_ICE, nil, nil, nil, lfIce) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
191 |
PlaceSprite(1925, 1492, sprAmGirder, 4, U_LAND_TINT_ICE, nil, nil, nil, lfIce) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
192 |
PlaceSprite(2114, 1428, sprAmGirder, 0, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
193 |
PlaceSprite(2187, 1435, sprAmGirder, 6, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
194 |
PlaceSprite(2135, 1478, sprAmGirder, 2, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
195 |
PlaceSprite(2284, 1650, sprAmGirder, 4, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
196 |
PlaceSprite(2005, 1724, sprAmGirder, 4, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
197 |
PlaceSprite(1885, 1562, sprAmGirder, 7, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
198 |
PlaceSprite(2252, 1700, sprAmGirder, 2, U_LAND_TINT_ICE, nil, nil, nil, lfIce) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
199 |
PlaceSprite(2308, 1803, sprAmGirder, 5, U_LAND_TINT_ICE, nil, nil, nil, lfIce) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
200 |
PlaceSprite(2394, 1893, sprAmGirder, 1, U_LAND_TINT_ICE, nil, nil, nil, lfIce) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
201 |
PlaceSprite(605, 1761, sprAmGirder, 2, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
202 |
PlaceSprite(1813, 1312, sprAmGirder, 4, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
203 |
PlaceSprite(1742, 1260, sprAmGirder, 2, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
204 |
PlaceSprite(1812, 1210, sprAmGirder, 4, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
205 |
PlaceSprite(1884, 1260, sprAmGirder, 2, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
206 |
PlaceSprite(1545, 1811, sprAmGirder, 2, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
207 |
PlaceSprite(1577, 1761, sprAmGirder, 0, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
208 |
PlaceSprite(1610, 1811, sprAmGirder, 2, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
13790
4ed202f0428e
Easier back jumps in Basic Movement Training (fixes bug 692)
Wuzzy <Wuzzy2@mail.ru>
parents:
13755
diff
changeset
|
209 |
PlaceSprite(1440, 1511, sprAmGirder, 6, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
13670
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
210 |
PlaceSprite(2082, 1337, sprAmGirder, 6, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
211 |
PlaceSprite(2187, 1273, sprAmGirder, 6, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
212 |
PlaceSprite(2097, 1246, sprAmGirder, 4, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
213 |
PlaceSprite(593, 1465, sprAmGirder, 7, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
214 |
PlaceSprite(684, 1505, sprAmGirder, 5, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
215 |
PlaceSprite(2046, 1492, sprAmGirder, 0, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
216 |
PlaceSprite(2064, 1442, sprAmGirder, 2, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
217 |
PlaceSprite(1849, 1426, sprAmGirder, 4, U_LAND_TINT_ICE, nil, nil, nil, lfIce) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
218 |
PlaceSprite(3051, 1957, sprAmGirder, 6, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
219 |
PlaceSprite(3101, 1956, sprAmGirder, 0, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
220 |
PlaceSprite(3150, 1954, sprAmGirder, 6, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
221 |
PlaceSprite(3233, 1962, sprAmGirder, 5, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
222 |
PlaceSprite(3322, 2004, sprAmGirder, 3, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
223 |
PlaceSprite(3391, 2001, sprAmGirder, 1, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
224 |
PlaceSprite(3483, 1982, sprAmGirder, 7, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
225 |
PlaceSprite(2770, 1980, sprAmGirder, 4, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
226 |
PlaceSprite(2886, 2005, sprAmGirder, 1, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
227 |
PlaceSprite(2698, 1891, sprAmGirder, 6, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
228 |
PlaceSprite(2843, 1891, sprAmGirder, 6, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
229 |
PlaceSprite(2834, 1771, sprAmGirder, 5, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
230 |
PlaceSprite(2706, 1771, sprAmGirder, 7, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
231 |
PlaceSprite(2768, 1818, sprAmGirder, 0, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
232 |
PlaceSprite(2768, 1899, sprAmGirder, 0, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
233 |
PlaceSprite(1760, 1393, sprAmGirder, 2, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
234 |
PlaceSprite(516, 1795, sprAmGirder, 4, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
13075 | 235 |
|
236 |
------ RUBBER LIST ------ |
|
13670
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
237 |
PlaceSprite(2151, 1659, sprAmRubber, 3, U_LAND_TINT_NORMAL, nil, nil, nil, lfBouncy) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
238 |
PlaceSprite(2399, 1698, sprAmRubber, 3, U_LAND_TINT_NORMAL, nil, nil, nil, lfBouncy) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
239 |
PlaceSprite(2467, 1553, sprAmRubber, 2, U_LAND_TINT_NORMAL, nil, nil, nil, lfBouncy) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
240 |
PlaceSprite(2279, 1497, sprAmRubber, 0, U_LAND_TINT_NORMAL, nil, nil, nil, lfBouncy) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
241 |
PlaceSprite(2414, 1452, sprAmRubber, 0, U_LAND_TINT_NORMAL, nil, nil, nil, lfBouncy) |
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
242 |
PlaceSprite(1860, 1687, sprAmRubber, 1, U_LAND_TINT_NORMAL, nil, nil, nil, lfBouncy) |
13075 | 243 |
|
244 |
------ SPRITE LIST ------ |
|
13670
5664650befcd
Move common sprite tint values into Utils Lua library
Wuzzy <Wuzzy2@mail.ru>
parents:
13669
diff
changeset
|
245 |
PlaceSprite(1297, 1732, sprTargetBee, 0, U_LAND_TINT_NORMAL, nil, nil, nil, lfNormal) |
13075 | 246 |
|
247 |
------ CRATE LIST ------ |
|
248 |
crates[1] = SpawnHealthCrate(401, 1850) -- Jumping |
|
249 |
crates[2] = SpawnHealthCrate(2639, 1973) -- Final crate |
|
250 |
crates[3] = SpawnHealthCrate(1969, 1698) -- Rubber |
|
251 |
crates[4] = SpawnHealthCrate(889, 1829) -- Back Jumping |
|
252 |
crates[5] = SpawnHealthCrate(1486, 1694) -- Walking on Ice |
|
253 |
crates[6] = SpawnHealthCrate(2033, 1470) -- Walking on Ice completed |
|
13790
4ed202f0428e
Easier back jumps in Basic Movement Training (fixes bug 692)
Wuzzy <Wuzzy2@mail.ru>
parents:
13755
diff
changeset
|
254 |
crates[7] = SpawnHealthCrate(1198, 1750) -- Back Jumping 2 |
13075 | 255 |
crates[8] = SpawnSupplyCrate(1851, 1402, amSwitch, 100) -- Switch Hedgehog |
13190
1b31c3fb65fc
Movement Training: Make the use of the mission panel clearer and harder to overlook
Wuzzy <Wuzzy2@mail.ru>
parents:
13079
diff
changeset
|
256 |
crates[9] = SpawnHealthCrate(564, 1772) -- Health |
14387
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
257 |
-- FIXME: Not available in touch because no “precise” button |
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
258 |
if INTERFACE ~= "touch" then |
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
259 |
crates[10] = SpawnHealthCrate(2290, 1622) -- Turning Around |
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
260 |
end |
13075 | 261 |
end |
262 |
||
263 |
local function victory() |
|
14469
ead8928a59f8
Report mission victory for most missions
Wuzzy <Wuzzy2@mail.ru>
parents:
14457
diff
changeset
|
264 |
SaveMissionVar("Won", "true") |
15073
6f51c75994a4
Semi-standardize usage of icons in many mission panels
Wuzzy <Wuzzy2@mail.ru>
parents:
14969
diff
changeset
|
265 |
ShowMission(loc("Basic Movement Training"), loc("Training complete!"),loc("Congratulations! You have completed the obstacle course!"), 4, 0) |
13075 | 266 |
SendStat(siGameResult, loc("You have completed the Basic Movement Training!")) |
267 |
SendStat(siCustomAchievement, loc("Congratulations!")) |
|
13791
461db56397b4
Add exit hint after Basic Movement Training
Wuzzy <Wuzzy2@mail.ru>
parents:
13790
diff
changeset
|
268 |
SendStat(siCustomAchievement, loc("Return to the training menu by pressing the “Go back” button.")) |
13075 | 269 |
PlaySound(sndVictory, CurrentHedgehog) |
270 |
-- Disable controls, end game |
|
271 |
SetInputMask(0) |
|
272 |
SetWeapon(amNothing) |
|
273 |
SetGearMessage(CurrentHedgehog, band(GetGearMessage(CurrentHedgehog), bnot(gmAllStoppable))) |
|
274 |
EndGame() |
|
14933
4c5fb1ee75b7
Add winner animation for missions that didn't have it
Wuzzy <Wuzzy2@mail.ru>
parents:
14566
diff
changeset
|
275 |
for i=1,#hhs do |
4c5fb1ee75b7
Add winner animation for missions that didn't have it
Wuzzy <Wuzzy2@mail.ru>
parents:
14566
diff
changeset
|
276 |
SetState(hhs[i], gstWinner) |
4c5fb1ee75b7
Add winner animation for missions that didn't have it
Wuzzy <Wuzzy2@mail.ru>
parents:
14566
diff
changeset
|
277 |
end |
13075 | 278 |
end |
279 |
||
13079
e69cb8d5512c
Basic Movement Training: Fix inconsistent help texts when switching Cappy a 2nd time
Wuzzy <Wuzzy2@mail.ru>
parents:
13077
diff
changeset
|
280 |
local function switchHedgehogText() |
e69cb8d5512c
Basic Movement Training: Fix inconsistent help texts when switching Cappy a 2nd time
Wuzzy <Wuzzy2@mail.ru>
parents:
13077
diff
changeset
|
281 |
if CurrentHedgehog == hog_cappy then |
e69cb8d5512c
Basic Movement Training: Fix inconsistent help texts when switching Cappy a 2nd time
Wuzzy <Wuzzy2@mail.ru>
parents:
13077
diff
changeset
|
282 |
ShowMission(loc("Basic Movement Training"), loc("Switch Hedgehog (3/3)"), |
e69cb8d5512c
Basic Movement Training: Fix inconsistent help texts when switching Cappy a 2nd time
Wuzzy <Wuzzy2@mail.ru>
parents:
13077
diff
changeset
|
283 |
loc("This is Cappy.").."|".. |
e69cb8d5512c
Basic Movement Training: Fix inconsistent help texts when switching Cappy a 2nd time
Wuzzy <Wuzzy2@mail.ru>
parents:
13077
diff
changeset
|
284 |
loc("To finish hedgehog selection, just do anything|with him, like walking."), |
e69cb8d5512c
Basic Movement Training: Fix inconsistent help texts when switching Cappy a 2nd time
Wuzzy <Wuzzy2@mail.ru>
parents:
13077
diff
changeset
|
285 |
2, 20000) |
e69cb8d5512c
Basic Movement Training: Fix inconsistent help texts when switching Cappy a 2nd time
Wuzzy <Wuzzy2@mail.ru>
parents:
13077
diff
changeset
|
286 |
else |
14387
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
287 |
local ctrl = "" |
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
288 |
if INTERFACE == "desktop" then |
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
289 |
ctrl = loc("Hit the “Switch Hedgehog” key until you have|selected Cappy, the hedgehog with the cap!").."|".. |
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
290 |
loc("Switch hedgehog: [Tabulator]") |
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
291 |
else |
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
292 |
ctrl = loc("Tap the “rotating arrow” button on the left|until you have selected Cappy, the hedgehog with the cap!") |
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
293 |
end |
13075 | 294 |
ShowMission(loc("Basic Movement Training"), loc("Switch Hedgehog (2/3)"), |
295 |
loc("You have activated Switch Hedgehog!").."|".. |
|
296 |
loc("The spinning arrows above your hedgehog show|which hedgehog is selected right now.").."|".. |
|
14387
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
297 |
ctrl, 2, 20000) |
13075 | 298 |
end |
299 |
end |
|
300 |
||
13079
e69cb8d5512c
Basic Movement Training: Fix inconsistent help texts when switching Cappy a 2nd time
Wuzzy <Wuzzy2@mail.ru>
parents:
13077
diff
changeset
|
301 |
function onGearAdd(gear) |
e69cb8d5512c
Basic Movement Training: Fix inconsistent help texts when switching Cappy a 2nd time
Wuzzy <Wuzzy2@mail.ru>
parents:
13077
diff
changeset
|
302 |
if GetGearType(gear) == gtSwitcher then |
e69cb8d5512c
Basic Movement Training: Fix inconsistent help texts when switching Cappy a 2nd time
Wuzzy <Wuzzy2@mail.ru>
parents:
13077
diff
changeset
|
303 |
switcherGear = gear |
e69cb8d5512c
Basic Movement Training: Fix inconsistent help texts when switching Cappy a 2nd time
Wuzzy <Wuzzy2@mail.ru>
parents:
13077
diff
changeset
|
304 |
switchHedgehogText() |
e69cb8d5512c
Basic Movement Training: Fix inconsistent help texts when switching Cappy a 2nd time
Wuzzy <Wuzzy2@mail.ru>
parents:
13077
diff
changeset
|
305 |
end |
e69cb8d5512c
Basic Movement Training: Fix inconsistent help texts when switching Cappy a 2nd time
Wuzzy <Wuzzy2@mail.ru>
parents:
13077
diff
changeset
|
306 |
end |
e69cb8d5512c
Basic Movement Training: Fix inconsistent help texts when switching Cappy a 2nd time
Wuzzy <Wuzzy2@mail.ru>
parents:
13077
diff
changeset
|
307 |
|
13075 | 308 |
function onGearDelete(gear) |
14387
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
309 |
local ctrl = "" |
13075 | 310 |
-- Switching done |
311 |
if GetGearType(gear) == gtSwitcher then |
|
312 |
switcherGear = nil |
|
313 |
if CurrentHedgehog == hog_cappy then |
|
314 |
ShowMission(loc("Basic Movement Training"), loc("Leap of Faith"), |
|
315 |
loc("Good! You now control Cappy.").."|".. |
|
316 |
loc("Collect the remaining crates to complete the training."), |
|
317 |
2, 0) |
|
318 |
else |
|
14387
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
319 |
if INTERFACE == "desktop" then |
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
320 |
ctrl = loc("Open ammo menu: [Right click]").."|".. |
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
321 |
loc("Attack: [Space]") |
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
322 |
elseif INTERFACE == "touch" then |
14393
cf49fac6e88a
Make better re-use of some mission strings
Wuzzy <Wuzzy2@mail.ru>
parents:
14389
diff
changeset
|
323 |
ctrl = loc("Open ammo menu: Tap the [Suitcase]").."|".. |
cf49fac6e88a
Make better re-use of some mission strings
Wuzzy <Wuzzy2@mail.ru>
parents:
14389
diff
changeset
|
324 |
loc("Attack: Tap the [Bomb]") |
14387
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
325 |
end |
13075 | 326 |
ShowMission(loc("Basic Movement Training"), loc("Switch Hedgehog (Failed!)"), |
327 |
loc("Oops! You have selected the wrong hedgehog! Just try again.").."|".. |
|
328 |
loc("Select “Switch Hedgehog” from the ammo menu and|hit the “Attack” key to proceed.").."|".. |
|
14387
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
329 |
ctrl, 2, 0) |
13075 | 330 |
end |
331 |
||
332 |
-- Crate collected (or destroyed, but this should not be possible) |
|
333 |
elseif gear == crates[1] then |
|
14387
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
334 |
if INTERFACE == "desktop" then |
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
335 |
ctrl = loc("Long Jump: [Enter]") |
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
336 |
elseif INTERFACE == "touch" then |
14393
cf49fac6e88a
Make better re-use of some mission strings
Wuzzy <Wuzzy2@mail.ru>
parents:
14389
diff
changeset
|
337 |
ctrl = loc("Long Jump: Tap the [Curvy Arrow] button for long") |
14387
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
338 |
end |
13190
1b31c3fb65fc
Movement Training: Make the use of the mission panel clearer and harder to overlook
Wuzzy <Wuzzy2@mail.ru>
parents:
13079
diff
changeset
|
339 |
ShowMission(loc("Basic Movement Training"), loc("Jumping"), |
13075 | 340 |
loc("Get the next crate by jumping over the abyss.").."|".. |
341 |
loc("Careful, hedgehogs can't swim!").."|".. |
|
14387
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
342 |
ctrl, 2, 5000) |
13075 | 343 |
elseif gear == crates[2] then |
344 |
victory() |
|
345 |
elseif gear == crates[4] then |
|
14387
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
346 |
if INTERFACE == "desktop" then |
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
347 |
ctrl = loc("High Jump: [Backspace]").."|"..loc("Back Jump: [Backspace] ×2") |
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
348 |
elseif INTERFACE == "touch" then |
14393
cf49fac6e88a
Make better re-use of some mission strings
Wuzzy <Wuzzy2@mail.ru>
parents:
14389
diff
changeset
|
349 |
ctrl = loc("High Jump: Tap the [Curvy Arrow] shortly").."|"..loc("Back Jump: Double-tap the [Curvy Arrow]") |
14387
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
350 |
end |
13075 | 351 |
ShowMission(loc("Basic Movement Training"), loc("Back Jumping (1/2)"), |
13077
1ff4671066d2
Add "Turning Around" to movement training
Wuzzy <Wuzzy2@mail.ru>
parents:
13075
diff
changeset
|
352 |
loc("For the next crate, you have to do back jumps.") .. "|" .. |
13361
ced5dc3079a3
Minor improvements in tutorial mission texts to make stuff clearer
Wuzzy <Wuzzy2@mail.ru>
parents:
13195
diff
changeset
|
353 |
loc("To reach higher ground, walk to a ledge, look to the left, then do a back jump.") .. "|" .. |
14387
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
354 |
ctrl, 2, 6600) |
13075 | 355 |
elseif gear == crates[7] then |
14387
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
356 |
if INTERFACE == "desktop" then |
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
357 |
ctrl = loc("High Jump: [Backspace]").."|"..loc("Back Jump: [Backspace] ×2") |
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
358 |
elseif INTERFACE == "touch" then |
14393
cf49fac6e88a
Make better re-use of some mission strings
Wuzzy <Wuzzy2@mail.ru>
parents:
14389
diff
changeset
|
359 |
ctrl = loc("High Jump: Tap the [Curvy Arrow] shortly").."|"..loc("Back Jump: Double-tap the [Curvy Arrow]") |
14387
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
360 |
end |
13075 | 361 |
ShowMission(loc("Basic Movement Training"), loc("Back Jumping (2/2)"), |
13790
4ed202f0428e
Easier back jumps in Basic Movement Training (fixes bug 692)
Wuzzy <Wuzzy2@mail.ru>
parents:
13755
diff
changeset
|
362 |
loc("To get over the next obstacles, keep some distance from the wall before you back jump.").."|".. |
4ed202f0428e
Easier back jumps in Basic Movement Training (fixes bug 692)
Wuzzy <Wuzzy2@mail.ru>
parents:
13755
diff
changeset
|
363 |
loc("Hint: To jump higher, wait a bit before you hit “High Jump” a second time.").."|".. |
14387
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
364 |
ctrl, 2, 15000) |
13075 | 365 |
elseif gear == crates[5] then |
14387
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
366 |
-- FIXME: Touch doesn't have precise aim yet :( |
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
367 |
if INTERFACE == "desktop" then |
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
368 |
ctrl = "|" .. |
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
369 |
loc("You can also hold down the key for “Precise Aim” to prevent slipping.") .. "|" .. |
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
370 |
loc("Precise Aim: [Left Shift]") |
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
371 |
end |
13075 | 372 |
ShowMission(loc("Basic Movement Training"), loc("Walking on Ice"), |
373 |
loc("These girders are slippery, like ice.").."|".. |
|
374 |
loc("And you need to move to the top!").."|".. |
|
14387
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
375 |
loc("If you don't want to slip away, you have to keep moving!").. |
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
376 |
ctrl, 2, 9000) |
13075 | 377 |
elseif gear == crates[6] then |
14387
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
378 |
-- FIXME: Touch doesn't have precise aim yet :( |
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
379 |
if INTERFACE == "desktop" then |
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
380 |
ctrl = "|" .. loc("Remember: Hold down [Left Shift] to prevent slipping") |
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
381 |
end |
13075 | 382 |
ShowMission(loc("Basic Movement Training"), loc("A mysterious Box"), |
14387
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
383 |
loc("The next crate is an utility crate.").."|"..loc("What's in the box, you ask? Let's find out!").. |
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
384 |
ctrl, 2, 6000) |
13075 | 385 |
elseif gear == crates[8] then |
14387
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
386 |
if INTERFACE == "desktop" then |
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
387 |
ctrl = loc("Open ammo menu: [Right click]").."|".. |
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
388 |
loc("Attack: [Space]") |
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
389 |
elseif INTERFACE == "touch" then |
14393
cf49fac6e88a
Make better re-use of some mission strings
Wuzzy <Wuzzy2@mail.ru>
parents:
14389
diff
changeset
|
390 |
ctrl = loc("Open ammo menu: Tap the [Suitcase]").."|".. |
cf49fac6e88a
Make better re-use of some mission strings
Wuzzy <Wuzzy2@mail.ru>
parents:
14389
diff
changeset
|
391 |
loc("Attack: Tap the [Bomb]") |
14387
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
392 |
end |
13075 | 393 |
ShowMission(loc("Basic Movement Training"), loc("Switch Hedgehog (1/3)"), |
394 |
loc("You have collected the “Switch Hedgehog” utility!").."|".. |
|
395 |
loc("This allows to select any hedgehog in your team!").."|".. |
|
396 |
loc("Select “Switch Hedgehog” from the ammo menu and|hit the “Attack” key.").."|".. |
|
14387
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
397 |
ctrl, 2, 30000) |
13075 | 398 |
elseif gear == crates[3] then |
399 |
ShowMission(loc("Basic Movement Training"), loc("Rubber"), loc("As you probably noticed, these rubber bands|are VERY elastic. Hedgehogs and many other|things will bounce off without taking any damage.").."|".. |
|
13077
1ff4671066d2
Add "Turning Around" to movement training
Wuzzy <Wuzzy2@mail.ru>
parents:
13075
diff
changeset
|
400 |
loc("Now try to get out of this bounce house|and take the next crate."), 2, 8000) |
13075 | 401 |
elseif gear == crates[9] then |
14387
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
402 |
if INTERFACE == "desktop" then |
14566
c8436da5c58b
Mention zoom key in movement training
Wuzzy <Wuzzy2@mail.ru>
parents:
14485
diff
changeset
|
403 |
ctrl = loc("Look around: [Mouse movement]") .. "|" .. |
c8436da5c58b
Mention zoom key in movement training
Wuzzy <Wuzzy2@mail.ru>
parents:
14485
diff
changeset
|
404 |
loc("Zoom: [Rotate mouse wheel]") |
14387
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
405 |
elseif INTERFACE == "touch" then |
14566
c8436da5c58b
Mention zoom key in movement training
Wuzzy <Wuzzy2@mail.ru>
parents:
14485
diff
changeset
|
406 |
ctrl = loc("Look around: [Tap or swipe on the screen]") .. "|" .. |
c8436da5c58b
Mention zoom key in movement training
Wuzzy <Wuzzy2@mail.ru>
parents:
14485
diff
changeset
|
407 |
-- multi-touch gesture |
c8436da5c58b
Mention zoom key in movement training
Wuzzy <Wuzzy2@mail.ru>
parents:
14485
diff
changeset
|
408 |
loc("Zoom: [Pinch] with 2 fingers") |
14387
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
409 |
end |
13190
1b31c3fb65fc
Movement Training: Make the use of the mission panel clearer and harder to overlook
Wuzzy <Wuzzy2@mail.ru>
parents:
13079
diff
changeset
|
410 |
ShowMission(loc("Basic Movement Training"), loc("Health"), loc("You just got yourself some extra health.|The more health your hedgehogs have, the better!").."|".. |
14969
bcecb3349948
Display current health in top right corner
Wuzzy <Wuzzy2@mail.ru>
parents:
14956
diff
changeset
|
411 |
loc("The health of your current hedgehog|is shown at the top right corner.").."|".. |
13361
ced5dc3079a3
Minor improvements in tutorial mission texts to make stuff clearer
Wuzzy <Wuzzy2@mail.ru>
parents:
13195
diff
changeset
|
412 |
loc("Now go to the next crate.").."|".. |
14969
bcecb3349948
Display current health in top right corner
Wuzzy <Wuzzy2@mail.ru>
parents:
14956
diff
changeset
|
413 |
ctrl, 2, 11500) |
13077
1ff4671066d2
Add "Turning Around" to movement training
Wuzzy <Wuzzy2@mail.ru>
parents:
13075
diff
changeset
|
414 |
elseif gear == crates[10] then |
14387
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
415 |
-- FIXME: This crate is unused in touch atm |
13077
1ff4671066d2
Add "Turning Around" to movement training
Wuzzy <Wuzzy2@mail.ru>
parents:
13075
diff
changeset
|
416 |
ShowMission(loc("Basic Movement Training"), loc("Turning Around"), |
1ff4671066d2
Add "Turning Around" to movement training
Wuzzy <Wuzzy2@mail.ru>
parents:
13075
diff
changeset
|
417 |
loc("By the way, you can turn around without walking|by holding down Precise when you hit a walk control.").."|".. |
1ff4671066d2
Add "Turning Around" to movement training
Wuzzy <Wuzzy2@mail.ru>
parents:
13075
diff
changeset
|
418 |
loc("Get the final crate to the right to complete the training.").."|".. |
1ff4671066d2
Add "Turning Around" to movement training
Wuzzy <Wuzzy2@mail.ru>
parents:
13075
diff
changeset
|
419 |
loc("Turn around: [Left Shift] + [Left]/[Right]") |
1ff4671066d2
Add "Turning Around" to movement training
Wuzzy <Wuzzy2@mail.ru>
parents:
13075
diff
changeset
|
420 |
, 2, 8000) |
13075 | 421 |
end |
422 |
end |
|
423 |
||
424 |
function onGearDamage(gear) |
|
14457
df065d68e513
Movement training: Show damage message only after passing certain point
Wuzzy <Wuzzy2@mail.ru>
parents:
14456
diff
changeset
|
425 |
if GetGearType(gear) == gtHedgehog and tookDamage == false and GetX(gear) > 1362 then |
13075 | 426 |
ShowMission(loc("Basic Movement Training"), loc("Fall Damage"), loc("Ouch! You just took fall damage.").."|".. |
427 |
loc("Better get yourself another health crate to heal your wounds."), 2, 5000) |
|
428 |
tookDamage = true |
|
429 |
end |
|
430 |
end |
|
431 |
||
432 |
function onSwitch() |
|
433 |
-- Update help while switching hogs |
|
434 |
if switcherGear then |
|
13079
e69cb8d5512c
Basic Movement Training: Fix inconsistent help texts when switching Cappy a 2nd time
Wuzzy <Wuzzy2@mail.ru>
parents:
13077
diff
changeset
|
435 |
-- Delay for CurrentHedgehog to update |
e69cb8d5512c
Basic Movement Training: Fix inconsistent help texts when switching Cappy a 2nd time
Wuzzy <Wuzzy2@mail.ru>
parents:
13077
diff
changeset
|
436 |
switchTextDelay = 1 |
13075 | 437 |
end |
438 |
end |
|
439 |
||
13190
1b31c3fb65fc
Movement Training: Make the use of the mission panel clearer and harder to overlook
Wuzzy <Wuzzy2@mail.ru>
parents:
13079
diff
changeset
|
440 |
local function firstMission() |
14456
bb7f22cb0b64
Show mission panel key as permanent caption in movement training
Wuzzy <Wuzzy2@mail.ru>
parents:
14393
diff
changeset
|
441 |
-- Here we teach player must know how to show the current mission texts again. |
13190
1b31c3fb65fc
Movement Training: Make the use of the mission panel clearer and harder to overlook
Wuzzy <Wuzzy2@mail.ru>
parents:
13079
diff
changeset
|
442 |
-- We force the player to hit Attack before the actual training begins. |
14456
bb7f22cb0b64
Show mission panel key as permanent caption in movement training
Wuzzy <Wuzzy2@mail.ru>
parents:
14393
diff
changeset
|
443 |
-- Later, the mission panel key is perma-shown as caption. |
14387
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
444 |
local ctrl = "" |
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
445 |
if INTERFACE == "desktop" then |
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
446 |
ctrl = loc("IMPORTANT: To see the mission panel again, hold the mission panel key.").."| |".. |
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
447 |
loc("Note: This basic training assumes default controls.").."|".. |
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
448 |
loc("Mission panel: [M]").."|".. |
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
449 |
loc("Quit: [Esc]").."|".. |
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
450 |
loc("Pause: [P]").."| |".. |
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
451 |
loc("To begin with the training, hit the attack key!").."|".. |
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
452 |
loc("Attack: [Space]") |
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
453 |
elseif INTERFACE == "touch" then |
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
454 |
ctrl = loc("IMPORTANT: To see the mission panel again, pause the game.").."| |".. |
14393
cf49fac6e88a
Make better re-use of some mission strings
Wuzzy <Wuzzy2@mail.ru>
parents:
14389
diff
changeset
|
455 |
loc("Pause: Tap the [Pause] button").."| |".. |
14387
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
456 |
loc("To begin with the training, tap the attack button!").."|".. |
14393
cf49fac6e88a
Make better re-use of some mission strings
Wuzzy <Wuzzy2@mail.ru>
parents:
14389
diff
changeset
|
457 |
loc("Attack: Tap the [Bomb]") |
14387
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
458 |
end |
13190
1b31c3fb65fc
Movement Training: Make the use of the mission panel clearer and harder to overlook
Wuzzy <Wuzzy2@mail.ru>
parents:
13079
diff
changeset
|
459 |
ShowMission(loc("Basic Movement Training"), loc("Mission Panel"), |
1b31c3fb65fc
Movement Training: Make the use of the mission panel clearer and harder to overlook
Wuzzy <Wuzzy2@mail.ru>
parents:
13079
diff
changeset
|
460 |
loc("This is the mission panel.").."|".. |
1b31c3fb65fc
Movement Training: Make the use of the mission panel clearer and harder to overlook
Wuzzy <Wuzzy2@mail.ru>
parents:
13079
diff
changeset
|
461 |
loc("Here you will find the current mission instructions.").."|".. |
1b31c3fb65fc
Movement Training: Make the use of the mission panel clearer and harder to overlook
Wuzzy <Wuzzy2@mail.ru>
parents:
13079
diff
changeset
|
462 |
loc("Normally, the mission panel disappears after a few seconds.").."|".. |
14387
f9d4b8222903
Add tutorial texts for Touch interface
Wuzzy <Wuzzy2@mail.ru>
parents:
13791
diff
changeset
|
463 |
ctrl, 2, 900000, true) |
13190
1b31c3fb65fc
Movement Training: Make the use of the mission panel clearer and harder to overlook
Wuzzy <Wuzzy2@mail.ru>
parents:
13079
diff
changeset
|
464 |
|
1b31c3fb65fc
Movement Training: Make the use of the mission panel clearer and harder to overlook
Wuzzy <Wuzzy2@mail.ru>
parents:
13079
diff
changeset
|
465 |
-- TODO: This and other training missions are currently hardcoding control names. |
1b31c3fb65fc
Movement Training: Make the use of the mission panel clearer and harder to overlook
Wuzzy <Wuzzy2@mail.ru>
parents:
13079
diff
changeset
|
466 |
-- This should be fixed eventually. |
1b31c3fb65fc
Movement Training: Make the use of the mission panel clearer and harder to overlook
Wuzzy <Wuzzy2@mail.ru>
parents:
13079
diff
changeset
|
467 |
end |
1b31c3fb65fc
Movement Training: Make the use of the mission panel clearer and harder to overlook
Wuzzy <Wuzzy2@mail.ru>
parents:
13079
diff
changeset
|
468 |
|
13079
e69cb8d5512c
Basic Movement Training: Fix inconsistent help texts when switching Cappy a 2nd time
Wuzzy <Wuzzy2@mail.ru>
parents:
13077
diff
changeset
|
469 |
function onGameTick20() |
e69cb8d5512c
Basic Movement Training: Fix inconsistent help texts when switching Cappy a 2nd time
Wuzzy <Wuzzy2@mail.ru>
parents:
13077
diff
changeset
|
470 |
if switchTextDelay > 0 then |
e69cb8d5512c
Basic Movement Training: Fix inconsistent help texts when switching Cappy a 2nd time
Wuzzy <Wuzzy2@mail.ru>
parents:
13077
diff
changeset
|
471 |
switchTextDelay = switchTextDelay - 1 |
e69cb8d5512c
Basic Movement Training: Fix inconsistent help texts when switching Cappy a 2nd time
Wuzzy <Wuzzy2@mail.ru>
parents:
13077
diff
changeset
|
472 |
elseif switchTextDelay == 0 then |
e69cb8d5512c
Basic Movement Training: Fix inconsistent help texts when switching Cappy a 2nd time
Wuzzy <Wuzzy2@mail.ru>
parents:
13077
diff
changeset
|
473 |
switchHedgehogText() |
e69cb8d5512c
Basic Movement Training: Fix inconsistent help texts when switching Cappy a 2nd time
Wuzzy <Wuzzy2@mail.ru>
parents:
13077
diff
changeset
|
474 |
switchTextDelay = -1 |
13075 | 475 |
end |
13190
1b31c3fb65fc
Movement Training: Make the use of the mission panel clearer and harder to overlook
Wuzzy <Wuzzy2@mail.ru>
parents:
13079
diff
changeset
|
476 |
if turnStarted and GameTime % 10000 == 0 and not missionPanelConfirmed then |
1b31c3fb65fc
Movement Training: Make the use of the mission panel clearer and harder to overlook
Wuzzy <Wuzzy2@mail.ru>
parents:
13079
diff
changeset
|
477 |
-- Forces the first mission panel to be displayed without time limit |
1b31c3fb65fc
Movement Training: Make the use of the mission panel clearer and harder to overlook
Wuzzy <Wuzzy2@mail.ru>
parents:
13079
diff
changeset
|
478 |
firstMission() |
1b31c3fb65fc
Movement Training: Make the use of the mission panel clearer and harder to overlook
Wuzzy <Wuzzy2@mail.ru>
parents:
13079
diff
changeset
|
479 |
end |
14456
bb7f22cb0b64
Show mission panel key as permanent caption in movement training
Wuzzy <Wuzzy2@mail.ru>
parents:
14393
diff
changeset
|
480 |
if missionPanelConfirmed then |
bb7f22cb0b64
Show mission panel key as permanent caption in movement training
Wuzzy <Wuzzy2@mail.ru>
parents:
14393
diff
changeset
|
481 |
missionPanelConfirmedTimer = missionPanelConfirmedTimer + 20 |
bb7f22cb0b64
Show mission panel key as permanent caption in movement training
Wuzzy <Wuzzy2@mail.ru>
parents:
14393
diff
changeset
|
482 |
--[[ After confirming the initial mission panel, |
bb7f22cb0b64
Show mission panel key as permanent caption in movement training
Wuzzy <Wuzzy2@mail.ru>
parents:
14393
diff
changeset
|
483 |
show the mission panel key as permanent caption |
bb7f22cb0b64
Show mission panel key as permanent caption in movement training
Wuzzy <Wuzzy2@mail.ru>
parents:
14393
diff
changeset
|
484 |
so the player can't overlook or forget it. ]] |
bb7f22cb0b64
Show mission panel key as permanent caption in movement training
Wuzzy <Wuzzy2@mail.ru>
parents:
14393
diff
changeset
|
485 |
if missionPanelConfirmedTimer > 7000 then |
bb7f22cb0b64
Show mission panel key as permanent caption in movement training
Wuzzy <Wuzzy2@mail.ru>
parents:
14393
diff
changeset
|
486 |
if INTERFACE == "desktop" then |
bb7f22cb0b64
Show mission panel key as permanent caption in movement training
Wuzzy <Wuzzy2@mail.ru>
parents:
14393
diff
changeset
|
487 |
AddCaption(loc("Press [M] to see the mission texts"), capcolDefault, capgrpMessage2) |
bb7f22cb0b64
Show mission panel key as permanent caption in movement training
Wuzzy <Wuzzy2@mail.ru>
parents:
14393
diff
changeset
|
488 |
elseif INTERFACE == "touch" then |
bb7f22cb0b64
Show mission panel key as permanent caption in movement training
Wuzzy <Wuzzy2@mail.ru>
parents:
14393
diff
changeset
|
489 |
AddCaption(loc("Tap [Pause] to see the mission texts"), capcolDefault, capgrpMessage2) |
bb7f22cb0b64
Show mission panel key as permanent caption in movement training
Wuzzy <Wuzzy2@mail.ru>
parents:
14393
diff
changeset
|
490 |
end |
bb7f22cb0b64
Show mission panel key as permanent caption in movement training
Wuzzy <Wuzzy2@mail.ru>
parents:
14393
diff
changeset
|
491 |
end |
bb7f22cb0b64
Show mission panel key as permanent caption in movement training
Wuzzy <Wuzzy2@mail.ru>
parents:
14393
diff
changeset
|
492 |
end |
13075 | 493 |
end |
494 |
||
13635
fe7d2bbf5f3f
Fix resurrection animation appearing at wrong position for some missions and styles
Wuzzy <Wuzzy2@mail.ru>
parents:
13588
diff
changeset
|
495 |
function onGearResurrect(gear, vGear) |
13075 | 496 |
AddCaption(loc("Your hedgehog has been revived!")) |
497 |
if gear == hog_cappy then |
|
498 |
SetGearPosition(gear, 404, 1714) |
|
499 |
elseif gear == hog_greenhorn then |
|
500 |
SetGearPosition(gear, 401, 1850) |
|
501 |
else |
|
502 |
-- Generic teleport to Rhombus' cage |
|
503 |
SetGearPosition(gear, 619, 1559) |
|
504 |
end |
|
13635
fe7d2bbf5f3f
Fix resurrection animation appearing at wrong position for some missions and styles
Wuzzy <Wuzzy2@mail.ru>
parents:
13588
diff
changeset
|
505 |
if vGear then |
fe7d2bbf5f3f
Fix resurrection animation appearing at wrong position for some missions and styles
Wuzzy <Wuzzy2@mail.ru>
parents:
13588
diff
changeset
|
506 |
SetVisualGearValues(vGear, GetX(gear), GetY(gear)) |
fe7d2bbf5f3f
Fix resurrection animation appearing at wrong position for some missions and styles
Wuzzy <Wuzzy2@mail.ru>
parents:
13588
diff
changeset
|
507 |
end |
13075 | 508 |
FollowGear(gear) |
509 |
end |
|
510 |
||
511 |
function onNewTurn() |
|
512 |
SwitchHog(hog_greenhorn) |
|
13190
1b31c3fb65fc
Movement Training: Make the use of the mission panel clearer and harder to overlook
Wuzzy <Wuzzy2@mail.ru>
parents:
13079
diff
changeset
|
513 |
FollowGear(hog_greenhorn) |
1b31c3fb65fc
Movement Training: Make the use of the mission panel clearer and harder to overlook
Wuzzy <Wuzzy2@mail.ru>
parents:
13079
diff
changeset
|
514 |
if not missionPanelConfirmed then |
1b31c3fb65fc
Movement Training: Make the use of the mission panel clearer and harder to overlook
Wuzzy <Wuzzy2@mail.ru>
parents:
13079
diff
changeset
|
515 |
turnStarted = true |
1b31c3fb65fc
Movement Training: Make the use of the mission panel clearer and harder to overlook
Wuzzy <Wuzzy2@mail.ru>
parents:
13079
diff
changeset
|
516 |
PlaySound(sndHello, hog_greenhorn) |
1b31c3fb65fc
Movement Training: Make the use of the mission panel clearer and harder to overlook
Wuzzy <Wuzzy2@mail.ru>
parents:
13079
diff
changeset
|
517 |
firstMission() |
1b31c3fb65fc
Movement Training: Make the use of the mission panel clearer and harder to overlook
Wuzzy <Wuzzy2@mail.ru>
parents:
13079
diff
changeset
|
518 |
end |
1b31c3fb65fc
Movement Training: Make the use of the mission panel clearer and harder to overlook
Wuzzy <Wuzzy2@mail.ru>
parents:
13079
diff
changeset
|
519 |
end |
1b31c3fb65fc
Movement Training: Make the use of the mission panel clearer and harder to overlook
Wuzzy <Wuzzy2@mail.ru>
parents:
13079
diff
changeset
|
520 |
|
1b31c3fb65fc
Movement Training: Make the use of the mission panel clearer and harder to overlook
Wuzzy <Wuzzy2@mail.ru>
parents:
13079
diff
changeset
|
521 |
function onAttack() |
1b31c3fb65fc
Movement Training: Make the use of the mission panel clearer and harder to overlook
Wuzzy <Wuzzy2@mail.ru>
parents:
13079
diff
changeset
|
522 |
if not missionPanelConfirmed then |
1b31c3fb65fc
Movement Training: Make the use of the mission panel clearer and harder to overlook
Wuzzy <Wuzzy2@mail.ru>
parents:
13079
diff
changeset
|
523 |
-- Mission panel confirmed, release controls |
1b31c3fb65fc
Movement Training: Make the use of the mission panel clearer and harder to overlook
Wuzzy <Wuzzy2@mail.ru>
parents:
13079
diff
changeset
|
524 |
PlaySound(sndPlaced) |
1b31c3fb65fc
Movement Training: Make the use of the mission panel clearer and harder to overlook
Wuzzy <Wuzzy2@mail.ru>
parents:
13079
diff
changeset
|
525 |
SetInputMask(0xFFFFFFFF) |
1b31c3fb65fc
Movement Training: Make the use of the mission panel clearer and harder to overlook
Wuzzy <Wuzzy2@mail.ru>
parents:
13079
diff
changeset
|
526 |
SetSoundMask(sndYesSir, false) |
1b31c3fb65fc
Movement Training: Make the use of the mission panel clearer and harder to overlook
Wuzzy <Wuzzy2@mail.ru>
parents:
13079
diff
changeset
|
527 |
PlaySound(sndYesSir, hog_greenhorn) |
1b31c3fb65fc
Movement Training: Make the use of the mission panel clearer and harder to overlook
Wuzzy <Wuzzy2@mail.ru>
parents:
13079
diff
changeset
|
528 |
-- First mission: How to walk |
13075 | 529 |
ShowMission(loc("Basic Movement Training"), loc("First Steps"), loc("Complete the obstacle course.") .."|".. |
530 |
loc("To begin, walk to the crate to the right.").."|".. |
|
13190
1b31c3fb65fc
Movement Training: Make the use of the mission panel clearer and harder to overlook
Wuzzy <Wuzzy2@mail.ru>
parents:
13079
diff
changeset
|
531 |
loc("Walk: [Left]/[Right]"), 2, 7000) |
1b31c3fb65fc
Movement Training: Make the use of the mission panel clearer and harder to overlook
Wuzzy <Wuzzy2@mail.ru>
parents:
13079
diff
changeset
|
532 |
missionPanelConfirmed = true |
13075 | 533 |
end |
534 |
end |
|
535 |
||
536 |
function onGameStart() |
|
13190
1b31c3fb65fc
Movement Training: Make the use of the mission panel clearer and harder to overlook
Wuzzy <Wuzzy2@mail.ru>
parents:
13079
diff
changeset
|
537 |
-- Disable input to force player to confirm first message |
1b31c3fb65fc
Movement Training: Make the use of the mission panel clearer and harder to overlook
Wuzzy <Wuzzy2@mail.ru>
parents:
13079
diff
changeset
|
538 |
SetInputMask(0) |
1b31c3fb65fc
Movement Training: Make the use of the mission panel clearer and harder to overlook
Wuzzy <Wuzzy2@mail.ru>
parents:
13079
diff
changeset
|
539 |
SetSoundMask(sndYesSir, true) |
13075 | 540 |
LoadGearData() |
15073
6f51c75994a4
Semi-standardize usage of icons in many mission panels
Wuzzy <Wuzzy2@mail.ru>
parents:
14969
diff
changeset
|
541 |
ShowMission(loc("Basic Movement Training"), loc("Basic Training"), loc("Complete the obstacle course."), 10, 0) |
13075 | 542 |
FollowGear(hog_greenhorn) |
543 |
end |
|
544 |