author | Wuzzy <almikes@aol.com> |
Wed, 16 Nov 2016 18:02:22 +0100 | |
changeset 11893 | 25a6faa5ac46 |
parent 8043 | da083f8d95e6 |
child 12051 | 05a968518a56 |
permissions | -rw-r--r-- |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
1 |
------------------------------------ |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
2 |
-- TUMBLER |
5825
a6eab1b7c00d
Scripting: Update screen dimensions on screen resize and introduce onScreenResize() event.
sheepluva
parents:
5720
diff
changeset
|
3 |
-- v.0.7.1 |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
4 |
------------------------------------ |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
5 |
|
8043 | 6 |
HedgewarsScriptLoad("/Scripts/Locale.lua") |
7 |
HedgewarsScriptLoad("/Scripts/Tracker.lua") |
|
4872 | 8 |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
9 |
local fMod = 1000000 -- use this for dev and .16+ games |
5720 | 10 |
|
4872 | 11 |
local leftOn = false |
12 |
local rightOn = false |
|
13 |
local upOn = false |
|
14 |
local downOn = false |
|
5720 | 15 |
local preciseOn = false |
4872 | 16 |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
17 |
local wep = {} |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
18 |
local wepAmmo = {} |
5720 | 19 |
local wepCol = {} |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
20 |
local wepIndex = 0 |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
21 |
local wepCount = 0 |
5720 | 22 |
local fGears = 0 |
23 |
||
24 |
local mineSpawn |
|
25 |
local barrelSpawn |
|
26 |
||
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
27 |
local roundKills = 0 |
5720 | 28 |
local barrelsEaten = 0 |
29 |
local minesEaten = 0 |
|
4872 | 30 |
|
5720 | 31 |
local moveTimer = 0 |
32 |
local fireTimer = 0 |
|
4872 | 33 |
local TimeLeftCounter = 0 |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
34 |
local TimeLeft = 0 |
4872 | 35 |
local stopMovement = false |
36 |
local tumbleStarted = false |
|
37 |
||
5720 | 38 |
local vTag = {} |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
39 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
40 |
------------------------ |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
41 |
-- version 0.4 |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
42 |
------------------------ |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
43 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
44 |
-- removed some old code/comments |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
45 |
-- removed both shell and mortar as the primary and secondary weapons |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
46 |
-- the primary weapon is now an explosive(barrel) |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
47 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
48 |
-- added support for picking up barrels scattered about the map (backspace) |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
49 |
-- added support for dragging around mines (enter toggles on/off) |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
50 |
-- added support for primary fire being onAttackUp |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
51 |
-- added a trail to indicate when the player has 5s or less left to tumble |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
52 |
-- updated showmission to reflect changed controls and options |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
53 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
54 |
------------------------ |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
55 |
-- version 0.5 |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
56 |
------------------------ |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
57 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
58 |
-- changed some of the user feedback |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
59 |
-- i can't remember?? |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
60 |
-- substituted onAttackUp for onPrecise() |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
61 |
-- brought in line with new velocity changes |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
62 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
63 |
------------------------ |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
64 |
-- version 0.6 |
4872 | 65 |
------------------------ |
66 |
||
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
67 |
-- reduced starting "ammo" |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
68 |
-- randomly spawn new barrels/mines on new turn |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
69 |
-- updated user feedback |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
70 |
-- better locs and coloured addcaptions |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
71 |
-- added tag for turntime |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
72 |
-- removed tractor beam |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
73 |
-- added two new weapons and changed ammo handling |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
74 |
-- health crates now give tumbler time, and wep/utility give flamer ammo |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
75 |
-- explosives AND mines can be picked up to increase their relative ammo |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
76 |
-- replaced "no weapon" selected message that hw serves |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
77 |
-- modified crate frequencies a bit |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
78 |
-- added some simple kill-based achievements, i think |
4872 | 79 |
|
5720 | 80 |
------------------------ |
81 |
-- version 0.7 |
|
82 |
------------------------ |
|
83 |
||
84 |
-- a few code optimisations/performance tweaks |
|
85 |
-- removed some deprecated code |
|
86 |
-- fix a potential spawn bug |
|
87 |
||
88 |
-- improved HUD (now shows ammo counts) |
|
89 |
-- improved user feedback (less generic messages) |
|
90 |
-- colour-coded addcaptions to match hud :) |
|
91 |
||
92 |
-- base tumbling time now equals scheme turntime |
|
93 |
-- tumbling time extension is now based on the amount of health contained in crate |
|
94 |
-- new mines per turn based on minesnum |
|
95 |
-- new barrels per turn based on explosives |
|
96 |
||
97 |
-- added 2 more achievements: barrel eater and mine eater (like kills, don't do anything atm) |
|
98 |
-- slightly increased grab distance for explosives/mines |
|
99 |
-- slightly increased flamer velocity |
|
100 |
-- slightly decreased flamer volume |
|
101 |
-- added a flame vaporiser (based on number of flame gears?) |
|
102 |
-- give tumblers an extra 47 health on the start of their tumble to counter the grenade (exp) |
|
103 |
-- refocus camera on tumbler on newturn (not on crates, barrels etc) |
|
104 |
-- increase delay: yes, yes, eat your hearts out |
|
105 |
||
106 |
-- commit log |
|
107 |
-- Better HUD |
|
108 |
-- Allow more user customization |
|
109 |
-- Bugfix for new gear spawns |
|
110 |
-- Performance tweaks |
|
111 |
-- Variety of small gameplay changes |
|
112 |
||
5825
a6eab1b7c00d
Scripting: Update screen dimensions on screen resize and introduce onScreenResize() event.
sheepluva
parents:
5720
diff
changeset
|
113 |
------------------------ |
a6eab1b7c00d
Scripting: Update screen dimensions on screen resize and introduce onScreenResize() event.
sheepluva
parents:
5720
diff
changeset
|
114 |
-- version 0.7.1 |
a6eab1b7c00d
Scripting: Update screen dimensions on screen resize and introduce onScreenResize() event.
sheepluva
parents:
5720
diff
changeset
|
115 |
------------------------ |
a6eab1b7c00d
Scripting: Update screen dimensions on screen resize and introduce onScreenResize() event.
sheepluva
parents:
5720
diff
changeset
|
116 |
|
a6eab1b7c00d
Scripting: Update screen dimensions on screen resize and introduce onScreenResize() event.
sheepluva
parents:
5720
diff
changeset
|
117 |
-- redraw HUD on screen resolution change |
a6eab1b7c00d
Scripting: Update screen dimensions on screen resize and introduce onScreenResize() event.
sheepluva
parents:
5720
diff
changeset
|
118 |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
119 |
--------------------------- |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
120 |
-- some other ideas/things |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
121 |
--------------------------- |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
122 |
--[[ |
5720 | 123 |
-- add better gameflag handling |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
124 |
-- fix flamer "shots remaining" message on start or choose a standard versus % |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
125 |
-- add more sounds |
5720 | 126 |
-- better barrel/minespawn effects |
127 |
-- separate grab distance for mines/barrels |
|
128 |
-- [probably not] make barrels always explode? |
|
129 |
-- [probably not] persistent ammo? |
|
130 |
-- [probably not] dont hurt tumblers and restore their health at turn end? |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
131 |
]] |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
132 |
|
5720 | 133 |
|
134 |
---------------------------------------------------------------- |
|
135 |
---------------------------------------------------------------- |
|
136 |
||
137 |
local flames = {} |
|
138 |
local fGearValues = {} |
|
139 |
||
140 |
function runOnflames(func) |
|
141 |
for k, gear in ipairs(flames) do |
|
142 |
func(gear) |
|
143 |
end |
|
144 |
end |
|
145 |
||
146 |
function trackFGear(gear) |
|
147 |
table.insert(flames, gear) |
|
148 |
end |
|
149 |
||
150 |
function trackFGearDeletion(gear) |
|
151 |
fGearValues[gear] = nil |
|
152 |
for k, g in ipairs(flames) do |
|
153 |
if g == gear then |
|
154 |
table.remove(flames, k) |
|
155 |
break |
|
156 |
end |
|
157 |
end |
|
158 |
end |
|
159 |
||
160 |
function getFGearValue(gear, key) |
|
161 |
if fGearValues[gear] ~= nil then |
|
162 |
return fGearValues[gear][key] |
|
163 |
end |
|
164 |
return nil |
|
165 |
end |
|
166 |
||
167 |
function setFGearValue(gear, key, value) |
|
168 |
found = false |
|
169 |
for id, values in pairs(fGearValues) do |
|
170 |
if id == gear then |
|
171 |
values[key] = value |
|
172 |
found = true |
|
173 |
end |
|
174 |
end |
|
175 |
if not found then |
|
176 |
fGearValues[gear] = { [key] = value } |
|
177 |
end |
|
178 |
end |
|
179 |
||
180 |
function decreaseFGearValue(gear, key) |
|
181 |
for id, values in pairs(fGearValues) do |
|
182 |
if id == gear then |
|
183 |
values[key] = values[key] - 1 |
|
184 |
end |
|
185 |
end |
|
186 |
end |
|
187 |
||
188 |
function HandleLife(gear) |
|
189 |
||
190 |
decreaseFGearValue(gear, "L") |
|
191 |
if getFGearValue(gear, "L") == 0 then |
|
192 |
AddVisualGear(GetX(gear), GetY(gear), vgtSmoke, 0, false) |
|
193 |
DeleteGear(gear) |
|
194 |
end |
|
195 |
||
196 |
end |
|
197 |
||
198 |
---------------------------------------------------------------- |
|
199 |
---------------------------------------------------------------- |
|
200 |
||
201 |
function HideTags() |
|
202 |
||
5827
a416f1070fdf
we don't need trailing whitespaces... I guess :P
sheepluva
parents:
5825
diff
changeset
|
203 |
for i = 0, 3 do |
5720 | 204 |
SetVisualGearValues(vTag[i],0,0,0,0,0,1,0, 0, 240000, 0xffffff00) |
205 |
end |
|
206 |
||
207 |
end |
|
208 |
||
209 |
function DrawTag(i) |
|
5827
a416f1070fdf
we don't need trailing whitespaces... I guess :P
sheepluva
parents:
5825
diff
changeset
|
210 |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
211 |
zoomL = 1.3 |
4872 | 212 |
|
5720 | 213 |
xOffset = 40 |
214 |
||
215 |
if i == 0 then |
|
5827
a416f1070fdf
we don't need trailing whitespaces... I guess :P
sheepluva
parents:
5825
diff
changeset
|
216 |
yOffset = 40 |
5720 | 217 |
tCol = 0xffba00ff --0xffed09ff --0xffba00ff |
218 |
tValue = TimeLeft |
|
219 |
elseif i == 1 then |
|
5827
a416f1070fdf
we don't need trailing whitespaces... I guess :P
sheepluva
parents:
5825
diff
changeset
|
220 |
zoomL = 1.1 |
a416f1070fdf
we don't need trailing whitespaces... I guess :P
sheepluva
parents:
5825
diff
changeset
|
221 |
yOffset = 70 |
5720 | 222 |
tCol = wepCol[0] |
223 |
tValue = wepAmmo[0] |
|
224 |
elseif i == 2 then |
|
5827
a416f1070fdf
we don't need trailing whitespaces... I guess :P
sheepluva
parents:
5825
diff
changeset
|
225 |
zoomL = 1.1 |
5720 | 226 |
xOffset = 40 + 35 |
5827
a416f1070fdf
we don't need trailing whitespaces... I guess :P
sheepluva
parents:
5825
diff
changeset
|
227 |
yOffset = 70 |
5720 | 228 |
tCol = wepCol[1] |
229 |
tValue = wepAmmo[1] |
|
230 |
elseif i == 3 then |
|
5827
a416f1070fdf
we don't need trailing whitespaces... I guess :P
sheepluva
parents:
5825
diff
changeset
|
231 |
zoomL = 1.1 |
5720 | 232 |
xOffset = 40 + 70 |
5827
a416f1070fdf
we don't need trailing whitespaces... I guess :P
sheepluva
parents:
5825
diff
changeset
|
233 |
yOffset = 70 |
5720 | 234 |
tCol = wepCol[2] |
235 |
tValue = wepAmmo[2] |
|
236 |
end |
|
237 |
||
238 |
DeleteVisualGear(vTag[i]) |
|
239 |
vTag[i] = AddVisualGear(0, 0, vgtHealthTag, 0, false) |
|
240 |
g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(vTag[i]) |
|
5827
a416f1070fdf
we don't need trailing whitespaces... I guess :P
sheepluva
parents:
5825
diff
changeset
|
241 |
SetVisualGearValues ( |
5720 | 242 |
vTag[i], --id |
243 |
-(ScreenWidth/2) + xOffset, --xoffset |
|
244 |
ScreenHeight - yOffset, --yoffset |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
245 |
0, --dx |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
246 |
0, --dy |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
247 |
zoomL, --zoom |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
248 |
1, --~= 0 means align to screen |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
249 |
g7, --frameticks |
5720 | 250 |
tValue, --value |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
251 |
240000, --timer |
5720 | 252 |
tCol --GetClanColor( GetHogClan(CurrentHedgehog) ) |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
253 |
) |
4872 | 254 |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
255 |
end |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
256 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
257 |
function GetGearDistance(gear) |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
258 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
259 |
g1X, g1Y = GetGearPosition(gear) |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
260 |
g2X, g2Y = GetGearPosition(CurrentHedgehog) |
4872 | 261 |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
262 |
q = g1X - g2X |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
263 |
w = g1Y - g2Y |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
264 |
return( (q*q) + (w*w) ) |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
265 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
266 |
end |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
267 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
268 |
-- add to your ammo ***WHEN YOU PUSH A KEY*** near them |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
269 |
-- yes that was my justification for a non generic method |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
270 |
function CheckProximityToExplosives(gear) |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
271 |
|
5720 | 272 |
if (GetGearDistance(gear) < 1400) then |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
273 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
274 |
if (GetGearType(gear) == gtExplosives) then |
5720 | 275 |
|
276 |
wepAmmo[0] = wepAmmo[0] + 1 |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
277 |
PlaySound(sndShotgunReload) |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
278 |
DeleteGear(gear) |
5720 | 279 |
AddCaption(wep[0] .. " " .. loc("ammo extended!"), wepCol[0], capgrpAmmoinfo ) |
280 |
DrawTag(1) |
|
5827
a416f1070fdf
we don't need trailing whitespaces... I guess :P
sheepluva
parents:
5825
diff
changeset
|
281 |
|
5720 | 282 |
barrelsEaten = barrelsEaten + 1 |
283 |
if barrelsEaten == 5 then |
|
284 |
AddCaption(loc("Achievement Unlocked") .. ": " .. loc("Barrel Eater!"),0xffba00ff,capgrpMessage2) |
|
285 |
end |
|
5827
a416f1070fdf
we don't need trailing whitespaces... I guess :P
sheepluva
parents:
5825
diff
changeset
|
286 |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
287 |
elseif (GetGearType(gear) == gtMine) then |
5720 | 288 |
wepAmmo[1] = wepAmmo[1] + 1 |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
289 |
PlaySound(sndShotgunReload) |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
290 |
DeleteGear(gear) |
5720 | 291 |
AddCaption(wep[1] .. " " .. loc("ammo extended!"), wepCol[1], capgrpAmmoinfo ) |
292 |
DrawTag(2) |
|
5827
a416f1070fdf
we don't need trailing whitespaces... I guess :P
sheepluva
parents:
5825
diff
changeset
|
293 |
|
5720 | 294 |
minesEaten = minesEaten + 1 |
295 |
if minesEaten == 5 then |
|
296 |
AddCaption(loc("Achievement Unlocked") .. ": " .. loc("Mine Eater!"),0xffba00ff,capgrpMessage2) |
|
297 |
end |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
298 |
|
5720 | 299 |
end |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
300 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
301 |
else |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
302 |
--AddCaption("There is nothing here...") |
4872 | 303 |
end |
304 |
||
305 |
end |
|
306 |
||
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
307 |
-- check proximity on crates |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
308 |
function CheckProximity(gear) |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
309 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
310 |
dist = GetGearDistance(gear) |
5720 | 311 |
|
312 |
if (dist < 1600) and (GetGearType(gear) == gtCase) then |
|
313 |
||
314 |
if GetHealth(gear) > 0 then |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
315 |
|
5720 | 316 |
AddCaption(loc("Tumbling Time Extended!"), 0xffba00ff, capgrpMessage2 ) |
5827
a416f1070fdf
we don't need trailing whitespaces... I guess :P
sheepluva
parents:
5825
diff
changeset
|
317 |
|
5720 | 318 |
TimeLeft = TimeLeft + HealthCaseAmount --5 --5s |
319 |
DrawTag(0) |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
320 |
--PlaySound(sndShotgunReload) |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
321 |
else |
5720 | 322 |
wepAmmo[2] = wepAmmo[2] + 800 |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
323 |
PlaySound(sndShotgunReload) |
5720 | 324 |
AddCaption(wep[2] .. " " .. loc("fuel extended!"), wepCol[2], capgrpAmmoinfo ) |
325 |
DrawTag(3) |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
326 |
end |
5720 | 327 |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
328 |
DeleteGear(gear) |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
329 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
330 |
end |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
331 |
|
4872 | 332 |
end |
333 |
||
5720 | 334 |
function ChangeWeapon() |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
335 |
|
5720 | 336 |
wepIndex = wepIndex + 1 |
337 |
if wepIndex == wepCount then |
|
338 |
wepIndex = 0 |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
339 |
end |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
340 |
|
5720 | 341 |
AddCaption(wep[wepIndex] .. " " .. loc("selected!"), wepCol[wepIndex],capgrpAmmoinfo ) |
342 |
AddCaption(wepAmmo[wepIndex] .. " " .. loc("shots remaining."), wepCol[wepIndex],capgrpMessage2) |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
343 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
344 |
end |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
345 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
346 |
--------------- |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
347 |
-- action keys |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
348 |
--------------- |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
349 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
350 |
function onPrecise() |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
351 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
352 |
if (CurrentHedgehog ~= nil) and (stopMovement == false) and (tumbleStarted == true) and (wepAmmo[wepIndex] > 0) then |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
353 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
354 |
wepAmmo[wepIndex] = wepAmmo[wepIndex] - 1 |
5720 | 355 |
AddCaption(wepAmmo[wepIndex] .. " " .. loc("shots remaining."), wepCol[wepIndex],capgrpMessage2) |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
356 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
357 |
if wep[wepIndex] == loc("Barrel Launcher") then |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
358 |
morte = AddGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog), gtExplosives, 0, 0, 0, 1) |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
359 |
CopyPV(CurrentHedgehog, morte) -- new addition |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
360 |
x,y = GetGearVelocity(morte) |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
361 |
x = x*2 |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
362 |
y = y*2 |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
363 |
SetGearVelocity(morte, x, y) |
5720 | 364 |
DrawTag(1) |
365 |
||
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
366 |
elseif wep[wepIndex] == loc("Mine Deployer") then |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
367 |
morte = AddGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog), gtMine, 0, 0, 0, 0) |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
368 |
SetTimer(morte, 1000) |
5720 | 369 |
DrawTag(2) |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
370 |
end |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
371 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
372 |
end |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
373 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
374 |
preciseOn = true |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
375 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
376 |
end |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
377 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
378 |
function onPreciseUp() |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
379 |
preciseOn = false |
4872 | 380 |
end |
381 |
||
382 |
function onHJump() |
|
5720 | 383 |
-- pick up explosives/mines if nearby them |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
384 |
if (CurrentHedgehog ~= nil) and (stopMovement == false) and (tumbleStarted == true) then |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
385 |
runOnGears(CheckProximityToExplosives) |
4872 | 386 |
end |
387 |
end |
|
388 |
||
389 |
function onLJump() |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
390 |
ChangeWeapon() |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
391 |
end |
4872 | 392 |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
393 |
----------------- |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
394 |
-- movement keys |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
395 |
----------------- |
4872 | 396 |
|
397 |
function onLeft() |
|
398 |
if (CurrentHedgehog ~= nil) and (stopMovement == false) then |
|
399 |
leftOn = true |
|
400 |
end |
|
401 |
end |
|
402 |
||
403 |
function onRight() |
|
404 |
if (CurrentHedgehog ~= nil) and (stopMovement == false) then |
|
405 |
rightOn = true |
|
406 |
end |
|
407 |
end |
|
408 |
||
409 |
function onUp() |
|
410 |
if (CurrentHedgehog ~= nil) and (stopMovement == false) then |
|
411 |
upOn = true |
|
412 |
end |
|
413 |
end |
|
414 |
||
415 |
function onDown() |
|
416 |
if (CurrentHedgehog ~= nil) and (stopMovement == false) then |
|
417 |
downOn = true |
|
418 |
end |
|
419 |
end |
|
420 |
||
421 |
function onDownUp() |
|
422 |
downOn = false |
|
423 |
end |
|
424 |
function onUpUp() |
|
425 |
upOn = false |
|
426 |
end |
|
427 |
function onLeftUp() |
|
428 |
leftOn = false |
|
429 |
end |
|
430 |
function onRightUp() |
|
431 |
rightOn = false |
|
432 |
end |
|
433 |
||
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
434 |
-------------------------- |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
435 |
-- other event handlers |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
436 |
-------------------------- |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
437 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
438 |
function onGameInit() |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
439 |
CaseFreq = 0 |
5720 | 440 |
HealthCaseProb = 0 |
441 |
Delay = 1000 |
|
442 |
||
443 |
mineSpawn = MinesNum |
|
444 |
if mineSpawn > 4 then |
|
5827
a416f1070fdf
we don't need trailing whitespaces... I guess :P
sheepluva
parents:
5825
diff
changeset
|
445 |
mineSpawn = 4 |
5720 | 446 |
end |
447 |
||
448 |
barrelSpawn = Explosives |
|
449 |
if barrelSpawn > 4 then |
|
5827
a416f1070fdf
we don't need trailing whitespaces... I guess :P
sheepluva
parents:
5825
diff
changeset
|
450 |
barrelSpawn = 4 |
5720 | 451 |
end |
452 |
||
453 |
--MinesNum = 0 |
|
454 |
--Explosives = 0 |
|
455 |
||
5827
a416f1070fdf
we don't need trailing whitespaces... I guess :P
sheepluva
parents:
5825
diff
changeset
|
456 |
for i = 0, 3 do |
a416f1070fdf
we don't need trailing whitespaces... I guess :P
sheepluva
parents:
5825
diff
changeset
|
457 |
vTag[0] = AddVisualGear(0, 0, vgtHealthTag, 0, false) |
5720 | 458 |
end |
459 |
||
460 |
HideTags() |
|
461 |
||
462 |
wep[0] = loc("Barrel Launcher") |
|
5827
a416f1070fdf
we don't need trailing whitespaces... I guess :P
sheepluva
parents:
5825
diff
changeset
|
463 |
wep[1] = loc("Mine Deployer") |
5720 | 464 |
wep[2] = loc("Flamer") |
465 |
||
466 |
wepCol[0] = 0x78818eff |
|
467 |
wepCol[1] = 0xa12a77ff |
|
468 |
wepCol[2] = 0xf49318ff |
|
5827
a416f1070fdf
we don't need trailing whitespaces... I guess :P
sheepluva
parents:
5825
diff
changeset
|
469 |
|
5720 | 470 |
wepCount = 3 |
471 |
||
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
472 |
end |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
473 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
474 |
function onGameStart() |
5720 | 475 |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
476 |
ShowMission ( |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
477 |
"TUMBLER", |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
478 |
loc("a Hedgewars mini-game"), |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
479 |
loc("Eliminate the enemy hogs to win.") .. "|" .. |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
480 |
" " .. "|" .. |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
481 |
|
5720 | 482 |
loc("New Mines Per Turn") .. ": " .. (mineSpawn) .. "|" .. |
483 |
loc("New Barrels Per Turn") .. ": " .. (barrelSpawn) .. "|" .. |
|
484 |
loc("Time Extension") .. ": " .. (HealthCaseAmount) .. loc("sec") .. "|" .. |
|
485 |
" " .. "|" .. |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
486 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
487 |
loc("Movement: [Up], [Down], [Left], [Right]") .. "|" .. |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
488 |
loc("Fire") .. ": " .. loc("[Left Shift]") .. "|" .. |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
489 |
loc("Change Weapon") .. ": " .. loc("[Enter]") .. "|" .. |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
490 |
loc("Grab Mines/Explosives") .. ": " .. loc("[Backspace]") .. "|" .. |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
491 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
492 |
" " .. "|" .. |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
493 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
494 |
loc("Health crates extend your time.") .. "|" .. |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
495 |
loc("Ammo is reset at the end of your turn.") .. "|" .. |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
496 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
497 |
"", 4, 4000 |
5720 | 498 |
) |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
499 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
500 |
end |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
501 |
|
5825
a6eab1b7c00d
Scripting: Update screen dimensions on screen resize and introduce onScreenResize() event.
sheepluva
parents:
5720
diff
changeset
|
502 |
function onScreenResize() |
a6eab1b7c00d
Scripting: Update screen dimensions on screen resize and introduce onScreenResize() event.
sheepluva
parents:
5720
diff
changeset
|
503 |
|
a6eab1b7c00d
Scripting: Update screen dimensions on screen resize and introduce onScreenResize() event.
sheepluva
parents:
5720
diff
changeset
|
504 |
-- redraw Tags so that their screen locations are updated |
a6eab1b7c00d
Scripting: Update screen dimensions on screen resize and introduce onScreenResize() event.
sheepluva
parents:
5720
diff
changeset
|
505 |
if (CurrentHedgehog ~= nil) and (tumbleStarted == true) then |
a6eab1b7c00d
Scripting: Update screen dimensions on screen resize and introduce onScreenResize() event.
sheepluva
parents:
5720
diff
changeset
|
506 |
for i = 0, 3 do |
a6eab1b7c00d
Scripting: Update screen dimensions on screen resize and introduce onScreenResize() event.
sheepluva
parents:
5720
diff
changeset
|
507 |
DrawTag(i) |
a6eab1b7c00d
Scripting: Update screen dimensions on screen resize and introduce onScreenResize() event.
sheepluva
parents:
5720
diff
changeset
|
508 |
end |
a6eab1b7c00d
Scripting: Update screen dimensions on screen resize and introduce onScreenResize() event.
sheepluva
parents:
5720
diff
changeset
|
509 |
end |
a6eab1b7c00d
Scripting: Update screen dimensions on screen resize and introduce onScreenResize() event.
sheepluva
parents:
5720
diff
changeset
|
510 |
|
a6eab1b7c00d
Scripting: Update screen dimensions on screen resize and introduce onScreenResize() event.
sheepluva
parents:
5720
diff
changeset
|
511 |
end |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
512 |
|
4872 | 513 |
function onNewTurn() |
5720 | 514 |
|
4872 | 515 |
stopMovement = false |
516 |
tumbleStarted = false |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
517 |
|
5720 | 518 |
-- randomly create new barrels mines on the map every turn (can be disabled by setting mine/barrels to 0 in scheme) |
519 |
for i = 0, barrelSpawn-1 do |
|
520 |
gear = AddGear(100, 100, gtExplosives, 0, 0, 0, 0) |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
521 |
SetHealth(gear, 100) |
5720 | 522 |
if FindPlace(gear, false, 0, LAND_WIDTH, false) ~= nil then |
523 |
tempE = AddVisualGear(GetX(gear), GetY(gear), vgtBigExplosion, 0, false) |
|
524 |
end |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
525 |
end |
5720 | 526 |
for i = 0, mineSpawn-1 do |
527 |
gear = AddGear(100, 100, gtMine, 0, 0, 0, 0) |
|
528 |
if FindPlace(gear, false, 0, LAND_WIDTH, false) ~= nil then |
|
529 |
tempE = AddVisualGear(GetX(gear), GetY(gear), vgtBigExplosion, 0, false) |
|
530 |
end |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
531 |
end |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
532 |
|
5720 | 533 |
-- randomly spawn time extension crates / flamer fuel on the map |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
534 |
r = GetRandom(100) |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
535 |
if r > 50 then |
5720 | 536 |
gear = SpawnHealthCrate(0, 0) |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
537 |
end |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
538 |
r = GetRandom(100) |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
539 |
if r > 70 then |
5720 | 540 |
gear = SpawnAmmoCrate(0, 0, amSkip) |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
541 |
end |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
542 |
|
5720 | 543 |
HideTags() |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
544 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
545 |
--reset ammo counts |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
546 |
wepAmmo[0] = 2 |
5827
a416f1070fdf
we don't need trailing whitespaces... I guess :P
sheepluva
parents:
5825
diff
changeset
|
547 |
wepAmmo[1] = 1 |
5720 | 548 |
wepAmmo[2] = 50 -- 50000 -- 50 |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
549 |
wepIndex = 2 |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
550 |
ChangeWeapon() |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
551 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
552 |
roundKills = 0 |
5720 | 553 |
barrelsEaten = 0 |
554 |
minesEaten = 0 |
|
555 |
||
556 |
FollowGear(CurrentHedgehog) |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
557 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
558 |
end |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
559 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
560 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
561 |
function DisableTumbler() |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
562 |
stopMovement = true |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
563 |
upOn = false |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
564 |
down = false |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
565 |
leftOn = false |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
566 |
rightOn = false |
5720 | 567 |
HideTags() |
4872 | 568 |
end |
569 |
||
570 |
function onGameTick() |
|
571 |
||
572 |
-- start the player tumbling with a boom once their turn has actually begun |
|
573 |
if tumbleStarted == false then |
|
574 |
if (TurnTimeLeft > 0) and (TurnTimeLeft ~= TurnTime) then |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
575 |
--AddCaption(loc("Good to go!")) |
4872 | 576 |
tumbleStarted = true |
5720 | 577 |
TimeLeft = (TurnTime/1000) |
4872 | 578 |
AddGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog), gtGrenade, 0, 0, 0, 1) |
5720 | 579 |
SetHealth(CurrentHedgehog, GetHealth(CurrentHedgehog) + 47) -- new |
580 |
for i = 0, 3 do |
|
581 |
DrawTag(i) |
|
5827
a416f1070fdf
we don't need trailing whitespaces... I guess :P
sheepluva
parents:
5825
diff
changeset
|
582 |
end |
4872 | 583 |
end |
584 |
end |
|
585 |
||
586 |
if (CurrentHedgehog ~= nil) and (tumbleStarted == true) then |
|
587 |
||
5720 | 588 |
runOnGears(CheckProximity) -- crates |
4872 | 589 |
|
590 |
-- Calculate and display turn time |
|
591 |
TimeLeftCounter = TimeLeftCounter + 1 |
|
592 |
if TimeLeftCounter == 1000 then |
|
593 |
TimeLeftCounter = 0 |
|
594 |
TimeLeft = TimeLeft - 1 |
|
595 |
||
596 |
if TimeLeft >= 0 then |
|
5720 | 597 |
DrawTag(0) |
4872 | 598 |
end |
599 |
||
600 |
end |
|
601 |
||
602 |
if TimeLeft == 0 then |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
603 |
DisableTumbler() |
4872 | 604 |
end |
605 |
||
606 |
-- handle movement based on IO |
|
607 |
moveTimer = moveTimer + 1 |
|
608 |
if moveTimer == 100 then -- 100 |
|
609 |
moveTimer = 0 |
|
610 |
||
5720 | 611 |
runOnflames(HandleLife) |
612 |
||
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
613 |
--------------- |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
614 |
-- new trail code |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
615 |
--------------- |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
616 |
-- the trail lets you know you have 5s left to pilot, akin to birdy feathers |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
617 |
if (TimeLeft <= 5) and (TimeLeft > 0) then |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
618 |
tempE = AddVisualGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog), vgtSmoke, 0, false) |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
619 |
g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(tempE) |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
620 |
SetVisualGearValues(tempE, g1, g2, g3, g4, g5, g6, g7, g8, g9, GetClanColor(GetHogClan(CurrentHedgehog)) ) |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
621 |
end |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
622 |
-------------- |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
623 |
|
4872 | 624 |
dx, dy = GetGearVelocity(CurrentHedgehog) |
625 |
||
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
626 |
dxlimit = 0.4*fMod |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
627 |
dylimit = 0.4*fMod |
4872 | 628 |
|
629 |
if dx > dxlimit then |
|
630 |
dx = dxlimit |
|
631 |
end |
|
632 |
if dy > dylimit then |
|
633 |
dy = dylimit |
|
634 |
end |
|
635 |
if dx < -dxlimit then |
|
636 |
dx = -dxlimit |
|
637 |
end |
|
638 |
if dy < -dylimit then |
|
639 |
dy = -dylimit |
|
640 |
end |
|
641 |
||
642 |
||
643 |
if leftOn == true then |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
644 |
dx = dx - 0.1*fMod |
4872 | 645 |
end |
646 |
if rightOn == true then |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
647 |
dx = dx + 0.1*fMod |
4872 | 648 |
end |
649 |
||
650 |
if upOn == true then |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
651 |
dy = dy - 0.1*fMod |
4872 | 652 |
end |
653 |
if downOn == true then |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
654 |
dy = dy + 0.1*fMod |
4872 | 655 |
end |
656 |
||
657 |
SetGearVelocity(CurrentHedgehog, dx, dy) |
|
658 |
||
659 |
end |
|
660 |
||
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
661 |
-- |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
662 |
--flamer |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
663 |
-- |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
664 |
fireTimer = fireTimer + 1 |
5720 | 665 |
if fireTimer == 6 then -- 5 --10 |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
666 |
fireTimer = 0 |
4872 | 667 |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
668 |
if (wep[wepIndex] == loc("Flamer") ) and (preciseOn == true) and (wepAmmo[wepIndex] > 0) and (stopMovement == false) and (tumbleStarted == true) then |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
669 |
|
5720 | 670 |
wepAmmo[wepIndex] = wepAmmo[wepIndex] - 1 |
671 |
AddCaption( |
|
672 |
loc("Flamer") .. ": " .. |
|
673 |
(wepAmmo[wepIndex]/800*100) - (wepAmmo[wepIndex]/800*100)%2 .. "%", |
|
674 |
wepCol[2], |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
675 |
capgrpMessage2 |
5720 | 676 |
) |
677 |
DrawTag(3) |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
678 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
679 |
dx, dy = GetGearVelocity(CurrentHedgehog) |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
680 |
shell = AddGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog), gtFlame, 0, 0, 0, 0) |
4872 | 681 |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
682 |
xdev = 1 + GetRandom(25) --15 |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
683 |
xdev = xdev / 100 |
4872 | 684 |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
685 |
r = GetRandom(2) |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
686 |
if r == 1 then |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
687 |
xdev = xdev*-1 |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
688 |
end |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
689 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
690 |
ydev = 1 + GetRandom(25) --15 |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
691 |
ydev = ydev / 100 |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
692 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
693 |
r = GetRandom(2) |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
694 |
if r == 1 then |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
695 |
ydev = ydev*-1 |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
696 |
end |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
697 |
|
5720 | 698 |
--*13 --8 *-4 |
699 |
SetGearVelocity(shell, (dx*4.5)+(xdev*fMod), (dy*4.5)+(ydev*fMod)) --10 |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
700 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
701 |
end |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
702 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
703 |
end |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
704 |
-- |
4872 | 705 |
|
706 |
end |
|
707 |
||
708 |
||
709 |
end |
|
710 |
||
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
711 |
function isATrackedGear(gear) |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
712 |
if (GetGearType(gear) == gtExplosives) or |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
713 |
(GetGearType(gear) == gtMine) or |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
714 |
(GetGearType(gear) == gtCase) |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
715 |
then |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
716 |
return(true) |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
717 |
else |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
718 |
return(false) |
4872 | 719 |
end |
720 |
end |
|
721 |
||
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
722 |
--[[function onGearDamage(gear, damage) |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
723 |
if gear == CurrentHedgehog then |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
724 |
-- You are now tumbling |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
725 |
end |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
726 |
end]] |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
727 |
|
4872 | 728 |
function onGearAdd(gear) |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
729 |
|
5720 | 730 |
if GetGearType(gear) == gtFlame then |
731 |
||
732 |
trackFGear(gear) |
|
733 |
||
734 |
fGears = fGears +1 |
|
735 |
||
736 |
if fGears < 80 then |
|
737 |
setFGearValue(gear,"L",30) |
|
738 |
else |
|
739 |
setFGearValue(gear,"L",5) --3 |
|
740 |
end |
|
741 |
||
742 |
elseif isATrackedGear(gear) then |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
743 |
trackGear(gear) |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
744 |
end |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
745 |
|
4872 | 746 |
end |
747 |
||
748 |
function onGearDelete(gear) |
|
749 |
||
5720 | 750 |
if GetGearType(gear) == gtFlame then |
751 |
trackFGearDeletion(gear) |
|
752 |
fGears = fGears -1 |
|
753 |
||
754 |
elseif isATrackedGear(gear) then |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
755 |
trackDeletion(gear) |
5720 | 756 |
|
757 |
-- achievements? prototype |
|
758 |
elseif GetGearType(gear) == gtHedgehog then |
|
759 |
||
760 |
if GetHogTeamName(gear) ~= GetHogTeamName(CurrentHedgehog) then |
|
761 |
||
762 |
roundKills = roundKills + 1 |
|
763 |
if roundKills == 2 then |
|
764 |
AddCaption(loc("Double Kill!"),0xffba00ff,capgrpMessage2) |
|
765 |
elseif roundKills == 3 then |
|
766 |
AddCaption(loc("Killing spree!"),0xffba00ff,capgrpMessage2) |
|
767 |
elseif roundKills >= 4 then |
|
768 |
AddCaption(loc("Unstoppable!"),0xffba00ff,capgrpMessage2) |
|
769 |
end |
|
770 |
||
771 |
elseif gear == CurrentHedgehog then |
|
772 |
DisableTumbler() |
|
773 |
||
774 |
elseif gear ~= CurrentHedgehog then |
|
775 |
AddCaption(loc("Friendly Fire!"),0xffba00ff,capgrpMessage2) |
|
776 |
end |
|
777 |
||
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
778 |
end |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
779 |
|
4872 | 780 |
if CurrentHedgehog ~= nil then |
781 |
FollowGear(CurrentHedgehog) |
|
782 |
end |
|
783 |
||
5720 | 784 |
end |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
785 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
786 |