author | sheepluva |
Tue, 15 May 2018 17:05:40 +0200 | |
branch | ui-scaling |
changeset 13386 | 72bbccf9a715 |
parent 12344 | 877f55c77a3f |
child 13581 | 9c8749bb0d06 |
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 |
12051
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
3 |
-- v.0.8.0 |
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 |
|
12051
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
6 |
--[[ |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
7 |
SCRIPT PARAMETER |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
8 |
The script is configured with the script parameter. |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
9 |
|
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
10 |
Additional configuration in the game scheme is permitted. |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
11 |
|
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
12 |
The script parameter is a comma-separated list of key=value pairs. |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
13 |
|
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
14 |
The values are always whole numbers, the keys are listed below. |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
15 |
|
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
16 |
Key Default Description |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
17 |
---------------------------------------------------------------------- |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
18 |
spawnbarrels 2 Number of barrels that spawn per turn |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
19 |
spawnmines 4 Number of mines that spawn per turn |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
20 |
ammoflamer 50 Initial fuel/ammo of Flamer |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
21 |
ammobarrel 2 Initial ammo of Barrel Launcher |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
22 |
ammomine 1 Initial ammo of Mine Deployer |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
23 |
minetimerplaced 1000 Mine timer of mines dropped from Mine Deployer (!) in milliseconds |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
24 |
bonustime 25 Bonus time in utility crates, in seconds |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
25 |
bonusflames 800 Flamer fuel bonus in ammo crates |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
26 |
chanceammo 30 Chance (in %) that an ammo crate will drop before a turn |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
27 |
chancetime 50 Chance (in %) that an utility crate (extra time) will drop before a turn |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
28 |
|
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
29 |
|
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
30 |
EXAMPLES: |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
31 |
|
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
32 |
ammoflamer=800, ammomine=5 |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
33 |
--> Starts the game with 800 Flamer fuel and 5 Mine Deployer mines. |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
34 |
|
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
35 |
chancetime=0 |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
36 |
--> No clock crates. |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
37 |
|
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
38 |
|
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
39 |
GAME SCHEME CONFIGURATION |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
40 |
The script recognizes most game modifiers and settings, but changing the following game modifiers |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
41 |
will have no effect: |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
42 |
- Artillery |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
43 |
- Tag Team |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
44 |
- Shared ammo |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
45 |
- Per-hog ammo |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
46 |
- Place hogs |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
47 |
- Invulnerable |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
48 |
- Reset weapons |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
49 |
]] |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
50 |
|
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
51 |
|
8043 | 52 |
HedgewarsScriptLoad("/Scripts/Locale.lua") |
53 |
HedgewarsScriptLoad("/Scripts/Tracker.lua") |
|
12051
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
54 |
HedgewarsScriptLoad("/Scripts/Params.lua") |
4872 | 55 |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
56 |
local fMod = 1000000 -- use this for dev and .16+ games |
5720 | 57 |
|
4872 | 58 |
local leftOn = false |
59 |
local rightOn = false |
|
60 |
local upOn = false |
|
61 |
local downOn = false |
|
5720 | 62 |
local preciseOn = false |
4872 | 63 |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
64 |
local wep = {} |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
65 |
local wepAmmo = {} |
5720 | 66 |
local wepCol = {} |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
67 |
local wepIndex = 0 |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
68 |
local wepCount = 0 |
5720 | 69 |
local fGears = 0 |
70 |
||
71 |
local mineSpawn |
|
72 |
local barrelSpawn |
|
73 |
||
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
74 |
local roundKills = 0 |
5720 | 75 |
local barrelsEaten = 0 |
76 |
local minesEaten = 0 |
|
4872 | 77 |
|
5720 | 78 |
local moveTimer = 0 |
79 |
local fireTimer = 0 |
|
4872 | 80 |
local TimeLeftCounter = 0 |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
81 |
local TimeLeft = 0 |
4872 | 82 |
local stopMovement = false |
83 |
local tumbleStarted = false |
|
84 |
||
5720 | 85 |
local vTag = {} |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
86 |
|
12051
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
87 |
local barrelSpawn = 2 |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
88 |
local mineSpawn = 4 |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
89 |
local initAmmoFlamer = 50 |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
90 |
local initAmmoBarrel = 2 |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
91 |
local initAmmoMine = 1 |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
92 |
local placedMineTime = 1000 |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
93 |
local bonusTime = 25 |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
94 |
local bonusFlames = 800 |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
95 |
local chanceAmmo = 30 |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
96 |
local chanceTime = 50 |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
97 |
|
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
98 |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
99 |
------------------------ |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
100 |
-- version 0.4 |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
101 |
------------------------ |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
102 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
103 |
-- removed some old code/comments |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
104 |
-- 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
|
105 |
-- 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
|
106 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
107 |
-- 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
|
108 |
-- 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
|
109 |
-- added support for primary fire being onAttackUp |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
110 |
-- 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
|
111 |
-- 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
|
112 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
113 |
------------------------ |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
114 |
-- version 0.5 |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
115 |
------------------------ |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
116 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
117 |
-- changed some of the user feedback |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
118 |
-- i can't remember?? |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
119 |
-- substituted onAttackUp for onPrecise() |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
120 |
-- brought in line with new velocity changes |
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 |
------------------------ |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
123 |
-- version 0.6 |
4872 | 124 |
------------------------ |
125 |
||
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
126 |
-- reduced starting "ammo" |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
127 |
-- 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
|
128 |
-- updated user feedback |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
129 |
-- better locs and coloured addcaptions |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
130 |
-- added tag for turntime |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
131 |
-- removed tractor beam |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
132 |
-- 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
|
133 |
-- 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
|
134 |
-- 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
|
135 |
-- 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
|
136 |
-- modified crate frequencies a bit |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
137 |
-- added some simple kill-based achievements, i think |
4872 | 138 |
|
5720 | 139 |
------------------------ |
140 |
-- version 0.7 |
|
141 |
------------------------ |
|
142 |
||
143 |
-- a few code optimisations/performance tweaks |
|
144 |
-- removed some deprecated code |
|
145 |
-- fix a potential spawn bug |
|
146 |
||
147 |
-- improved HUD (now shows ammo counts) |
|
148 |
-- improved user feedback (less generic messages) |
|
149 |
-- colour-coded addcaptions to match hud :) |
|
150 |
||
151 |
-- base tumbling time now equals scheme turntime |
|
152 |
-- tumbling time extension is now based on the amount of health contained in crate |
|
153 |
-- new mines per turn based on minesnum |
|
154 |
-- new barrels per turn based on explosives |
|
155 |
||
156 |
-- added 2 more achievements: barrel eater and mine eater (like kills, don't do anything atm) |
|
157 |
-- slightly increased grab distance for explosives/mines |
|
158 |
-- slightly increased flamer velocity |
|
159 |
-- slightly decreased flamer volume |
|
160 |
-- added a flame vaporiser (based on number of flame gears?) |
|
161 |
-- give tumblers an extra 47 health on the start of their tumble to counter the grenade (exp) |
|
162 |
-- refocus camera on tumbler on newturn (not on crates, barrels etc) |
|
163 |
-- increase delay: yes, yes, eat your hearts out |
|
164 |
||
165 |
-- commit log |
|
166 |
-- Better HUD |
|
167 |
-- Allow more user customization |
|
168 |
-- Bugfix for new gear spawns |
|
169 |
-- Performance tweaks |
|
170 |
-- Variety of small gameplay changes |
|
171 |
||
5825
a6eab1b7c00d
Scripting: Update screen dimensions on screen resize and introduce onScreenResize() event.
sheepluva
parents:
5720
diff
changeset
|
172 |
------------------------ |
a6eab1b7c00d
Scripting: Update screen dimensions on screen resize and introduce onScreenResize() event.
sheepluva
parents:
5720
diff
changeset
|
173 |
-- version 0.7.1 |
a6eab1b7c00d
Scripting: Update screen dimensions on screen resize and introduce onScreenResize() event.
sheepluva
parents:
5720
diff
changeset
|
174 |
------------------------ |
a6eab1b7c00d
Scripting: Update screen dimensions on screen resize and introduce onScreenResize() event.
sheepluva
parents:
5720
diff
changeset
|
175 |
|
a6eab1b7c00d
Scripting: Update screen dimensions on screen resize and introduce onScreenResize() event.
sheepluva
parents:
5720
diff
changeset
|
176 |
-- redraw HUD on screen resolution change |
a6eab1b7c00d
Scripting: Update screen dimensions on screen resize and introduce onScreenResize() event.
sheepluva
parents:
5720
diff
changeset
|
177 |
|
12051
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
178 |
------------------------ |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
179 |
-- version 0.8.0 |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
180 |
------------------------ |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
181 |
-- Allow detailed configuration with script parameter (see above) |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
182 |
-- Alternative weapon selection with slot keys |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
183 |
--- Slot 1: Barrel Launcher |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
184 |
--- Slot 2: Mine Deployer |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
185 |
--- Slot 3: Flamer |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
186 |
-- Add mine/barrel launch sounds |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
187 |
-- Improved ammo display |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
188 |
-- Denied sound + message when trying to fire empty ammo weapon |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
189 |
-- Slightly better mission description |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
190 |
--- The old hacks by (ab)using MinesNum, Explosives and HealthCaseAmount have been removed |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
191 |
-- Permanently disable some gameflags which currently won't work together with this script (see above) |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
192 |
-- Show flamer ammo as fuel everywhere (no more percentage confusion) |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
193 |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
194 |
--------------------------- |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
195 |
-- some other ideas/things |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
196 |
--------------------------- |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
197 |
--[[ |
12051
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
198 |
-- allow invulnerability mode (currently broken, thus disabled) |
5720 | 199 |
-- better barrel/minespawn effects |
200 |
-- separate grab distance for mines/barrels |
|
12051
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
201 |
-- bug: message color for remaining ammo does not change if two times the same message |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
202 |
(but in different desired color) is shown in quick succession (i.e. "Out of ammo!" for all weapons) |
5720 | 203 |
-- [probably not] make barrels always explode? |
204 |
-- [probably not] persistent ammo? |
|
205 |
-- [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
|
206 |
]] |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
207 |
|
5720 | 208 |
|
209 |
---------------------------------------------------------------- |
|
210 |
---------------------------------------------------------------- |
|
211 |
||
212 |
local flames = {} |
|
213 |
local fGearValues = {} |
|
214 |
||
215 |
function runOnflames(func) |
|
216 |
for k, gear in ipairs(flames) do |
|
217 |
func(gear) |
|
218 |
end |
|
219 |
end |
|
220 |
||
221 |
function trackFGear(gear) |
|
222 |
table.insert(flames, gear) |
|
223 |
end |
|
224 |
||
225 |
function trackFGearDeletion(gear) |
|
226 |
fGearValues[gear] = nil |
|
227 |
for k, g in ipairs(flames) do |
|
228 |
if g == gear then |
|
229 |
table.remove(flames, k) |
|
230 |
break |
|
231 |
end |
|
232 |
end |
|
233 |
end |
|
234 |
||
235 |
function getFGearValue(gear, key) |
|
236 |
if fGearValues[gear] ~= nil then |
|
237 |
return fGearValues[gear][key] |
|
238 |
end |
|
239 |
return nil |
|
240 |
end |
|
241 |
||
242 |
function setFGearValue(gear, key, value) |
|
243 |
found = false |
|
244 |
for id, values in pairs(fGearValues) do |
|
245 |
if id == gear then |
|
246 |
values[key] = value |
|
247 |
found = true |
|
248 |
end |
|
249 |
end |
|
250 |
if not found then |
|
251 |
fGearValues[gear] = { [key] = value } |
|
252 |
end |
|
253 |
end |
|
254 |
||
255 |
function decreaseFGearValue(gear, key) |
|
256 |
for id, values in pairs(fGearValues) do |
|
257 |
if id == gear then |
|
258 |
values[key] = values[key] - 1 |
|
259 |
end |
|
260 |
end |
|
261 |
end |
|
262 |
||
263 |
function HandleLife(gear) |
|
264 |
||
265 |
decreaseFGearValue(gear, "L") |
|
266 |
if getFGearValue(gear, "L") == 0 then |
|
267 |
AddVisualGear(GetX(gear), GetY(gear), vgtSmoke, 0, false) |
|
268 |
DeleteGear(gear) |
|
269 |
end |
|
270 |
||
271 |
end |
|
272 |
||
273 |
---------------------------------------------------------------- |
|
274 |
---------------------------------------------------------------- |
|
275 |
||
276 |
function HideTags() |
|
277 |
||
5827
a416f1070fdf
we don't need trailing whitespaces... I guess :P
sheepluva
parents:
5825
diff
changeset
|
278 |
for i = 0, 3 do |
5720 | 279 |
SetVisualGearValues(vTag[i],0,0,0,0,0,1,0, 0, 240000, 0xffffff00) |
280 |
end |
|
281 |
||
282 |
end |
|
283 |
||
284 |
function DrawTag(i) |
|
5827
a416f1070fdf
we don't need trailing whitespaces... I guess :P
sheepluva
parents:
5825
diff
changeset
|
285 |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
286 |
zoomL = 1.3 |
4872 | 287 |
|
5720 | 288 |
xOffset = 40 |
289 |
||
290 |
if i == 0 then |
|
5827
a416f1070fdf
we don't need trailing whitespaces... I guess :P
sheepluva
parents:
5825
diff
changeset
|
291 |
yOffset = 40 |
12062
3d03e9294633
Use yellow clock color in Space Invasion and Tumbler
Wuzzy <almikes@aol.com>
parents:
12053
diff
changeset
|
292 |
tCol = 0xffee00ff |
5720 | 293 |
tValue = TimeLeft |
294 |
elseif i == 1 then |
|
5827
a416f1070fdf
we don't need trailing whitespaces... I guess :P
sheepluva
parents:
5825
diff
changeset
|
295 |
zoomL = 1.1 |
a416f1070fdf
we don't need trailing whitespaces... I guess :P
sheepluva
parents:
5825
diff
changeset
|
296 |
yOffset = 70 |
5720 | 297 |
tCol = wepCol[0] |
298 |
tValue = wepAmmo[0] |
|
299 |
elseif i == 2 then |
|
5827
a416f1070fdf
we don't need trailing whitespaces... I guess :P
sheepluva
parents:
5825
diff
changeset
|
300 |
zoomL = 1.1 |
5720 | 301 |
xOffset = 40 + 35 |
5827
a416f1070fdf
we don't need trailing whitespaces... I guess :P
sheepluva
parents:
5825
diff
changeset
|
302 |
yOffset = 70 |
5720 | 303 |
tCol = wepCol[1] |
304 |
tValue = wepAmmo[1] |
|
305 |
elseif i == 3 then |
|
5827
a416f1070fdf
we don't need trailing whitespaces... I guess :P
sheepluva
parents:
5825
diff
changeset
|
306 |
zoomL = 1.1 |
5720 | 307 |
xOffset = 40 + 70 |
5827
a416f1070fdf
we don't need trailing whitespaces... I guess :P
sheepluva
parents:
5825
diff
changeset
|
308 |
yOffset = 70 |
5720 | 309 |
tCol = wepCol[2] |
310 |
tValue = wepAmmo[2] |
|
311 |
end |
|
312 |
||
313 |
DeleteVisualGear(vTag[i]) |
|
314 |
vTag[i] = AddVisualGear(0, 0, vgtHealthTag, 0, false) |
|
315 |
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
|
316 |
SetVisualGearValues ( |
5720 | 317 |
vTag[i], --id |
318 |
-(ScreenWidth/2) + xOffset, --xoffset |
|
319 |
ScreenHeight - yOffset, --yoffset |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
320 |
0, --dx |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
321 |
0, --dy |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
322 |
zoomL, --zoom |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
323 |
1, --~= 0 means align to screen |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
324 |
g7, --frameticks |
5720 | 325 |
tValue, --value |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
326 |
240000, --timer |
5720 | 327 |
tCol --GetClanColor( GetHogClan(CurrentHedgehog) ) |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
328 |
) |
4872 | 329 |
|
5598
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 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
332 |
function GetGearDistance(gear) |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
333 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
334 |
g1X, g1Y = GetGearPosition(gear) |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
335 |
g2X, g2Y = GetGearPosition(CurrentHedgehog) |
4872 | 336 |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
337 |
q = g1X - g2X |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
338 |
w = g1Y - g2Y |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
339 |
return( (q*q) + (w*w) ) |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
340 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
341 |
end |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
342 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
343 |
-- 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
|
344 |
-- 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
|
345 |
function CheckProximityToExplosives(gear) |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
346 |
|
5720 | 347 |
if (GetGearDistance(gear) < 1400) then |
5598
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 |
if (GetGearType(gear) == gtExplosives) then |
5720 | 350 |
|
351 |
wepAmmo[0] = wepAmmo[0] + 1 |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
352 |
PlaySound(sndShotgunReload) |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
353 |
DeleteGear(gear) |
12051
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
354 |
AddCaption(loc("+1 barrel!"), wepCol[0], capgrpAmmoinfo ) |
5720 | 355 |
DrawTag(1) |
5827
a416f1070fdf
we don't need trailing whitespaces... I guess :P
sheepluva
parents:
5825
diff
changeset
|
356 |
|
5720 | 357 |
barrelsEaten = barrelsEaten + 1 |
358 |
if barrelsEaten == 5 then |
|
12344
877f55c77a3f
Standardize the secret achievements strings in Lua scripts
Wuzzy <almikes@aol.com>
parents:
12064
diff
changeset
|
359 |
AddCaption(string.format(loc("Achievement gotten: %s"), loc("Barrel Eater")),0xffba00ff,capgrpMessage2) |
5720 | 360 |
end |
5827
a416f1070fdf
we don't need trailing whitespaces... I guess :P
sheepluva
parents:
5825
diff
changeset
|
361 |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
362 |
elseif (GetGearType(gear) == gtMine) then |
5720 | 363 |
wepAmmo[1] = wepAmmo[1] + 1 |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
364 |
PlaySound(sndShotgunReload) |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
365 |
DeleteGear(gear) |
12051
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
366 |
AddCaption(loc("+1 mine!"), wepCol[1], capgrpAmmoinfo ) |
5720 | 367 |
DrawTag(2) |
5827
a416f1070fdf
we don't need trailing whitespaces... I guess :P
sheepluva
parents:
5825
diff
changeset
|
368 |
|
5720 | 369 |
minesEaten = minesEaten + 1 |
370 |
if minesEaten == 5 then |
|
12344
877f55c77a3f
Standardize the secret achievements strings in Lua scripts
Wuzzy <almikes@aol.com>
parents:
12064
diff
changeset
|
371 |
AddCaption(string.format(loc("Achievement gotten: %s"), loc("Mine Eater")),0xffba00ff,capgrpMessage2) |
5720 | 372 |
end |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
373 |
|
5720 | 374 |
end |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
375 |
|
4872 | 376 |
end |
377 |
||
378 |
end |
|
379 |
||
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
380 |
-- check proximity on crates |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
381 |
function CheckProximity(gear) |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
382 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
383 |
dist = GetGearDistance(gear) |
5720 | 384 |
|
385 |
if (dist < 1600) and (GetGearType(gear) == gtCase) then |
|
386 |
||
12051
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
387 |
if band(GetGearPos(gear), 0x4) ~= 0 then |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
388 |
|
12062
3d03e9294633
Use yellow clock color in Space Invasion and Tumbler
Wuzzy <almikes@aol.com>
parents:
12053
diff
changeset
|
389 |
AddCaption(string.format(loc("+%d seconds!"), bonusTime), 0xffee00ff, capgrpMessage2 ) |
5827
a416f1070fdf
we don't need trailing whitespaces... I guess :P
sheepluva
parents:
5825
diff
changeset
|
390 |
|
12051
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
391 |
TimeLeft = TimeLeft + bonusTime |
5720 | 392 |
DrawTag(0) |
12051
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
393 |
PlaySound(sndExtraTime) |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
394 |
elseif band(GetGearPos(gear), 0x1) ~= 0 then |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
395 |
wepAmmo[2] = wepAmmo[2] + bonusFlames |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
396 |
PlaySound(sndShotgunReload) |
12051
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
397 |
AddCaption(string.format(loc("+%d flamer fuel!"), bonusFlames), wepCol[2], capgrpAmmoinfo ) |
5720 | 398 |
DrawTag(3) |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
399 |
end |
5720 | 400 |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
401 |
DeleteGear(gear) |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
402 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
403 |
end |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
404 |
|
4872 | 405 |
end |
406 |
||
12051
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
407 |
function shotsRemainingMessage() |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
408 |
local shotsMsg |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
409 |
if wepAmmo[wepIndex] <= 0 then |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
410 |
shotsMsg = loc("Out of ammo!") |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
411 |
else |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
412 |
if wepIndex == 2 then |
12052
144264948277
Change ammo display texts in Tumbler to avoid pluralization failures
Wuzzy <almikes@aol.com>
parents:
12051
diff
changeset
|
413 |
shotsMsg = loc("Fuel: %d") |
12051
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
414 |
else |
12052
144264948277
Change ammo display texts in Tumbler to avoid pluralization failures
Wuzzy <almikes@aol.com>
parents:
12051
diff
changeset
|
415 |
shotsMsg = loc("Ammo: %d") |
12051
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
416 |
end |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
417 |
end |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
418 |
AddCaption(string.format(shotsMsg, wepAmmo[wepIndex]), wepCol[wepIndex],capgrpMessage2) |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
419 |
end |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
420 |
|
12051
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
421 |
function ChangeWeapon(newIndex) |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
422 |
if newIndex == nil then |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
423 |
wepIndex = wepIndex + 1 |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
424 |
if wepIndex == wepCount then |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
425 |
wepIndex = 0 |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
426 |
end |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
427 |
else |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
428 |
wepIndex = newIndex |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
429 |
end |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
430 |
|
12051
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
431 |
local selText |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
432 |
if wepIndex == 0 then |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
433 |
selText = loc("Barrel Launcher selected!") |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
434 |
elseif wepIndex == 1 then |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
435 |
selText = loc("Mine Deployer selected!") |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
436 |
else |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
437 |
selText = loc("Flamer selected!") |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
438 |
end |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
439 |
AddCaption(selText, wepCol[wepIndex],capgrpAmmoinfo ) |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
440 |
|
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
441 |
shotsRemainingMessage() |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
442 |
end |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
443 |
|
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
444 |
--------------- |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
445 |
-- Parse parameters |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
446 |
--------------- |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
447 |
|
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
448 |
function parseNum(key, default, min, max) |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
449 |
local num = tonumber(params[key]) |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
450 |
if type(num) ~= "number" then |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
451 |
if default ~= nil then |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
452 |
return default |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
453 |
else |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
454 |
return nil |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
455 |
end |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
456 |
end |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
457 |
|
12051
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
458 |
if min ~= nil then |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
459 |
num = math.max(min, num) |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
460 |
end |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
461 |
if max ~= nil then |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
462 |
num = math.min(max, num) |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
463 |
end |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
464 |
return num |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
465 |
end |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
466 |
|
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
467 |
function onParameters() |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
468 |
parseParams() |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
469 |
|
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
470 |
barrelSpawn = parseNum("spawnbarrels", barrelSpawn, 0) |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
471 |
mineSpawn = parseNum("spawnmines", mineSpawn, 0) |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
472 |
|
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
473 |
initAmmoFlamer = parseNum("ammoflamer", initAmmoFlamer, 0) |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
474 |
initAmmoBarrel = parseNum("ammobarrel", initAmmoBarrel, 0) |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
475 |
initAmmoMine = parseNum("ammomine", initAmmoMine, 0) |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
476 |
|
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
477 |
placedMineTime = parseNum("minetimeplaced", placedMineTime, 0, 5000) |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
478 |
|
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
479 |
bonusTime = parseNum("bonustime", bonusTime, 0) |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
480 |
bonusFlames = parseNum("bonusflames", bonusFlames, 0) |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
481 |
|
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
482 |
chanceAmmo = parseNum("chanceammo", chanceAmmo, 0, 100) |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
483 |
chanceTime = parseNum("chancetime", chanceTime, 0, 100) |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
484 |
end |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
485 |
|
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 |
-- action keys |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
488 |
--------------- |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
489 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
490 |
function onPrecise() |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
491 |
|
12051
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
492 |
if (CurrentHedgehog ~= nil) and (stopMovement == false) and (tumbleStarted == true) then |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
493 |
|
12051
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
494 |
if wepAmmo[wepIndex] <= 0 then |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
495 |
PlaySound(sndDenied) |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
496 |
shotsRemainingMessage() |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
497 |
else |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
498 |
|
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
499 |
wepAmmo[wepIndex] = wepAmmo[wepIndex] - 1 |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
500 |
shotsRemainingMessage() |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
501 |
|
12051
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
502 |
if wep[wepIndex] == loc("Barrel Launcher") then |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
503 |
morte = AddGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog), gtExplosives, 0, 0, 0, 1) |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
504 |
CopyPV(CurrentHedgehog, morte) -- new addition |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
505 |
x,y = GetGearVelocity(morte) |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
506 |
x = x*2 |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
507 |
y = y*2 |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
508 |
SetGearVelocity(morte, x, y) |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
509 |
DrawTag(1) |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
510 |
PlaySound(sndThrowRelease) |
5720 | 511 |
|
12051
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
512 |
elseif wep[wepIndex] == loc("Mine Deployer") then |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
513 |
morte = AddGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog), gtMine, 0, 0, 0, 0) |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
514 |
SetTimer(morte, placedMineTime) |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
515 |
DrawTag(2) |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
516 |
PlaySound(sndThrowRelease) |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
517 |
|
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
518 |
end |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
519 |
end |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
520 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
521 |
end |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
522 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
523 |
preciseOn = true |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
524 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
525 |
end |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
526 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
527 |
function onPreciseUp() |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
528 |
preciseOn = false |
4872 | 529 |
end |
530 |
||
12051
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
531 |
onAttack = onPrecise |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
532 |
onAttackUp = onPreciseUp |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
533 |
|
4872 | 534 |
function onHJump() |
5720 | 535 |
-- 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
|
536 |
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
|
537 |
runOnGears(CheckProximityToExplosives) |
4872 | 538 |
end |
539 |
end |
|
540 |
||
12051
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
541 |
------------------- |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
542 |
-- Weapon selection |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
543 |
------------------- |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
544 |
|
4872 | 545 |
function onLJump() |
12051
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
546 |
if (CurrentHedgehog ~= nil) and (stopMovement == false) and (tumbleStarted == true) then |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
547 |
ChangeWeapon() |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
548 |
end |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
549 |
end |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
550 |
|
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
551 |
function onSlot(slot) |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
552 |
if (CurrentHedgehog ~= nil) and (stopMovement == false) and (tumbleStarted == true) then |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
553 |
if slot >= 0 and slot <= 2 then |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
554 |
ChangeWeapon(slot) |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
555 |
end |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
556 |
end |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
557 |
end |
4872 | 558 |
|
5598
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 |
-- movement keys |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
561 |
----------------- |
4872 | 562 |
|
563 |
function onLeft() |
|
564 |
if (CurrentHedgehog ~= nil) and (stopMovement == false) then |
|
565 |
leftOn = true |
|
566 |
end |
|
567 |
end |
|
568 |
||
569 |
function onRight() |
|
570 |
if (CurrentHedgehog ~= nil) and (stopMovement == false) then |
|
571 |
rightOn = true |
|
572 |
end |
|
573 |
end |
|
574 |
||
575 |
function onUp() |
|
576 |
if (CurrentHedgehog ~= nil) and (stopMovement == false) then |
|
577 |
upOn = true |
|
578 |
end |
|
579 |
end |
|
580 |
||
581 |
function onDown() |
|
582 |
if (CurrentHedgehog ~= nil) and (stopMovement == false) then |
|
583 |
downOn = true |
|
584 |
end |
|
585 |
end |
|
586 |
||
587 |
function onDownUp() |
|
588 |
downOn = false |
|
589 |
end |
|
590 |
function onUpUp() |
|
591 |
upOn = false |
|
592 |
end |
|
593 |
function onLeftUp() |
|
594 |
leftOn = false |
|
595 |
end |
|
596 |
function onRightUp() |
|
597 |
rightOn = false |
|
598 |
end |
|
599 |
||
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
600 |
-------------------------- |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
601 |
-- other event handlers |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
602 |
-------------------------- |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
603 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
604 |
function onGameInit() |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
605 |
CaseFreq = 0 |
5720 | 606 |
HealthCaseProb = 0 |
607 |
Delay = 1000 |
|
608 |
||
5827
a416f1070fdf
we don't need trailing whitespaces... I guess :P
sheepluva
parents:
5825
diff
changeset
|
609 |
for i = 0, 3 do |
a416f1070fdf
we don't need trailing whitespaces... I guess :P
sheepluva
parents:
5825
diff
changeset
|
610 |
vTag[0] = AddVisualGear(0, 0, vgtHealthTag, 0, false) |
5720 | 611 |
end |
612 |
||
613 |
HideTags() |
|
614 |
||
615 |
wep[0] = loc("Barrel Launcher") |
|
5827
a416f1070fdf
we don't need trailing whitespaces... I guess :P
sheepluva
parents:
5825
diff
changeset
|
616 |
wep[1] = loc("Mine Deployer") |
5720 | 617 |
wep[2] = loc("Flamer") |
618 |
||
619 |
wepCol[0] = 0x78818eff |
|
620 |
wepCol[1] = 0xa12a77ff |
|
621 |
wepCol[2] = 0xf49318ff |
|
5827
a416f1070fdf
we don't need trailing whitespaces... I guess :P
sheepluva
parents:
5825
diff
changeset
|
622 |
|
5720 | 623 |
wepCount = 3 |
624 |
||
12051
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
625 |
DisableGameFlags(gfArtillery + gfSharedAmmo + gfPerHogAmmo + gfTagTeam + gfPlaceHog + gfInvulnerable) |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
626 |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
627 |
end |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
628 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
629 |
function onGameStart() |
5720 | 630 |
|
12051
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
631 |
local clockStr |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
632 |
local timeStr |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
633 |
|
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
634 |
if chanceTime > 0 then |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
635 |
clockStr = loc("Utility crates extend your time.") .. "|" |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
636 |
timeStr = string.format(loc("Time extension: %ds"), bonusTime) .. "|" |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
637 |
else |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
638 |
clockStr = "" |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
639 |
timeStr = "" |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
640 |
end |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
641 |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
642 |
ShowMission ( |
12064 | 643 |
loc("Tumbler"), |
12051
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
644 |
loc("A Hedgewars mini-game"), |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
645 |
loc("Fly around and hurl explosives to your enemies.") .."|".. |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
646 |
loc("Eliminate the enemy hogs to win.") .. "|" .. |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
647 |
" " .. "|" .. |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
648 |
|
12051
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
649 |
string.format(loc("New mines per turn: %d"), mineSpawn) .. "|" .. |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
650 |
string.format(loc("New barrels per turn: %d"), barrelSpawn) .. "|" .. |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
651 |
timeStr .. |
5720 | 652 |
" " .. "|" .. |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
653 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
654 |
loc("Movement: [Up], [Down], [Left], [Right]") .. "|" .. |
12051
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
655 |
loc("Fire: [Precise]") .. "|" .. |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
656 |
loc("Change weapon: [Long jump] or [Slot 1]-[Slot 3]") .. "|" .. |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
657 |
loc("Grab mines/barrels: [High jump]") .. "|" .. |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
658 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
659 |
" " .. "|" .. |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
660 |
|
12051
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
661 |
clockStr .. |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
662 |
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
|
663 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
664 |
"", 4, 4000 |
5720 | 665 |
) |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
666 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
667 |
end |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
668 |
|
5825
a6eab1b7c00d
Scripting: Update screen dimensions on screen resize and introduce onScreenResize() event.
sheepluva
parents:
5720
diff
changeset
|
669 |
function onScreenResize() |
a6eab1b7c00d
Scripting: Update screen dimensions on screen resize and introduce onScreenResize() event.
sheepluva
parents:
5720
diff
changeset
|
670 |
|
a6eab1b7c00d
Scripting: Update screen dimensions on screen resize and introduce onScreenResize() event.
sheepluva
parents:
5720
diff
changeset
|
671 |
-- 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
|
672 |
if (CurrentHedgehog ~= nil) and (tumbleStarted == true) then |
a6eab1b7c00d
Scripting: Update screen dimensions on screen resize and introduce onScreenResize() event.
sheepluva
parents:
5720
diff
changeset
|
673 |
for i = 0, 3 do |
a6eab1b7c00d
Scripting: Update screen dimensions on screen resize and introduce onScreenResize() event.
sheepluva
parents:
5720
diff
changeset
|
674 |
DrawTag(i) |
a6eab1b7c00d
Scripting: Update screen dimensions on screen resize and introduce onScreenResize() event.
sheepluva
parents:
5720
diff
changeset
|
675 |
end |
a6eab1b7c00d
Scripting: Update screen dimensions on screen resize and introduce onScreenResize() event.
sheepluva
parents:
5720
diff
changeset
|
676 |
end |
a6eab1b7c00d
Scripting: Update screen dimensions on screen resize and introduce onScreenResize() event.
sheepluva
parents:
5720
diff
changeset
|
677 |
|
a6eab1b7c00d
Scripting: Update screen dimensions on screen resize and introduce onScreenResize() event.
sheepluva
parents:
5720
diff
changeset
|
678 |
end |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
679 |
|
12051
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
680 |
function onAmmoStoreInit() |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
681 |
-- Remove all conventional weapons |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
682 |
for a=0, 56 do |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
683 |
SetAmmo(a, 0, 0, 0, 0) |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
684 |
end |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
685 |
end |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
686 |
|
4872 | 687 |
function onNewTurn() |
5720 | 688 |
|
4872 | 689 |
stopMovement = false |
690 |
tumbleStarted = false |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
691 |
|
5720 | 692 |
-- randomly create new barrels mines on the map every turn (can be disabled by setting mine/barrels to 0 in scheme) |
693 |
for i = 0, barrelSpawn-1 do |
|
694 |
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
|
695 |
SetHealth(gear, 100) |
5720 | 696 |
if FindPlace(gear, false, 0, LAND_WIDTH, false) ~= nil then |
697 |
tempE = AddVisualGear(GetX(gear), GetY(gear), vgtBigExplosion, 0, false) |
|
698 |
end |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
699 |
end |
5720 | 700 |
for i = 0, mineSpawn-1 do |
701 |
gear = AddGear(100, 100, gtMine, 0, 0, 0, 0) |
|
702 |
if FindPlace(gear, false, 0, LAND_WIDTH, false) ~= nil then |
|
703 |
tempE = AddVisualGear(GetX(gear), GetY(gear), vgtBigExplosion, 0, false) |
|
704 |
end |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
705 |
end |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
706 |
|
5720 | 707 |
-- 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
|
708 |
r = GetRandom(100) |
12051
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
709 |
if r > 100-chanceTime then |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
710 |
gear = SpawnFakeUtilityCrate(0, 0, false, false) |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
711 |
end |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
712 |
r = GetRandom(100) |
12051
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
713 |
if r > 100-chanceAmmo then |
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
714 |
gear = SpawnFakeAmmoCrate(0, 0, false, false) |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
715 |
end |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
716 |
|
5720 | 717 |
HideTags() |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
718 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
719 |
--reset ammo counts |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
720 |
wepAmmo[0] = 2 |
5827
a416f1070fdf
we don't need trailing whitespaces... I guess :P
sheepluva
parents:
5825
diff
changeset
|
721 |
wepAmmo[1] = 1 |
5720 | 722 |
wepAmmo[2] = 50 -- 50000 -- 50 |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
723 |
wepIndex = 2 |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
724 |
ChangeWeapon() |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
725 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
726 |
roundKills = 0 |
5720 | 727 |
barrelsEaten = 0 |
728 |
minesEaten = 0 |
|
729 |
||
730 |
FollowGear(CurrentHedgehog) |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
731 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
732 |
end |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
733 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
734 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
735 |
function DisableTumbler() |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
736 |
stopMovement = true |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
737 |
upOn = false |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
738 |
down = false |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
739 |
leftOn = false |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
740 |
rightOn = false |
5720 | 741 |
HideTags() |
4872 | 742 |
end |
743 |
||
744 |
function onGameTick() |
|
745 |
||
746 |
-- start the player tumbling with a boom once their turn has actually begun |
|
747 |
if tumbleStarted == false then |
|
748 |
if (TurnTimeLeft > 0) and (TurnTimeLeft ~= TurnTime) then |
|
749 |
tumbleStarted = true |
|
5720 | 750 |
TimeLeft = (TurnTime/1000) |
4872 | 751 |
AddGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog), gtGrenade, 0, 0, 0, 1) |
5720 | 752 |
SetHealth(CurrentHedgehog, GetHealth(CurrentHedgehog) + 47) -- new |
753 |
for i = 0, 3 do |
|
754 |
DrawTag(i) |
|
5827
a416f1070fdf
we don't need trailing whitespaces... I guess :P
sheepluva
parents:
5825
diff
changeset
|
755 |
end |
4872 | 756 |
end |
757 |
end |
|
758 |
||
759 |
if (CurrentHedgehog ~= nil) and (tumbleStarted == true) then |
|
760 |
||
5720 | 761 |
runOnGears(CheckProximity) -- crates |
4872 | 762 |
|
763 |
-- Calculate and display turn time |
|
764 |
TimeLeftCounter = TimeLeftCounter + 1 |
|
765 |
if TimeLeftCounter == 1000 then |
|
766 |
TimeLeftCounter = 0 |
|
767 |
TimeLeft = TimeLeft - 1 |
|
768 |
||
12053 | 769 |
-- Countdown sounds |
770 |
if TimeLeft == 5 then |
|
771 |
PlaySound(sndHurry, CurrentHedgehog) |
|
772 |
elseif TimeLeft <= 4 and TimeLeft >= 1 then |
|
773 |
PlaySound(_G["sndCountdown"..TimeLeft]) |
|
774 |
end |
|
775 |
||
4872 | 776 |
if TimeLeft >= 0 then |
5720 | 777 |
DrawTag(0) |
4872 | 778 |
end |
779 |
||
780 |
end |
|
781 |
||
782 |
if TimeLeft == 0 then |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
783 |
DisableTumbler() |
4872 | 784 |
end |
785 |
||
786 |
-- handle movement based on IO |
|
787 |
moveTimer = moveTimer + 1 |
|
788 |
if moveTimer == 100 then -- 100 |
|
789 |
moveTimer = 0 |
|
790 |
||
5720 | 791 |
runOnflames(HandleLife) |
792 |
||
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
793 |
--------------- |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
794 |
-- new trail code |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
795 |
--------------- |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
796 |
-- 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
|
797 |
if (TimeLeft <= 5) and (TimeLeft > 0) then |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
798 |
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
|
799 |
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
|
800 |
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
|
801 |
end |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
802 |
-------------- |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
803 |
|
4872 | 804 |
dx, dy = GetGearVelocity(CurrentHedgehog) |
805 |
||
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
806 |
dxlimit = 0.4*fMod |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
807 |
dylimit = 0.4*fMod |
4872 | 808 |
|
809 |
if dx > dxlimit then |
|
810 |
dx = dxlimit |
|
811 |
end |
|
812 |
if dy > dylimit then |
|
813 |
dy = dylimit |
|
814 |
end |
|
815 |
if dx < -dxlimit then |
|
816 |
dx = -dxlimit |
|
817 |
end |
|
818 |
if dy < -dylimit then |
|
819 |
dy = -dylimit |
|
820 |
end |
|
821 |
||
822 |
||
823 |
if leftOn == true then |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
824 |
dx = dx - 0.1*fMod |
4872 | 825 |
end |
826 |
if rightOn == true then |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
827 |
dx = dx + 0.1*fMod |
4872 | 828 |
end |
829 |
||
830 |
if upOn == true then |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
831 |
dy = dy - 0.1*fMod |
4872 | 832 |
end |
833 |
if downOn == true then |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
834 |
dy = dy + 0.1*fMod |
4872 | 835 |
end |
836 |
||
837 |
SetGearVelocity(CurrentHedgehog, dx, dy) |
|
838 |
||
839 |
end |
|
840 |
||
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
841 |
-- |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
842 |
--flamer |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
843 |
-- |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
844 |
fireTimer = fireTimer + 1 |
5720 | 845 |
if fireTimer == 6 then -- 5 --10 |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
846 |
fireTimer = 0 |
4872 | 847 |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
848 |
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
|
849 |
|
5720 | 850 |
wepAmmo[wepIndex] = wepAmmo[wepIndex] - 1 |
12051
05a968518a56
Tumbler updates: Script params, select weaps via slots, more sounds, rewrite texts, ignore broken gameflags
Wuzzy <almikes@aol.com>
parents:
8043
diff
changeset
|
851 |
shotsRemainingMessage() |
5720 | 852 |
DrawTag(3) |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
853 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
854 |
dx, dy = GetGearVelocity(CurrentHedgehog) |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
855 |
shell = AddGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog), gtFlame, 0, 0, 0, 0) |
4872 | 856 |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
857 |
xdev = 1 + GetRandom(25) --15 |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
858 |
xdev = xdev / 100 |
4872 | 859 |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
860 |
r = GetRandom(2) |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
861 |
if r == 1 then |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
862 |
xdev = xdev*-1 |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
863 |
end |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
864 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
865 |
ydev = 1 + GetRandom(25) --15 |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
866 |
ydev = ydev / 100 |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
867 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
868 |
r = GetRandom(2) |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
869 |
if r == 1 then |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
870 |
ydev = ydev*-1 |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
871 |
end |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
872 |
|
5720 | 873 |
--*13 --8 *-4 |
874 |
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
|
875 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
876 |
end |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
877 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
878 |
end |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
879 |
-- |
4872 | 880 |
|
881 |
end |
|
882 |
||
883 |
||
884 |
end |
|
885 |
||
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
886 |
function isATrackedGear(gear) |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
887 |
if (GetGearType(gear) == gtExplosives) or |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
888 |
(GetGearType(gear) == gtMine) or |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
889 |
(GetGearType(gear) == gtCase) |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
890 |
then |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
891 |
return(true) |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
892 |
else |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
893 |
return(false) |
4872 | 894 |
end |
895 |
end |
|
896 |
||
897 |
function onGearAdd(gear) |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
898 |
|
5720 | 899 |
if GetGearType(gear) == gtFlame then |
900 |
||
901 |
trackFGear(gear) |
|
902 |
||
903 |
fGears = fGears +1 |
|
904 |
||
905 |
if fGears < 80 then |
|
906 |
setFGearValue(gear,"L",30) |
|
907 |
else |
|
908 |
setFGearValue(gear,"L",5) --3 |
|
909 |
end |
|
910 |
||
911 |
elseif isATrackedGear(gear) then |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
912 |
trackGear(gear) |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
913 |
end |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
914 |
|
4872 | 915 |
end |
916 |
||
917 |
function onGearDelete(gear) |
|
918 |
||
5720 | 919 |
if GetGearType(gear) == gtFlame then |
920 |
trackFGearDeletion(gear) |
|
921 |
fGears = fGears -1 |
|
922 |
||
923 |
elseif isATrackedGear(gear) then |
|
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
924 |
trackDeletion(gear) |
5720 | 925 |
|
926 |
-- achievements? prototype |
|
927 |
elseif GetGearType(gear) == gtHedgehog then |
|
928 |
||
929 |
if GetHogTeamName(gear) ~= GetHogTeamName(CurrentHedgehog) then |
|
930 |
||
931 |
roundKills = roundKills + 1 |
|
932 |
if roundKills == 2 then |
|
933 |
AddCaption(loc("Double Kill!"),0xffba00ff,capgrpMessage2) |
|
934 |
elseif roundKills == 3 then |
|
935 |
AddCaption(loc("Killing spree!"),0xffba00ff,capgrpMessage2) |
|
936 |
elseif roundKills >= 4 then |
|
937 |
AddCaption(loc("Unstoppable!"),0xffba00ff,capgrpMessage2) |
|
938 |
end |
|
939 |
||
940 |
elseif gear == CurrentHedgehog then |
|
941 |
DisableTumbler() |
|
942 |
||
943 |
elseif gear ~= CurrentHedgehog then |
|
944 |
AddCaption(loc("Friendly Fire!"),0xffba00ff,capgrpMessage2) |
|
945 |
end |
|
946 |
||
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
947 |
end |
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
948 |
|
4872 | 949 |
if CurrentHedgehog ~= nil then |
950 |
FollowGear(CurrentHedgehog) |
|
951 |
end |
|
952 |
||
5720 | 953 |
end |
5598
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
954 |
|
265429f7ba85
- Updates to Tumbler gameplay mode [may still need a lil work]
mikade
parents:
5325
diff
changeset
|
955 |