author | Wuzzy <Wuzzy2@mail.ru> |
Fri, 16 Feb 2018 23:42:00 +0100 | |
changeset 13029 | a568bc16a99a |
parent 12971 | b543d767fed3 |
child 13032 | 625d5a45f267 |
permissions | -rw-r--r-- |
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1 |
------------------------------------------ |
10967
1434cec96ca3
- preview generation for rubbers, air-mines, crates, barrels
mikade <redgrinner@gmail.com>
parents:
10961
diff
changeset
|
2 |
-- TECH RACER v0.8 |
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
3 |
----------------------------------------- |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
4 |
|
12393
0eb1457f7b94
Add big fat developer warning to all racing scripts about compability
Wuzzy <almikes@aol.com>
parents:
12338
diff
changeset
|
5 |
-- DEVELOPER WARNING - FOR OFFICIAL DEVELOPMENT -- |
0eb1457f7b94
Add big fat developer warning to all racing scripts about compability
Wuzzy <almikes@aol.com>
parents:
12338
diff
changeset
|
6 |
-- Be careful when editig this script, do not introduce changes lightly! |
0eb1457f7b94
Add big fat developer warning to all racing scripts about compability
Wuzzy <almikes@aol.com>
parents:
12338
diff
changeset
|
7 |
-- This script is used for time records on the official Hedgewars server. |
0eb1457f7b94
Add big fat developer warning to all racing scripts about compability
Wuzzy <almikes@aol.com>
parents:
12338
diff
changeset
|
8 |
-- Introducing breaking changes means we have to invalidate past time records! |
0eb1457f7b94
Add big fat developer warning to all racing scripts about compability
Wuzzy <almikes@aol.com>
parents:
12338
diff
changeset
|
9 |
|
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
10 |
-------------- |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
11 |
-- TO DO |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
12 |
-------------- |
10967
1434cec96ca3
- preview generation for rubbers, air-mines, crates, barrels
mikade <redgrinner@gmail.com>
parents:
10961
diff
changeset
|
13 |
-- allow scrolling of maps (was going to add this in the engine itself, but it can be done now by refreshing preview) |
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
14 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
15 |
-------------- |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
16 |
--0.2 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
17 |
-------------- |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
18 |
-- should work better "out the box" |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
19 |
-- changed map generation |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
20 |
-- put a hog limiter in place |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
21 |
-- removed parsecommand |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
22 |
-- fix one of the test maps |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
23 |
-- hopefully added some support for future official challenges etc |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
24 |
-- changed theme |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
25 |
-- minor cleanups? |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
26 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
27 |
-------------- |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
28 |
--0.3 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
29 |
-------------- |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
30 |
-- ehh, scrap everything? those old maps probably still desync so they can die for now |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
31 |
-- hopefully fix map 3 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
32 |
-- add two new crappy map to test an idea. |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
33 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
34 |
-------------- |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
35 |
--0.4 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
36 |
-------------- |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
37 |
-- updated version text (lol) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
38 |
-- some preliminary support for hand-drawn map loading |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
39 |
-- some support for being really lazy |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
40 |
-- an extra map or two |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
41 |
-- param for infinite UFO fuel |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
42 |
-- param for number of rounds |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
43 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
44 |
-------------- |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
45 |
--0.5 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
46 |
-------------- |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
47 |
-- migrated maps to an external script |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
48 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
49 |
-------------- |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
50 |
--0.6 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
51 |
-------------- |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
52 |
-- move 1 line of code :D (allows loading of HWMAP points to actually work) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
53 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
54 |
-------------- |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
55 |
--0.7 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
56 |
-------------- |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
57 |
-- allow waypoints to be loaded automatically via TechMaps or HWMAP |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
58 |
-- (temporarily?) remove ability to place waypoints manually |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
59 |
-- break stuff? |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
60 |
|
10967
1434cec96ca3
- preview generation for rubbers, air-mines, crates, barrels
mikade <redgrinner@gmail.com>
parents:
10961
diff
changeset
|
61 |
-------------- |
1434cec96ca3
- preview generation for rubbers, air-mines, crates, barrels
mikade <redgrinner@gmail.com>
parents:
10961
diff
changeset
|
62 |
--0.8 |
1434cec96ca3
- preview generation for rubbers, air-mines, crates, barrels
mikade <redgrinner@gmail.com>
parents:
10961
diff
changeset
|
63 |
-------------- |
1434cec96ca3
- preview generation for rubbers, air-mines, crates, barrels
mikade <redgrinner@gmail.com>
parents:
10961
diff
changeset
|
64 |
-- should (more or less) work "out of the box" now |
1434cec96ca3
- preview generation for rubbers, air-mines, crates, barrels
mikade <redgrinner@gmail.com>
parents:
10961
diff
changeset
|
65 |
-- generate map previews for level |
1434cec96ca3
- preview generation for rubbers, air-mines, crates, barrels
mikade <redgrinner@gmail.com>
parents:
10961
diff
changeset
|
66 |
-- randomly assign a map in the case of no map param |
1434cec96ca3
- preview generation for rubbers, air-mines, crates, barrels
mikade <redgrinner@gmail.com>
parents:
10961
diff
changeset
|
67 |
-- no longer allow custom ammosets (ammo should be specified by map so that records can be valid, though we probably still need to completely limit gameflags) |
1434cec96ca3
- preview generation for rubbers, air-mines, crates, barrels
mikade <redgrinner@gmail.com>
parents:
10961
diff
changeset
|
68 |
|
10979 | 69 |
-------------- |
70 |
--0.9 |
|
71 |
-------------- |
|
72 |
-- added variable portal limiter (and effects) from Escape script |
|
73 |
-- allow variable ufoFuel (nil is default, 2000 is infinite) |
|
74 |
-- disallow specifying fuel in params (do this in TechMaps or HedgeEditor please) |
|
75 |
||
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
76 |
----------------------------- |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
77 |
-- SCRIPT BEGINS |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
78 |
----------------------------- |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
79 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
80 |
HedgewarsScriptLoad("/Scripts/Locale.lua") |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
81 |
HedgewarsScriptLoad("/Scripts/OfficialChallenges.lua") |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
82 |
HedgewarsScriptLoad("/Scripts/Tracker.lua") |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
83 |
HedgewarsScriptLoad("/Scripts/Params.lua") |
10961 | 84 |
HedgewarsScriptLoad("/Scripts/TechMaps.lua") |
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
85 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
86 |
------------------ |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
87 |
-- Got Variables? |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
88 |
------------------ |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
89 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
90 |
local atkArray = |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
91 |
{ |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
92 |
{amBazooka, "amBazooka", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
93 |
{amBee, "amBee", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
94 |
{amMortar, "amMortar", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
95 |
{amDrill, "amDrill", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
96 |
{amSnowball, "amSnowball", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
97 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
98 |
{amGrenade, "amGrenade", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
99 |
{amClusterBomb, "amClusterBomb", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
100 |
{amMolotov, "amMolotov", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
101 |
{amWatermelon, "amWatermelon", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
102 |
{amHellishBomb, "amHellishBomb", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
103 |
{amGasBomb, "amGasBomb", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
104 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
105 |
{amShotgun, "amShotgun", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
106 |
{amDEagle, "amDEagle", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
107 |
{amFlamethrower,"amFlamethrower", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
108 |
{amSniperRifle, "amSniperRifle", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
109 |
{amSineGun, "amSineGun", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
110 |
{amIceGun, "amIceGun", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
111 |
{amLandGun, "amLandGun", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
112 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
113 |
{amFirePunch, "amFirePunch", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
114 |
{amWhip, "amWhip", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
115 |
{amBaseballBat, "amBaseballBat", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
116 |
{amKamikaze, "amKamikaze", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
117 |
{amSeduction, "amSeduction", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
118 |
{amHammer, "amHammer", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
119 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
120 |
{amMine, "amMine", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
121 |
{amDynamite, "amDynamite", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
122 |
{amCake, "amCake", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
123 |
{amBallgun, "amBallgun", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
124 |
{amRCPlane, "amRCPlane", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
125 |
{amSMine, "amSMine", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
126 |
{amAirMine, "amAirMine", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
127 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
128 |
{amAirAttack, "amAirAttack", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
129 |
{amMineStrike, "amMineStrike", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
130 |
{amDrillStrike, "amDrillStrike", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
131 |
{amAirMine, "amAirMine", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
132 |
{amNapalm, "amNapalm", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
133 |
{amPiano, "amPiano", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
134 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
135 |
{amKnife, "amKnife", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
136 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
137 |
{amBirdy, "amBirdy", 0} |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
138 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
139 |
} |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
140 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
141 |
local utilArray = |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
142 |
{ |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
143 |
{amBlowTorch, "amBlowTorch", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
144 |
{amPickHammer, "amPickHammer", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
145 |
{amGirder, "amGirder", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
146 |
{amRubber, "amRubber", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
147 |
{amPortalGun, "amPortalGun", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
148 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
149 |
{amRope, "amRope", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
150 |
{amParachute, "amParachute", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
151 |
{amTeleport, "amTeleport", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
152 |
{amJetpack, "amJetpack", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
153 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
154 |
{amInvulnerable, "amInvulnerable", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
155 |
{amLaserSight, "amLaserSight", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
156 |
{amVampiric, "amVampiric", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
157 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
158 |
{amLowGravity, "amLowGravity", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
159 |
{amExtraDamage, "amExtraDamage", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
160 |
{amExtraTime, "amExtraTime", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
161 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
162 |
{amResurrector, "amResurrector", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
163 |
{amTardis, "amTardis", 0}, |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
164 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
165 |
{amSwitch, "amSwitch", 0} |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
166 |
} |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
167 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
168 |
local activationStage = 0 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
169 |
local jet = nil |
10979 | 170 |
portalDistance = 5000 -- 15 |
171 |
ufoFuel = 0 |
|
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
172 |
local fMod = 1000000 -- 1 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
173 |
local roundLimit = 3 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
174 |
local roundNumber = 0 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
175 |
local firstClan = 10 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
176 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
177 |
local fastX = {} |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
178 |
local fastY = {} |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
179 |
local fastCount = 0 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
180 |
local fastIndex = 0 |
11586 | 181 |
local fastColour = 0xffffffff |
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
182 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
183 |
local currX = {} |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
184 |
local currY = {} |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
185 |
local currCount = 0 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
186 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
187 |
local specialPointsX = {} |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
188 |
local specialPointsY = {} |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
189 |
local specialPointsFlag = {} |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
190 |
local specialPointsCount = 0 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
191 |
|
10967
1434cec96ca3
- preview generation for rubbers, air-mines, crates, barrels
mikade <redgrinner@gmail.com>
parents:
10961
diff
changeset
|
192 |
mapID = nil |
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
193 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
194 |
-------------------------- |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
195 |
-- hog and team tracking variales |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
196 |
-------------------------- |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
197 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
198 |
local numhhs = 0 -- store number of hedgehogs |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
199 |
local hhs = {} -- store hedgehog gears |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
200 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
201 |
local numTeams -- store the number of teams in the game |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
202 |
local teamNameArr = {} -- store the list of teams |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
203 |
local teamClan = {} |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
204 |
local teamSize = {} -- store how many hogs per team |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
205 |
local teamIndex = {} -- at what point in the hhs{} does each team begin |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
206 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
207 |
local teamComment = {} |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
208 |
local teamScore = {} |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
209 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
210 |
------- |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
211 |
-- racer vars |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
212 |
-------- |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
213 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
214 |
local cGear = nil |
13029
a568bc16a99a
Racer and TechRacer: Move cameera to first waypoint in Ready phase
Wuzzy <Wuzzy2@mail.ru>
parents:
12971
diff
changeset
|
215 |
local cameraGear = nil |
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
216 |
|
11942
8fd4926e1e9e
TechRacer: Cleanup mess regarding teams which did not finish
Wuzzy <almikes@aol.com>
parents:
11941
diff
changeset
|
217 |
local bestClan = 10 |
8fd4926e1e9e
TechRacer: Cleanup mess regarding teams which did not finish
Wuzzy <almikes@aol.com>
parents:
11941
diff
changeset
|
218 |
local bestTime = 1000000 |
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
219 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
220 |
local gameBegun = false |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
221 |
local gameOver = false |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
222 |
local racerActive = false |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
223 |
local trackTime = 0 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
224 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
225 |
local wpCirc = {} |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
226 |
local wpX = {} |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
227 |
local wpY = {} |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
228 |
local wpCol = {} |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
229 |
local wpActive = {} |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
230 |
local wpRad = 450 --75 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
231 |
local wpCount = 0 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
232 |
local wpLimit = 20 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
233 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
234 |
local usedWeapons = {} |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
235 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
236 |
local roundN |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
237 |
local lastRound |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
238 |
local RoundHasChanged |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
239 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
240 |
------------------- |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
241 |
-- general methods |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
242 |
------------------- |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
243 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
244 |
--function onPrecise() |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
245 |
--end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
246 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
247 |
function RebuildTeamInfo() |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
248 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
249 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
250 |
-- make a list of individual team names |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
251 |
for i = 0, (TeamsCount-1) do |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
252 |
teamNameArr[i] = " " -- = i |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
253 |
teamSize[i] = 0 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
254 |
teamIndex[i] = 0 |
11596
7c9243584a72
Fix TechRacer not recoding finish if time was >= 100s by raising this limit ten times.
unc0rr
parents:
11590
diff
changeset
|
255 |
teamScore[i] = 1000000 |
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
256 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
257 |
numTeams = 0 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
258 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
259 |
for i = 0, (numhhs-1) do |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
260 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
261 |
z = 0 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
262 |
unfinished = true |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
263 |
while(unfinished == true) do |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
264 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
265 |
newTeam = true |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
266 |
tempHogTeamName = GetHogTeamName(hhs[i]) -- this is the new name |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
267 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
268 |
if tempHogTeamName == teamNameArr[z] then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
269 |
newTeam = false |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
270 |
unfinished = false |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
271 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
272 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
273 |
z = z + 1 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
274 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
275 |
if z == TeamsCount then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
276 |
unfinished = false |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
277 |
if newTeam == true then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
278 |
teamNameArr[numTeams] = tempHogTeamName |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
279 |
numTeams = numTeams + 1 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
280 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
281 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
282 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
283 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
284 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
285 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
286 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
287 |
-- find out how many hogs per team, and the index of the first hog in hhs |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
288 |
for i = 0, (numTeams-1) do |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
289 |
for z = 0, (numhhs-1) do |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
290 |
if GetHogTeamName(hhs[z]) == teamNameArr[i] then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
291 |
teamClan[i] = GetHogClan(hhs[z]) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
292 |
if teamSize[i] == 0 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
293 |
teamIndex[i] = z -- should give starting index |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
294 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
295 |
teamSize[i] = teamSize[i] + 1 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
296 |
--add a pointer so this hog appears at i in hhs |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
297 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
298 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
299 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
300 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
301 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
302 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
303 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
304 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
305 |
----------------- |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
306 |
-- RACER METHODS |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
307 |
----------------- |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
308 |
|
12971
b543d767fed3
Make first waypoint flash TechRacer, before hog starts racing
Wuzzy <Wuzzy2@mail.ru>
parents:
12969
diff
changeset
|
309 |
-- Returns min opacity, max opacity and flashing speed (`FrameTicks`) |
b543d767fed3
Make first waypoint flash TechRacer, before hog starts racing
Wuzzy <Wuzzy2@mail.ru>
parents:
12969
diff
changeset
|
310 |
-- for the waypoint visual gears |
b543d767fed3
Make first waypoint flash TechRacer, before hog starts racing
Wuzzy <Wuzzy2@mail.ru>
parents:
12969
diff
changeset
|
311 |
function FlashingHelper(wpIndex) |
b543d767fed3
Make first waypoint flash TechRacer, before hog starts racing
Wuzzy <Wuzzy2@mail.ru>
parents:
12969
diff
changeset
|
312 |
local minO, maxO, flashing |
b543d767fed3
Make first waypoint flash TechRacer, before hog starts racing
Wuzzy <Wuzzy2@mail.ru>
parents:
12969
diff
changeset
|
313 |
if wpIndex == 0 then |
b543d767fed3
Make first waypoint flash TechRacer, before hog starts racing
Wuzzy <Wuzzy2@mail.ru>
parents:
12969
diff
changeset
|
314 |
-- Notable flashing of first waypoint |
b543d767fed3
Make first waypoint flash TechRacer, before hog starts racing
Wuzzy <Wuzzy2@mail.ru>
parents:
12969
diff
changeset
|
315 |
minO, maxO = 92, 255 |
b543d767fed3
Make first waypoint flash TechRacer, before hog starts racing
Wuzzy <Wuzzy2@mail.ru>
parents:
12969
diff
changeset
|
316 |
flashing = 2 |
b543d767fed3
Make first waypoint flash TechRacer, before hog starts racing
Wuzzy <Wuzzy2@mail.ru>
parents:
12969
diff
changeset
|
317 |
else |
b543d767fed3
Make first waypoint flash TechRacer, before hog starts racing
Wuzzy <Wuzzy2@mail.ru>
parents:
12969
diff
changeset
|
318 |
-- Slow pulsation |
b543d767fed3
Make first waypoint flash TechRacer, before hog starts racing
Wuzzy <Wuzzy2@mail.ru>
parents:
12969
diff
changeset
|
319 |
minO, maxO = 164, 224 |
b543d767fed3
Make first waypoint flash TechRacer, before hog starts racing
Wuzzy <Wuzzy2@mail.ru>
parents:
12969
diff
changeset
|
320 |
flashing = 10 |
b543d767fed3
Make first waypoint flash TechRacer, before hog starts racing
Wuzzy <Wuzzy2@mail.ru>
parents:
12969
diff
changeset
|
321 |
end |
b543d767fed3
Make first waypoint flash TechRacer, before hog starts racing
Wuzzy <Wuzzy2@mail.ru>
parents:
12969
diff
changeset
|
322 |
return minO, maxO, flashing |
b543d767fed3
Make first waypoint flash TechRacer, before hog starts racing
Wuzzy <Wuzzy2@mail.ru>
parents:
12969
diff
changeset
|
323 |
end |
b543d767fed3
Make first waypoint flash TechRacer, before hog starts racing
Wuzzy <Wuzzy2@mail.ru>
parents:
12969
diff
changeset
|
324 |
|
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
325 |
function CheckWaypoints() |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
326 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
327 |
trackFinished = true |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
328 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
329 |
for i = 0, (wpCount-1) do |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
330 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
331 |
g1X, g1Y = GetGearPosition(CurrentHedgehog) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
332 |
g2X, g2Y = wpX[i], wpY[i] |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
333 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
334 |
g1X = g1X - g2X |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
335 |
g1Y = g1Y - g2Y |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
336 |
dist = (g1X*g1X) + (g1Y*g1Y) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
337 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
338 |
--if i == 0 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
339 |
-- AddCaption(dist .. "/" .. (wpRad*wpRad) ) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
340 |
--end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
341 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
342 |
NR = (48/100*wpRad)/2 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
343 |
|
12969
a5c5fe878a4e
Racer, TechRacer: Fade out waypoints at the end
Wuzzy <Wuzzy2@mail.ru>
parents:
12968
diff
changeset
|
344 |
if dist < (NR*NR) and not gameOver then |
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
345 |
--if dist < (wpRad*wpRad) then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
346 |
--AddCaption("howdy") |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
347 |
wpCol[i] = GetClanColor(GetHogClan(CurrentHedgehog)) -- new --GetClanColor(1) |
12967
52c12029c7bd
Increase opacity of Racer/TechRacer waypoints
Wuzzy <Wuzzy2@mail.ru>
parents:
12429
diff
changeset
|
348 |
SetVisualGearValues(wpCirc[i], wpX[i], wpY[i], 64, 64, 1, 10, 0, wpRad, 5, wpCol[i]) |
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
349 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
350 |
wpRem = 0 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
351 |
for k = 0, (wpCount-1) do |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
352 |
if wpActive[k] == false then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
353 |
wpRem = wpRem + 1 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
354 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
355 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
356 |
|
11938
20b755da986f
TechRacer: Don't mess with ammo caption while in waypoint.
Wuzzy <almikes@aol.com>
parents:
11937
diff
changeset
|
357 |
if not wpActive[i] then |
11941
c750c21e4a44
Fix some incorrect TechRacer messages
Wuzzy <almikes@aol.com>
parents:
11940
diff
changeset
|
358 |
local wpMessage = "" |
c750c21e4a44
Fix some incorrect TechRacer messages
Wuzzy <almikes@aol.com>
parents:
11940
diff
changeset
|
359 |
if wpRem-1 == 0 then |
c750c21e4a44
Fix some incorrect TechRacer messages
Wuzzy <almikes@aol.com>
parents:
11940
diff
changeset
|
360 |
wpMessage = loc("Track completed!") |
c750c21e4a44
Fix some incorrect TechRacer messages
Wuzzy <almikes@aol.com>
parents:
11940
diff
changeset
|
361 |
else |
c750c21e4a44
Fix some incorrect TechRacer messages
Wuzzy <almikes@aol.com>
parents:
11940
diff
changeset
|
362 |
wpMessage = string.format(loc("Waypoints remaining: %d"), wpRem-1) |
c750c21e4a44
Fix some incorrect TechRacer messages
Wuzzy <almikes@aol.com>
parents:
11940
diff
changeset
|
363 |
end |
c750c21e4a44
Fix some incorrect TechRacer messages
Wuzzy <almikes@aol.com>
parents:
11940
diff
changeset
|
364 |
AddCaption(wpMessage, 0xffba00ff, capgrpGameState) |
11938
20b755da986f
TechRacer: Don't mess with ammo caption while in waypoint.
Wuzzy <almikes@aol.com>
parents:
11937
diff
changeset
|
365 |
end |
20b755da986f
TechRacer: Don't mess with ammo caption while in waypoint.
Wuzzy <almikes@aol.com>
parents:
11937
diff
changeset
|
366 |
|
20b755da986f
TechRacer: Don't mess with ammo caption while in waypoint.
Wuzzy <almikes@aol.com>
parents:
11937
diff
changeset
|
367 |
wpActive[i] = true |
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
368 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
369 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
370 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
371 |
if wpActive[i] == false then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
372 |
trackFinished = false |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
373 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
374 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
375 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
376 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
377 |
return(trackFinished) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
378 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
379 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
380 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
381 |
function AdjustScores() |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
382 |
|
11942
8fd4926e1e9e
TechRacer: Cleanup mess regarding teams which did not finish
Wuzzy <almikes@aol.com>
parents:
11941
diff
changeset
|
383 |
local bestTimeComment = loc("Did not finish") |
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
384 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
385 |
newScore = false |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
386 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
387 |
-- update this clan's time if the new track is better |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
388 |
for i = 0, (numTeams-1) do |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
389 |
if teamClan[i] == GetHogClan(CurrentHedgehog) then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
390 |
if trackTime < teamScore[i] then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
391 |
teamScore[i] = trackTime |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
392 |
newScore = true |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
393 |
else |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
394 |
newScore = false |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
395 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
396 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
397 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
398 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
399 |
-- find the best time out of those so far |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
400 |
for i = 0, (numTeams-1) do |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
401 |
if teamScore[i] < bestTime then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
402 |
bestTime = teamScore[i] |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
403 |
bestClan = teamClan[i] |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
404 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
405 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
406 |
|
11596
7c9243584a72
Fix TechRacer not recoding finish if time was >= 100s by raising this limit ten times.
unc0rr
parents:
11590
diff
changeset
|
407 |
if bestTime ~= 1000000 then |
11942
8fd4926e1e9e
TechRacer: Cleanup mess regarding teams which did not finish
Wuzzy <almikes@aol.com>
parents:
11941
diff
changeset
|
408 |
bestTimeComment = string.format(loc("%.1fs"), (bestTime/1000)) |
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
409 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
410 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
411 |
if newScore == true then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
412 |
if trackTime == bestTime then -- best time of the race |
11937 | 413 |
ShowMission(loc("TechRacer"), |
414 |
loc("Track completed!"), |
|
415 |
string.format(loc("New race record: %.1fs"), (trackTime/1000)) .. "|" .. |
|
11942
8fd4926e1e9e
TechRacer: Cleanup mess regarding teams which did not finish
Wuzzy <almikes@aol.com>
parents:
11941
diff
changeset
|
416 |
string.format(loc("Winning time: %s"), bestTimeComment), 0, 4000) |
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
417 |
PlaySound(sndHomerun) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
418 |
else -- best time for the clan |
11937 | 419 |
ShowMission(loc("TechRacer"), |
420 |
loc("Track completed!"), |
|
421 |
string.format(loc("New clan record: %.1fs"), (trackTime/1000)) .. "|" .. |
|
422 |
string.format(loc("Winning time: %s"), bestTimeComment), 4, 4000) |
|
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
423 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
424 |
else -- not any kind of new score |
11937 | 425 |
ShowMission(loc("TechRacer"), |
426 |
loc("Track completed!"), |
|
427 |
string.format(loc("Time: %.1fs"), (trackTime/1000)) .. "|" .. |
|
428 |
string.format(loc("Winning time: %s"), bestTimeComment), -amSkip, 4000) |
|
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
429 |
PlaySound(sndHellish) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
430 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
431 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
432 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
433 |
-------- |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
434 |
--new |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
435 |
-------- |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
436 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
437 |
if bestTime == trackTime then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
438 |
--AddCaption("wooooooooooooooooooooooooooooo") |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
439 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
440 |
fastColour = GetClanColor(GetHogClan(CurrentHedgehog)) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
441 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
442 |
for i = 0, (currCount-1) do |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
443 |
fastX[i] = currX[i] |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
444 |
fastY[i] = currY[i] |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
445 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
446 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
447 |
fastCount = currCount |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
448 |
fastIndex = 0 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
449 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
450 |
--currCount = 0 -- is this needed? |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
451 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
452 |
else |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
453 |
currCount = 0 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
454 |
fastIndex = 0 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
455 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
456 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
457 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
458 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
459 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
460 |
function onNewRound() |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
461 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
462 |
roundNumber = roundNumber + 1 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
463 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
464 |
totalComment = "" |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
465 |
for i = 0, (TeamsCount-1) do |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
466 |
if teamNameArr[i] ~= " " then -- teamScore[teamClan[i]] |
11942
8fd4926e1e9e
TechRacer: Cleanup mess regarding teams which did not finish
Wuzzy <almikes@aol.com>
parents:
11941
diff
changeset
|
467 |
if teamScore[i] ~= 1000000 then |
8fd4926e1e9e
TechRacer: Cleanup mess regarding teams which did not finish
Wuzzy <almikes@aol.com>
parents:
11941
diff
changeset
|
468 |
teamComment[i] = string.format(loc("%s: %.1fs"), teamNameArr[i], (teamScore[i]/1000)) .. "|" |
8fd4926e1e9e
TechRacer: Cleanup mess regarding teams which did not finish
Wuzzy <almikes@aol.com>
parents:
11941
diff
changeset
|
469 |
else |
8fd4926e1e9e
TechRacer: Cleanup mess regarding teams which did not finish
Wuzzy <almikes@aol.com>
parents:
11941
diff
changeset
|
470 |
teamComment[i] = string.format(loc("%s: Did not finish"), teamNameArr[i]) .. "|" |
8fd4926e1e9e
TechRacer: Cleanup mess regarding teams which did not finish
Wuzzy <almikes@aol.com>
parents:
11941
diff
changeset
|
471 |
end |
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
472 |
totalComment = totalComment .. teamComment[i] |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
473 |
elseif teamNameArr[i] == " " then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
474 |
teamComment[i] = "|" |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
475 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
476 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
477 |
|
11937 | 478 |
ShowMission( loc("TechRacer"), |
479 |
loc("Status update"), |
|
480 |
string.format(loc("Rounds complete: %d/%d"), roundNumber, roundLimit) .. "|" .. " " .. "|" .. |
|
481 |
loc("Best team times: ") .. "|" .. totalComment, 0, 4000) |
|
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
482 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
483 |
-- end game if its at round limit |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
484 |
if roundNumber >= roundLimit then |
11940
e1bae42efacd
TechRacer: Show racing times and ranking in stats screen
Wuzzy <almikes@aol.com>
parents:
11939
diff
changeset
|
485 |
-- Sort the scores for the ranking list |
e1bae42efacd
TechRacer: Show racing times and ranking in stats screen
Wuzzy <almikes@aol.com>
parents:
11939
diff
changeset
|
486 |
local unfinishedArray = {} |
e1bae42efacd
TechRacer: Show racing times and ranking in stats screen
Wuzzy <almikes@aol.com>
parents:
11939
diff
changeset
|
487 |
local sortedTeams = {} |
e1bae42efacd
TechRacer: Show racing times and ranking in stats screen
Wuzzy <almikes@aol.com>
parents:
11939
diff
changeset
|
488 |
local k = 1 |
e1bae42efacd
TechRacer: Show racing times and ranking in stats screen
Wuzzy <almikes@aol.com>
parents:
11939
diff
changeset
|
489 |
for i = 0, TeamsCount-1 do |
11942
8fd4926e1e9e
TechRacer: Cleanup mess regarding teams which did not finish
Wuzzy <almikes@aol.com>
parents:
11941
diff
changeset
|
490 |
if teamScore[i] ~= 1000000 and teamNameArr[i] ~= " " then |
11940
e1bae42efacd
TechRacer: Show racing times and ranking in stats screen
Wuzzy <almikes@aol.com>
parents:
11939
diff
changeset
|
491 |
sortedTeams[k] = {} |
e1bae42efacd
TechRacer: Show racing times and ranking in stats screen
Wuzzy <almikes@aol.com>
parents:
11939
diff
changeset
|
492 |
sortedTeams[k].name = teamNameArr[i] |
e1bae42efacd
TechRacer: Show racing times and ranking in stats screen
Wuzzy <almikes@aol.com>
parents:
11939
diff
changeset
|
493 |
sortedTeams[k].score = teamScore[i] |
e1bae42efacd
TechRacer: Show racing times and ranking in stats screen
Wuzzy <almikes@aol.com>
parents:
11939
diff
changeset
|
494 |
k = k + 1 |
e1bae42efacd
TechRacer: Show racing times and ranking in stats screen
Wuzzy <almikes@aol.com>
parents:
11939
diff
changeset
|
495 |
else |
e1bae42efacd
TechRacer: Show racing times and ranking in stats screen
Wuzzy <almikes@aol.com>
parents:
11939
diff
changeset
|
496 |
table.insert(unfinishedArray, string.format(loc("%s did not finish the race."), teamNameArr[i])) |
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
497 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
498 |
end |
11940
e1bae42efacd
TechRacer: Show racing times and ranking in stats screen
Wuzzy <almikes@aol.com>
parents:
11939
diff
changeset
|
499 |
table.sort(sortedTeams, function(team1, team2) return team1.score < team2.score end) |
e1bae42efacd
TechRacer: Show racing times and ranking in stats screen
Wuzzy <almikes@aol.com>
parents:
11939
diff
changeset
|
500 |
|
e1bae42efacd
TechRacer: Show racing times and ranking in stats screen
Wuzzy <almikes@aol.com>
parents:
11939
diff
changeset
|
501 |
-- Write all the stats! |
e1bae42efacd
TechRacer: Show racing times and ranking in stats screen
Wuzzy <almikes@aol.com>
parents:
11939
diff
changeset
|
502 |
|
e1bae42efacd
TechRacer: Show racing times and ranking in stats screen
Wuzzy <almikes@aol.com>
parents:
11939
diff
changeset
|
503 |
for i = 1, #sortedTeams do |
e1bae42efacd
TechRacer: Show racing times and ranking in stats screen
Wuzzy <almikes@aol.com>
parents:
11939
diff
changeset
|
504 |
SendStat(siPointType, loc("milliseconds")) |
e1bae42efacd
TechRacer: Show racing times and ranking in stats screen
Wuzzy <almikes@aol.com>
parents:
11939
diff
changeset
|
505 |
SendStat(siPlayerKills, sortedTeams[i].score, sortedTeams[i].name) |
e1bae42efacd
TechRacer: Show racing times and ranking in stats screen
Wuzzy <almikes@aol.com>
parents:
11939
diff
changeset
|
506 |
end |
e1bae42efacd
TechRacer: Show racing times and ranking in stats screen
Wuzzy <almikes@aol.com>
parents:
11939
diff
changeset
|
507 |
|
e1bae42efacd
TechRacer: Show racing times and ranking in stats screen
Wuzzy <almikes@aol.com>
parents:
11939
diff
changeset
|
508 |
if #sortedTeams >= 1 then |
e1bae42efacd
TechRacer: Show racing times and ranking in stats screen
Wuzzy <almikes@aol.com>
parents:
11939
diff
changeset
|
509 |
SendStat(siGameResult, string.format(loc("%s wins!"), sortedTeams[1].name)) |
e1bae42efacd
TechRacer: Show racing times and ranking in stats screen
Wuzzy <almikes@aol.com>
parents:
11939
diff
changeset
|
510 |
SendStat(siCustomAchievement, string.format(loc("%s wins with a best time of %.1fs."), sortedTeams[1].name, (sortedTeams[1].score/1000))) |
e1bae42efacd
TechRacer: Show racing times and ranking in stats screen
Wuzzy <almikes@aol.com>
parents:
11939
diff
changeset
|
511 |
for i=1,#unfinishedArray do |
e1bae42efacd
TechRacer: Show racing times and ranking in stats screen
Wuzzy <almikes@aol.com>
parents:
11939
diff
changeset
|
512 |
SendStat(siCustomAchievement, unfinishedArray[i]) |
e1bae42efacd
TechRacer: Show racing times and ranking in stats screen
Wuzzy <almikes@aol.com>
parents:
11939
diff
changeset
|
513 |
end |
e1bae42efacd
TechRacer: Show racing times and ranking in stats screen
Wuzzy <almikes@aol.com>
parents:
11939
diff
changeset
|
514 |
else |
e1bae42efacd
TechRacer: Show racing times and ranking in stats screen
Wuzzy <almikes@aol.com>
parents:
11939
diff
changeset
|
515 |
SendStat(siGameResult, loc("Round draw")) |
e1bae42efacd
TechRacer: Show racing times and ranking in stats screen
Wuzzy <almikes@aol.com>
parents:
11939
diff
changeset
|
516 |
SendStat(siCustomAchievement, loc("Nobody managed to finish the race. What a shame!")) |
e1bae42efacd
TechRacer: Show racing times and ranking in stats screen
Wuzzy <almikes@aol.com>
parents:
11939
diff
changeset
|
517 |
SendStat(siCustomAchievement, loc("Maybe you should try an easier TechRacer map.")) |
e1bae42efacd
TechRacer: Show racing times and ranking in stats screen
Wuzzy <almikes@aol.com>
parents:
11939
diff
changeset
|
518 |
end |
e1bae42efacd
TechRacer: Show racing times and ranking in stats screen
Wuzzy <almikes@aol.com>
parents:
11939
diff
changeset
|
519 |
|
12338
6bdabf67a012
Add back the missing winning animation for Racer and TechRecer
Wuzzy <almikes@aol.com>
parents:
12292
diff
changeset
|
520 |
-- Kill all the losers |
6bdabf67a012
Add back the missing winning animation for Racer and TechRecer
Wuzzy <almikes@aol.com>
parents:
12292
diff
changeset
|
521 |
for i = 0, (numhhs-1) do |
6bdabf67a012
Add back the missing winning animation for Racer and TechRecer
Wuzzy <almikes@aol.com>
parents:
12292
diff
changeset
|
522 |
if GetHogClan(hhs[i]) ~= bestClan then |
6bdabf67a012
Add back the missing winning animation for Racer and TechRecer
Wuzzy <almikes@aol.com>
parents:
12292
diff
changeset
|
523 |
SetEffect(hhs[i], heResurrectable, 0) |
6bdabf67a012
Add back the missing winning animation for Racer and TechRecer
Wuzzy <almikes@aol.com>
parents:
12292
diff
changeset
|
524 |
SetHealth(hhs[i],0) |
6bdabf67a012
Add back the missing winning animation for Racer and TechRecer
Wuzzy <almikes@aol.com>
parents:
12292
diff
changeset
|
525 |
end |
6bdabf67a012
Add back the missing winning animation for Racer and TechRecer
Wuzzy <almikes@aol.com>
parents:
12292
diff
changeset
|
526 |
end |
6bdabf67a012
Add back the missing winning animation for Racer and TechRecer
Wuzzy <almikes@aol.com>
parents:
12292
diff
changeset
|
527 |
|
6bdabf67a012
Add back the missing winning animation for Racer and TechRecer
Wuzzy <almikes@aol.com>
parents:
12292
diff
changeset
|
528 |
gameOver = true |
12969
a5c5fe878a4e
Racer, TechRacer: Fade out waypoints at the end
Wuzzy <Wuzzy2@mail.ru>
parents:
12968
diff
changeset
|
529 |
for i=0, wpCount-1 do |
a5c5fe878a4e
Racer, TechRacer: Fade out waypoints at the end
Wuzzy <Wuzzy2@mail.ru>
parents:
12968
diff
changeset
|
530 |
-- Fade out waypoints |
a5c5fe878a4e
Racer, TechRacer: Fade out waypoints at the end
Wuzzy <Wuzzy2@mail.ru>
parents:
12968
diff
changeset
|
531 |
SetVisualGearValues(wpCirc[i], nil, nil, 0, 0, nil, 6) |
a5c5fe878a4e
Racer, TechRacer: Fade out waypoints at the end
Wuzzy <Wuzzy2@mail.ru>
parents:
12968
diff
changeset
|
532 |
end |
12338
6bdabf67a012
Add back the missing winning animation for Racer and TechRecer
Wuzzy <almikes@aol.com>
parents:
12292
diff
changeset
|
533 |
EndTurn(true) |
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
534 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
535 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
536 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
537 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
538 |
function CheckForNewRound() |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
539 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
540 |
------------- |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
541 |
------ new |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
542 |
------------- |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
543 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
544 |
--[[turnN = turnN + 1 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
545 |
if gameBegun == false then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
546 |
if turnN == 2 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
547 |
for i = 0, (numhhs-1) do |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
548 |
if hhs[i] ~= nil then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
549 |
SetEffect(hhs[i], heResurrectable, 0) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
550 |
SetHealth(hhs[i],0) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
551 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
552 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
553 |
gameOver = true |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
554 |
TurnTimeLeft = 1 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
555 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
556 |
else |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
557 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
558 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
559 |
end]] |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
560 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
561 |
--[[if roundBegun == true then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
562 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
563 |
if RoundHasChanged == true then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
564 |
roundN = roundN + 1 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
565 |
RoundHasChanged = false |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
566 |
onNewRound() |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
567 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
568 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
569 |
if lastRound ~= TotalRounds then -- new round, but not really |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
570 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
571 |
if RoundHasChanged == false then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
572 |
RoundHasChanged = true |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
573 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
574 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
575 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
576 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
577 |
AddCaption("RoundN:" .. roundN .. "; " .. "TR: " .. TotalRounds) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
578 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
579 |
lastRound = TotalRounds |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
580 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
581 |
end]] |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
582 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
583 |
------------ |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
584 |
----- old |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
585 |
------------ |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
586 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
587 |
if GetHogClan(CurrentHedgehog) == firstClan then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
588 |
onNewRound() |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
589 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
590 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
591 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
592 |
|
12292
faf1b93422ba
Use new EndTurn in a couple of scripts, esp. to fix timeout taunts in Racer
Wuzzy <almikes@aol.com>
parents:
12084
diff
changeset
|
593 |
function DisableTumbler(endTurn) |
faf1b93422ba
Use new EndTurn in a couple of scripts, esp. to fix timeout taunts in Racer
Wuzzy <almikes@aol.com>
parents:
12084
diff
changeset
|
594 |
if endTurn == nil then endTurn = true end |
faf1b93422ba
Use new EndTurn in a couple of scripts, esp. to fix timeout taunts in Racer
Wuzzy <almikes@aol.com>
parents:
12084
diff
changeset
|
595 |
if racerActive then |
faf1b93422ba
Use new EndTurn in a couple of scripts, esp. to fix timeout taunts in Racer
Wuzzy <almikes@aol.com>
parents:
12084
diff
changeset
|
596 |
currCount = 0 |
faf1b93422ba
Use new EndTurn in a couple of scripts, esp. to fix timeout taunts in Racer
Wuzzy <almikes@aol.com>
parents:
12084
diff
changeset
|
597 |
fastIndex = 0 |
faf1b93422ba
Use new EndTurn in a couple of scripts, esp. to fix timeout taunts in Racer
Wuzzy <almikes@aol.com>
parents:
12084
diff
changeset
|
598 |
racerActive = false -- newadd |
faf1b93422ba
Use new EndTurn in a couple of scripts, esp. to fix timeout taunts in Racer
Wuzzy <almikes@aol.com>
parents:
12084
diff
changeset
|
599 |
if endTurn then |
faf1b93422ba
Use new EndTurn in a couple of scripts, esp. to fix timeout taunts in Racer
Wuzzy <almikes@aol.com>
parents:
12084
diff
changeset
|
600 |
EndTurn(true) |
faf1b93422ba
Use new EndTurn in a couple of scripts, esp. to fix timeout taunts in Racer
Wuzzy <almikes@aol.com>
parents:
12084
diff
changeset
|
601 |
end |
12969
a5c5fe878a4e
Racer, TechRacer: Fade out waypoints at the end
Wuzzy <Wuzzy2@mail.ru>
parents:
12968
diff
changeset
|
602 |
if trackFinished and not gameOver then |
12968
544c4302efe4
Racer, TechRacer: Change waypoint opacity on victory or failure
Wuzzy <Wuzzy2@mail.ru>
parents:
12967
diff
changeset
|
603 |
for i=0, wpCount-1 do |
544c4302efe4
Racer, TechRacer: Change waypoint opacity on victory or failure
Wuzzy <Wuzzy2@mail.ru>
parents:
12967
diff
changeset
|
604 |
SetVisualGearValues(wpCirc[i], nil, nil, 255, 255, nil, 2) |
544c4302efe4
Racer, TechRacer: Change waypoint opacity on victory or failure
Wuzzy <Wuzzy2@mail.ru>
parents:
12967
diff
changeset
|
605 |
end |
12969
a5c5fe878a4e
Racer, TechRacer: Fade out waypoints at the end
Wuzzy <Wuzzy2@mail.ru>
parents:
12968
diff
changeset
|
606 |
elseif not gameOver then |
12968
544c4302efe4
Racer, TechRacer: Change waypoint opacity on victory or failure
Wuzzy <Wuzzy2@mail.ru>
parents:
12967
diff
changeset
|
607 |
for i=0, wpCount-1 do |
544c4302efe4
Racer, TechRacer: Change waypoint opacity on victory or failure
Wuzzy <Wuzzy2@mail.ru>
parents:
12967
diff
changeset
|
608 |
SetVisualGearValues(wpCirc[i], nil, nil, 32, 32, nil, 1) |
544c4302efe4
Racer, TechRacer: Change waypoint opacity on victory or failure
Wuzzy <Wuzzy2@mail.ru>
parents:
12967
diff
changeset
|
609 |
end |
544c4302efe4
Racer, TechRacer: Change waypoint opacity on victory or failure
Wuzzy <Wuzzy2@mail.ru>
parents:
12967
diff
changeset
|
610 |
end |
12292
faf1b93422ba
Use new EndTurn in a couple of scripts, esp. to fix timeout taunts in Racer
Wuzzy <almikes@aol.com>
parents:
12084
diff
changeset
|
611 |
end |
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
612 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
613 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
614 |
function HandleGhost() |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
615 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
616 |
-- get the current xy of the racer at this point |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
617 |
currX[currCount] = GetX(CurrentHedgehog) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
618 |
currY[currCount] = GetY(CurrentHedgehog) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
619 |
currCount = currCount + 1 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
620 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
621 |
-- draw a ping of smoke where the fastest player was at this point |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
622 |
if (fastCount ~= 0) and (fastIndex < fastCount) then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
623 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
624 |
fastIndex = fastIndex + 1 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
625 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
626 |
tempE = AddVisualGear(fastX[fastIndex], fastY[fastIndex], vgtSmoke, 0, false) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
627 |
g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(tempE) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
628 |
SetVisualGearValues(tempE, g1, g2, g3, g4, g5, g6, g7, g8, g9, fastColour ) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
629 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
630 |
--AddCaption("fC: " .. fastIndex .. " / " .. fastCount) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
631 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
632 |
else |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
633 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
634 |
--AddCaption("excep fC: " .. fastIndex .. " / " .. fastCount) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
635 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
636 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
637 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
638 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
639 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
640 |
function BoomGirder(x,y,rot) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
641 |
girTime = 1 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
642 |
if rot < 4 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
643 |
AddGear(x, y, gtGrenade, 0, 0, 0, girTime) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
644 |
elseif rot == 4 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
645 |
g = AddGear(x-45, y, gtGrenade, 0, 0, 0, girTime) -- needed? |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
646 |
g = AddGear(x-30, y, gtGrenade, 0, 0, 0, girTime) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
647 |
g = AddGear(x, y, gtGrenade, 0, 0, 0, girTime) -- needed? |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
648 |
g = AddGear(x+30, y, gtGrenade, 0, 0, 0, girTime) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
649 |
g = AddGear(x+45, y, gtGrenade, 0, 0, 0, girTime) -- needed? |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
650 |
elseif rot == 5 then ------- diag |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
651 |
g = AddGear(x+45, y+45, gtGrenade, 0, 0, 0, girTime) --n |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
652 |
g = AddGear(x+30, y+30, gtGrenade, 0, 0, 0, girTime) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
653 |
g = AddGear(x, y, gtGrenade, 0, 0, 0, girTime) -- needed? |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
654 |
g = AddGear(x-30, y-30, gtGrenade, 0, 0, 0, girTime) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
655 |
g = AddGear(x-45, y-45, gtGrenade, 0, 0, 0, girTime) --n |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
656 |
elseif rot == 6 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
657 |
g = AddGear(x, y-45, gtGrenade, 0, 0, 0, girTime) -- needed? |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
658 |
g = AddGear(x, y+30, gtGrenade, 0, 0, 0, girTime) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
659 |
g = AddGear(x, y, gtGrenade, 0, 0, 0, girTime) -- needed? |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
660 |
g = AddGear(x, y-30, gtGrenade, 0, 0, 0, girTime) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
661 |
g = AddGear(x, y+45, gtGrenade, 0, 0, 0, girTime) -- needed? |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
662 |
elseif rot == 7 then ------- |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
663 |
g = AddGear(x+45, y-45, gtGrenade, 0, 0, 0, girTime) --n |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
664 |
g = AddGear(x+30, y-30, gtGrenade, 0, 0, 0, girTime) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
665 |
g = AddGear(x, y, gtGrenade, 0, 0, 0, girTime) -- needed? |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
666 |
g = AddGear(x-30, y+30, gtGrenade, 0, 0, 0, girTime) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
667 |
g = AddGear(x-45, y+45, gtGrenade, 0, 0, 0, girTime) --n |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
668 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
669 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
670 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
671 |
function RemoveGear(gear) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
672 |
if (isATrackedGear(gear) == true) and (GetGearType(gear) ~= gtHedgehog) then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
673 |
DeleteGear(gear) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
674 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
675 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
676 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
677 |
function ClearMap() |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
678 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
679 |
runOnGears(RemoveGear) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
680 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
681 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
682 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
683 |
function CallBob(x,y) |
12969
a5c5fe878a4e
Racer, TechRacer: Fade out waypoints at the end
Wuzzy <Wuzzy2@mail.ru>
parents:
12968
diff
changeset
|
684 |
if not racerActive and not gameOver then |
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
685 |
if wpCount == 0 or wpX[wpCount - 1] ~= x or wpY[wpCount - 1] ~= y then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
686 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
687 |
wpX[wpCount] = x |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
688 |
wpY[wpCount] = y |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
689 |
wpCol[wpCount] = 0xffffffff |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
690 |
wpCirc[wpCount] = AddVisualGear(wpX[wpCount],wpY[wpCount],vgtCircle,0,true) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
691 |
|
12971
b543d767fed3
Make first waypoint flash TechRacer, before hog starts racing
Wuzzy <Wuzzy2@mail.ru>
parents:
12969
diff
changeset
|
692 |
local minO, maxO, flashing = FlashingHelper(wpCount) |
b543d767fed3
Make first waypoint flash TechRacer, before hog starts racing
Wuzzy <Wuzzy2@mail.ru>
parents:
12969
diff
changeset
|
693 |
-- Make first waypoint flash very noticably before the hog starts racing |
b543d767fed3
Make first waypoint flash TechRacer, before hog starts racing
Wuzzy <Wuzzy2@mail.ru>
parents:
12969
diff
changeset
|
694 |
SetVisualGearValues(wpCirc[wpCount], wpX[wpCount], wpY[wpCount], minO, maxO, 1, flashing, 0, wpRad, 5, wpCol[wpCount]) |
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
695 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
696 |
wpCount = wpCount + 1 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
697 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
698 |
--AddCaption(loc("Waypoint placed.") .. " " .. loc("Available points remaining: ") .. (wpLimit-wpCount)) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
699 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
700 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
701 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
702 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
703 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
704 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
705 |
function HandleFreshMapCreation() |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
706 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
707 |
-- the boom stage, boom girders, reset ammo, and delete other map objects |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
708 |
if activationStage == 1 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
709 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
710 |
ClearMap() |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
711 |
activationStage = activationStage + 1 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
712 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
713 |
-- the creation stage, place girders and needed gears, grant ammo |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
714 |
elseif activationStage == 2 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
715 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
716 |
InterpretPoints() |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
717 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
718 |
-- these are from onParameters() |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
719 |
if (mapID == nil) or (mapID == 0) then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
720 |
LoadMap(2000) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
721 |
else |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
722 |
LoadMap(mapID) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
723 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
724 |
|
12969
a5c5fe878a4e
Racer, TechRacer: Fade out waypoints at the end
Wuzzy <Wuzzy2@mail.ru>
parents:
12968
diff
changeset
|
725 |
if gameOver then |
a5c5fe878a4e
Racer, TechRacer: Fade out waypoints at the end
Wuzzy <Wuzzy2@mail.ru>
parents:
12968
diff
changeset
|
726 |
for i = 0,(wpCount-1) do |
a5c5fe878a4e
Racer, TechRacer: Fade out waypoints at the end
Wuzzy <Wuzzy2@mail.ru>
parents:
12968
diff
changeset
|
727 |
SetVisualGearValues(wpCirc[wpCount], wpX[wpCount], wpY[wpCount], 164, 224, 1, 10, 0, wpRad, 5, wpCol[wpCount]) |
a5c5fe878a4e
Racer, TechRacer: Fade out waypoints at the end
Wuzzy <Wuzzy2@mail.ru>
parents:
12968
diff
changeset
|
728 |
end |
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
729 |
|
12969
a5c5fe878a4e
Racer, TechRacer: Fade out waypoints at the end
Wuzzy <Wuzzy2@mail.ru>
parents:
12968
diff
changeset
|
730 |
else |
a5c5fe878a4e
Racer, TechRacer: Fade out waypoints at the end
Wuzzy <Wuzzy2@mail.ru>
parents:
12968
diff
changeset
|
731 |
for i = 0,(wpCount-1) do |
a5c5fe878a4e
Racer, TechRacer: Fade out waypoints at the end
Wuzzy <Wuzzy2@mail.ru>
parents:
12968
diff
changeset
|
732 |
DeleteVisualGear(wpCirc[i]) |
a5c5fe878a4e
Racer, TechRacer: Fade out waypoints at the end
Wuzzy <Wuzzy2@mail.ru>
parents:
12968
diff
changeset
|
733 |
end |
a5c5fe878a4e
Racer, TechRacer: Fade out waypoints at the end
Wuzzy <Wuzzy2@mail.ru>
parents:
12968
diff
changeset
|
734 |
wpCount = 0 |
a5c5fe878a4e
Racer, TechRacer: Fade out waypoints at the end
Wuzzy <Wuzzy2@mail.ru>
parents:
12968
diff
changeset
|
735 |
|
a5c5fe878a4e
Racer, TechRacer: Fade out waypoints at the end
Wuzzy <Wuzzy2@mail.ru>
parents:
12968
diff
changeset
|
736 |
for i = 1, techCount-1 do |
a5c5fe878a4e
Racer, TechRacer: Fade out waypoints at the end
Wuzzy <Wuzzy2@mail.ru>
parents:
12968
diff
changeset
|
737 |
CallBob(techX[i],techY[i]) |
a5c5fe878a4e
Racer, TechRacer: Fade out waypoints at the end
Wuzzy <Wuzzy2@mail.ru>
parents:
12968
diff
changeset
|
738 |
end |
a5c5fe878a4e
Racer, TechRacer: Fade out waypoints at the end
Wuzzy <Wuzzy2@mail.ru>
parents:
12968
diff
changeset
|
739 |
end |
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
740 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
741 |
activationStage = 200 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
742 |
--runOnHogs(RestoreHog) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
743 |
|
12394
605a7c85a798
Mention overwritten fuel in ammo description of UFO in TechRacer
Wuzzy <almikes@aol.com>
parents:
12393
diff
changeset
|
744 |
if ufoFuel == 2000 then |
605a7c85a798
Mention overwritten fuel in ammo description of UFO in TechRacer
Wuzzy <almikes@aol.com>
parents:
12393
diff
changeset
|
745 |
SetAmmoDescriptionAppendix(amJetpack, loc("On this map you get infinite fuel.")) |
605a7c85a798
Mention overwritten fuel in ammo description of UFO in TechRacer
Wuzzy <almikes@aol.com>
parents:
12393
diff
changeset
|
746 |
elseif ufoFuel ~= nil and ufoFuel ~= 0 then |
605a7c85a798
Mention overwritten fuel in ammo description of UFO in TechRacer
Wuzzy <almikes@aol.com>
parents:
12393
diff
changeset
|
747 |
SetAmmoDescriptionAppendix(amJetpack, string.format(loc("On this map you get %d%% fuel."), div(ufoFuel, 20))) |
605a7c85a798
Mention overwritten fuel in ammo description of UFO in TechRacer
Wuzzy <almikes@aol.com>
parents:
12393
diff
changeset
|
748 |
end |
605a7c85a798
Mention overwritten fuel in ammo description of UFO in TechRacer
Wuzzy <almikes@aol.com>
parents:
12393
diff
changeset
|
749 |
|
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
750 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
751 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
752 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
753 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
754 |
function TryRepositionHogs() |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
755 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
756 |
if MapHasBorder() == true then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
757 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
758 |
for i = 0, (numhhs-1) do |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
759 |
if hhs[i] ~= nil then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
760 |
SetGearPosition(hhs[i],GetX(hhs[i]), TopY-10) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
761 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
762 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
763 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
764 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
765 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
766 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
767 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
768 |
---------------------------------- |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
769 |
-- GAME METHODS / EVENT HANDLERS |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
770 |
---------------------------------- |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
771 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
772 |
function onParameters() |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
773 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
774 |
parseParams() |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
775 |
mapID = tonumber(params["m"]) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
776 |
|
10979 | 777 |
--ufoFuel = tonumber(params["ufoFuel"]) |
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
778 |
roundLimit = tonumber(params["rounds"]) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
779 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
780 |
if (roundLimit == 0) or (roundLimit == nil) then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
781 |
roundLimit = 3 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
782 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
783 |
|
10967
1434cec96ca3
- preview generation for rubbers, air-mines, crates, barrels
mikade <redgrinner@gmail.com>
parents:
10961
diff
changeset
|
784 |
if mapID == nil then |
1434cec96ca3
- preview generation for rubbers, air-mines, crates, barrels
mikade <redgrinner@gmail.com>
parents:
10961
diff
changeset
|
785 |
mapID = 2 + GetRandom(7) |
1434cec96ca3
- preview generation for rubbers, air-mines, crates, barrels
mikade <redgrinner@gmail.com>
parents:
10961
diff
changeset
|
786 |
end |
1434cec96ca3
- preview generation for rubbers, air-mines, crates, barrels
mikade <redgrinner@gmail.com>
parents:
10961
diff
changeset
|
787 |
|
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
788 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
789 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
790 |
function onGameInit() |
11550
86528b0cd491
detectMap() rewrite with more sane approach, also check waypoints placement to avoid cheating
unc0rr
parents:
11547
diff
changeset
|
791 |
if mapID == nil then |
86528b0cd491
detectMap() rewrite with more sane approach, also check waypoints placement to avoid cheating
unc0rr
parents:
11547
diff
changeset
|
792 |
mapID = 2 + GetRandom(7) |
86528b0cd491
detectMap() rewrite with more sane approach, also check waypoints placement to avoid cheating
unc0rr
parents:
11547
diff
changeset
|
793 |
end |
11012
91cc6aef818c
tentative/lazy fixes for unC0Rr's evil
mikade <redgrinner@gmail.com>
parents:
10979
diff
changeset
|
794 |
|
11551 | 795 |
addHashData(mapID) |
796 |
||
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
797 |
Theme = "Cave" |
11939
c17e5ac9f76d
Force TechRacer maps when image map is selected. Fixes Google Code issue #882
Wuzzy <almikes@aol.com>
parents:
11938
diff
changeset
|
798 |
Map = "" |
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
799 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
800 |
MapGen = mgDrawn |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
801 |
TemplateFilter = 0 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
802 |
|
10967
1434cec96ca3
- preview generation for rubbers, air-mines, crates, barrels
mikade <redgrinner@gmail.com>
parents:
10961
diff
changeset
|
803 |
EnableGameFlags(gfInfAttack, gfDisableWind, gfBorder) |
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
804 |
DisableGameFlags(gfSolidLand) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
805 |
CaseFreq = 0 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
806 |
TurnTime = 90000 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
807 |
WaterRise = 0 |
12084
8f222872d432
Disable SD for a couple of scripts and mission maps
Wuzzy <almikes@aol.com>
parents:
11942
diff
changeset
|
808 |
HealthDecrease = 0 |
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
809 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
810 |
for x = 1, 16 do |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
811 |
AddPoint(x*100,100,5) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
812 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
813 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
814 |
FlushPoints() |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
815 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
816 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
817 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
818 |
function limitHogs(gear) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
819 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
820 |
cnthhs = cnthhs + 1 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
821 |
if cnthhs > 1 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
822 |
DeleteGear(gear) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
823 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
824 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
825 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
826 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
827 |
function onSpecialPoint(x,y,flag) |
11568 | 828 |
if flag == 99 then |
829 |
fastX[fastCount] = x |
|
830 |
fastY[fastCount] = y |
|
831 |
fastCount = fastCount + 1 |
|
11588 | 832 |
elseif flag == 0 then |
11587 | 833 |
techX[techCount], techY[techCount] = x, y |
834 |
techCount = techCount + 1 |
|
11568 | 835 |
else |
836 |
addHashData(x) |
|
837 |
addHashData(y) |
|
838 |
addHashData(flag) |
|
839 |
specialPointsX[specialPointsCount] = x |
|
840 |
specialPointsY[specialPointsCount] = y |
|
841 |
specialPointsFlag[specialPointsCount] = flag |
|
842 |
specialPointsCount = specialPointsCount + 1 |
|
843 |
end |
|
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
844 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
845 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
846 |
function InterpretPoints() |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
847 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
848 |
-- flags run from 0 to 127 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
849 |
for i = 0, (specialPointsCount-1) do |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
850 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
851 |
-- Mines |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
852 |
if specialPointsFlag[i] == 1 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
853 |
SetTimer(AddGear(specialPointsX[i], specialPointsY[i], gtMine, 0, 0, 0, 0), 1) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
854 |
elseif specialPointsFlag[i] == 2 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
855 |
SetTimer(AddGear(specialPointsX[i], specialPointsY[i], gtMine, 0, 0, 0, 0), 1000) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
856 |
elseif specialPointsFlag[i] == 3 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
857 |
SetTimer(AddGear(specialPointsX[i], specialPointsY[i], gtMine, 0, 0, 0, 0), 2000) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
858 |
elseif specialPointsFlag[i] == 4 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
859 |
SetTimer(AddGear(specialPointsX[i], specialPointsY[i], gtMine, 0, 0, 0, 0), 3000) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
860 |
elseif specialPointsFlag[i] == 5 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
861 |
SetTimer(AddGear(specialPointsX[i], specialPointsY[i], gtMine, 0, 0, 0, 0), 4000) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
862 |
elseif specialPointsFlag[i] == 6 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
863 |
SetTimer(AddGear(specialPointsX[i], specialPointsY[i], gtMine, 0, 0, 0, 0), 5000) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
864 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
865 |
-- Sticky Mines |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
866 |
elseif specialPointsFlag[i] == 7 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
867 |
AddGear(specialPointsX[i], specialPointsY[i], gtSMine, 0, 0, 0, 0) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
868 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
869 |
-- Air Mines |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
870 |
elseif specialPointsFlag[i] == 8 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
871 |
AddGear(specialPointsX[i], specialPointsY[i], gtAirMine, 0, 0, 0, 0) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
872 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
873 |
-- Health Crates |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
874 |
elseif specialPointsFlag[i] == 9 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
875 |
SetHealth(SpawnHealthCrate(specialPointsX[i],specialPointsY[i]),25) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
876 |
elseif specialPointsFlag[i] == 10 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
877 |
SetHealth(SpawnHealthCrate(specialPointsX[i],specialPointsY[i]),50) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
878 |
elseif specialPointsFlag[i] == 11 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
879 |
SetHealth(SpawnHealthCrate(specialPointsX[i],specialPointsY[i]),75) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
880 |
elseif specialPointsFlag[i] == 12 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
881 |
SetHealth(SpawnHealthCrate(specialPointsX[i],specialPointsY[i]),100) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
882 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
883 |
-- Cleaver |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
884 |
elseif specialPointsFlag[i] == 13 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
885 |
AddGear(specialPointsX[i], specialPointsY[i], gtKnife, 0, 0, 0, 0) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
886 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
887 |
-- Target |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
888 |
elseif specialPointsFlag[i] == 14 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
889 |
AddGear(specialPointsX[i], specialPointsY[i], gtTarget, 0, 0, 0, 0) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
890 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
891 |
--Barrels |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
892 |
elseif specialPointsFlag[i] == 15 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
893 |
SetHealth(AddGear(specialPointsX[i], specialPointsY[i], gtExplosives, 0, 0, 0, 0),1) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
894 |
elseif specialPointsFlag[i] == 16 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
895 |
SetHealth(AddGear(specialPointsX[i], specialPointsY[i], gtExplosives, 0, 0, 0, 0),25) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
896 |
elseif specialPointsFlag[i] == 17 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
897 |
SetHealth(AddGear(specialPointsX[i], specialPointsY[i], gtExplosives, 0, 0, 0, 0),50) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
898 |
elseif specialPointsFlag[i] == 18 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
899 |
SetHealth(AddGear(specialPointsX[i], specialPointsY[i], gtExplosives, 0, 0, 0, 0),75) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
900 |
elseif specialPointsFlag[i] == 19 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
901 |
SetHealth(AddGear(specialPointsX[i], specialPointsY[i], gtExplosives, 0, 0, 0, 0),100) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
902 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
903 |
-- There are about 58+- weps / utils |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
904 |
-- Weapon Crates |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
905 |
elseif (specialPointsFlag[i] >= 20) and (specialPointsFlag[i] < (#atkArray+20)) then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
906 |
SpawnAmmoCrate(specialPointsX[i],specialPointsY[i],atkArray[specialPointsFlag[i]-19][1]) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
907 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
908 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
909 |
-- Utility Crates |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
910 |
elseif (specialPointsFlag[i] >= (#atkArray+20)) and (specialPointsFlag[i] < (#atkArray+20+#utilArray)) then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
911 |
SpawnUtilityCrate(specialPointsX[i],specialPointsY[i],utilArray[specialPointsFlag[i]-19-#atkArray][1]) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
912 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
913 |
--79-82 (reserved for future wep crates) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
914 |
--89,88,87,86 and 85,84,83,82 (reserved for the 2 custom sprites and their landflags) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
915 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
916 |
--90-99 reserved for scripted structures |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
917 |
--[[elseif specialPointsFlag[i] == 90 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
918 |
--PlaceStruc("generator") |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
919 |
elseif specialPointsFlag[i] == 91 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
920 |
--PlaceStruc("healingstation") |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
921 |
elseif specialPointsFlag[i] == 92 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
922 |
--PlaceStruc("respawner") |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
923 |
elseif specialPointsFlag[i] == 93 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
924 |
--PlaceStruc("teleportationnode") |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
925 |
elseif specialPointsFlag[i] == 94 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
926 |
--PlaceStruc("biofilter") |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
927 |
elseif specialPointsFlag[i] == 95 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
928 |
--PlaceStruc("supportstation") |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
929 |
elseif specialPointsFlag[i] == 96 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
930 |
--PlaceStruc("constructionstation") |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
931 |
elseif specialPointsFlag[i] == 97 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
932 |
--PlaceStruc("reflectorshield") |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
933 |
elseif specialPointsFlag[i] == 98 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
934 |
--PlaceStruc("weaponfilter")]] |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
935 |
|
10979 | 936 |
elseif specialPointsFlag[i] == 98 then |
937 |
portalDistance = specialPointsX[i] |
|
938 |
ufoFuel = specialPointsY[i] |
|
939 |
||
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
940 |
-- Normal Girders |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
941 |
elseif specialPointsFlag[i] == 100 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
942 |
PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 0, 4294967295, nil, nil, nil, lfNormal) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
943 |
elseif specialPointsFlag[i] == 101 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
944 |
PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 1, 4294967295, nil, nil, nil, lfNormal) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
945 |
elseif specialPointsFlag[i] == 102 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
946 |
PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 2, 4294967295, nil, nil, nil, lfNormal) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
947 |
elseif specialPointsFlag[i] == 103 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
948 |
PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 3, 4294967295, nil, nil, nil, lfNormal) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
949 |
elseif specialPointsFlag[i] == 104 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
950 |
PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 4, 4294967295, nil, nil, nil, lfNormal) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
951 |
elseif specialPointsFlag[i] == 105 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
952 |
PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 5, 4294967295, nil, nil, nil, lfNormal) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
953 |
elseif specialPointsFlag[i] == 106 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
954 |
PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 6, 4294967295, nil, nil, nil, lfNormal) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
955 |
elseif specialPointsFlag[i] == 107 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
956 |
PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 7, 4294967295, nil, nil, nil, lfNormal) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
957 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
958 |
-- Invulnerable Girders |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
959 |
elseif specialPointsFlag[i] == 108 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
960 |
PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 0, 2516582650, nil, nil, nil, lfIndestructible) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
961 |
elseif specialPointsFlag[i] == 109 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
962 |
PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 1, 2516582650, nil, nil, nil, lfIndestructible) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
963 |
elseif specialPointsFlag[i] == 110 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
964 |
PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 2, 2516582650, nil, nil, nil, lfIndestructible) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
965 |
elseif specialPointsFlag[i] == 111 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
966 |
PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 3, 2516582650, nil, nil, nil, lfIndestructible) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
967 |
elseif specialPointsFlag[i] == 112 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
968 |
PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 4, 2516582650, nil, nil, nil, lfIndestructible) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
969 |
elseif specialPointsFlag[i] == 113 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
970 |
PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 5, 2516582650, nil, nil, nil, lfIndestructible) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
971 |
elseif specialPointsFlag[i] == 114 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
972 |
PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 6, 2516582650, nil, nil, nil, lfIndestructible) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
973 |
elseif specialPointsFlag[i] == 115 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
974 |
PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 7, 2516582650, nil, nil, nil, lfIndestructible) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
975 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
976 |
-- Icy Girders |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
977 |
elseif specialPointsFlag[i] == 116 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
978 |
PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 0, 16448250, nil, nil, nil, lfIce) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
979 |
elseif specialPointsFlag[i] == 117 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
980 |
PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 1, 16448250, nil, nil, nil, lfIce) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
981 |
elseif specialPointsFlag[i] == 118 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
982 |
PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 2, 16448250, nil, nil, nil, lfIce) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
983 |
elseif specialPointsFlag[i] == 119 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
984 |
PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 3, 16448250, nil, nil, nil, lfIce) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
985 |
elseif specialPointsFlag[i] == 120 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
986 |
PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 4, 16448250, nil, nil, nil, lfIce) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
987 |
elseif specialPointsFlag[i] == 121 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
988 |
PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 5, 16448250, nil, nil, nil, lfIce) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
989 |
elseif specialPointsFlag[i] == 121 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
990 |
PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 6, 16448250, nil, nil, nil, lfIce) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
991 |
elseif specialPointsFlag[i] == 123 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
992 |
PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmGirder, 7, 16448250, nil, nil, nil, lfIce) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
993 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
994 |
-- Rubber Bands |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
995 |
elseif specialPointsFlag[i] == 124 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
996 |
PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmRubber, 0, 4294967295, nil, nil, nil, lfBouncy) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
997 |
elseif specialPointsFlag[i] == 125 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
998 |
PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmRubber, 1, 4294967295, nil, nil, nil, lfBouncy) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
999 |
elseif specialPointsFlag[i] == 126 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1000 |
PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmRubber, 2, 4294967295, nil, nil, nil, lfBouncy) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1001 |
elseif specialPointsFlag[i] == 127 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1002 |
PlaceSprite(specialPointsX[i], specialPointsY[i], sprAmRubber, 3, 4294967295, nil, nil, nil, lfBouncy) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1003 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1004 |
-- Waypoints |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1005 |
else -- 0 / no value |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1006 |
CallBob(specialPointsX[i], specialPointsY[i]) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1007 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1008 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1009 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1010 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1011 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1012 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1013 |
function onGameStart() |
12338
6bdabf67a012
Add back the missing winning animation for Racer and TechRecer
Wuzzy <almikes@aol.com>
parents:
12292
diff
changeset
|
1014 |
SendGameResultOff() |
6bdabf67a012
Add back the missing winning animation for Racer and TechRecer
Wuzzy <almikes@aol.com>
parents:
12292
diff
changeset
|
1015 |
SendRankingStatsOff() |
6bdabf67a012
Add back the missing winning animation for Racer and TechRecer
Wuzzy <almikes@aol.com>
parents:
12292
diff
changeset
|
1016 |
SendAchievementsStatsOff() |
11940
e1bae42efacd
TechRacer: Show racing times and ranking in stats screen
Wuzzy <almikes@aol.com>
parents:
11939
diff
changeset
|
1017 |
SendHealthStatsOff() |
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1018 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1019 |
trackTeams() |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1020 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1021 |
roundN = 0 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1022 |
lastRound = TotalRounds |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1023 |
RoundHasChanged = false -- true |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1024 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1025 |
RebuildTeamInfo() |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1026 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1027 |
for i=0 , TeamsCount - 1 do |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1028 |
cnthhs = 0 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1029 |
runOnHogsInTeam(limitHogs, teamNameArr[i]) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1030 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1031 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1032 |
ShowMission ( |
11937 | 1033 |
loc("TechRacer"), |
1034 |
loc("A Hedgewars mini-game"), |
|
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1035 |
|
11937 | 1036 |
loc("Complete the track as fast as you can!") .. "|" .. |
1037 |
loc("Round limit:") .. " " .. roundLimit .. "|" .. |
|
1038 |
loc("You can further customize the race by changing the scheme script paramater.") .. "|" .. |
|
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1039 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1040 |
"", 4, 4000 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1041 |
) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1042 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1043 |
TryRepositionHogs() |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1044 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1045 |
activationStage = 2 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1046 |
HandleFreshMapCreation() |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1047 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1048 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1049 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1050 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1051 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1052 |
function onNewTurn() |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1053 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1054 |
CheckForNewRound() |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1055 |
TryRepositionHogs() |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1056 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1057 |
racerActive = false |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1058 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1059 |
activationStage = 1 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1060 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1061 |
--AddAmmo(CurrentHedgehog, amBazooka, 100) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1062 |
--AddAmmo(CurrentHedgehog, amJetpack, 100) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1063 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1064 |
--ClearMap() |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1065 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1066 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1067 |
trackTime = 0 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1068 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1069 |
currCount = 0 -- hopefully this solves problem |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1070 |
-- AddAmmo(CurrentHedgehog, amAirAttack, 0) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1071 |
gTimer = 0 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1072 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1073 |
-- Set the waypoints to unactive on new round |
12969
a5c5fe878a4e
Racer, TechRacer: Fade out waypoints at the end
Wuzzy <Wuzzy2@mail.ru>
parents:
12968
diff
changeset
|
1074 |
if not gameOver then |
a5c5fe878a4e
Racer, TechRacer: Fade out waypoints at the end
Wuzzy <Wuzzy2@mail.ru>
parents:
12968
diff
changeset
|
1075 |
for i = 0,(wpCount-1) do |
a5c5fe878a4e
Racer, TechRacer: Fade out waypoints at the end
Wuzzy <Wuzzy2@mail.ru>
parents:
12968
diff
changeset
|
1076 |
wpActive[i] = false |
a5c5fe878a4e
Racer, TechRacer: Fade out waypoints at the end
Wuzzy <Wuzzy2@mail.ru>
parents:
12968
diff
changeset
|
1077 |
wpCol[i] = 0xffffffff |
12971
b543d767fed3
Make first waypoint flash TechRacer, before hog starts racing
Wuzzy <Wuzzy2@mail.ru>
parents:
12969
diff
changeset
|
1078 |
local minO, maxO, flashing = FlashingHelper(i) |
b543d767fed3
Make first waypoint flash TechRacer, before hog starts racing
Wuzzy <Wuzzy2@mail.ru>
parents:
12969
diff
changeset
|
1079 |
SetVisualGearValues(wpCirc[i], wpX[i], wpY[i], minO, maxO, 1, flashing, 0, wpRad, 5, wpCol[i]) |
12969
a5c5fe878a4e
Racer, TechRacer: Fade out waypoints at the end
Wuzzy <Wuzzy2@mail.ru>
parents:
12968
diff
changeset
|
1080 |
end |
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1081 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1082 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1083 |
-- Handle Starting Stage of Game |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1084 |
if (gameOver == false) and (gameBegun == false) then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1085 |
-- if wpCount >= 3 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1086 |
gameBegun = true |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1087 |
-- --[[activationStage = 200]] |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1088 |
roundNumber = 0 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1089 |
firstClan = GetHogClan(CurrentHedgehog) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1090 |
--else |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1091 |
-- ShowMission(loc("RACER"), |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1092 |
-- loc("NOT ENOUGH WAYPOINTS"), |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1093 |
-- loc("Place more waypoints using the 'Air Attack' weapon."), 2, 4000) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1094 |
-- AddAmmo(CurrentHedgehog, amAirAttack, 4000) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1095 |
-- SetWeapon(amAirAttack) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1096 |
-- end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1097 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1098 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1099 |
if gameOver == true then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1100 |
gameBegun = false |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1101 |
racerActive = false -- newadd |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1102 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1103 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1104 |
AddAmmo(CurrentHedgehog, amTardis, 0) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1105 |
AddAmmo(CurrentHedgehog, amDrillStrike, 0) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1106 |
AddAmmo(CurrentHedgehog, amMineStrike, 0) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1107 |
AddAmmo(CurrentHedgehog, amNapalm, 0) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1108 |
AddAmmo(CurrentHedgehog, amPiano, 0) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1109 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1110 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1111 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1112 |
function onGameTick20() |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1113 |
|
10979 | 1114 |
if (jet ~= nil) and (ufoFuel ~= 0) then |
1115 |
if ufoFuel == 2000 then |
|
1116 |
SetHealth(jet, 2000) |
|
1117 |
end |
|
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1118 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1119 |
|
10979 | 1120 |
runOnGears(PortalEffects) |
1121 |
||
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1122 |
-- airstrike detected, convert this into a potential waypoint spot |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1123 |
if cGear ~= nil then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1124 |
x,y = GetGearPosition(cGear) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1125 |
if x > -9000 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1126 |
x,y = GetGearTarget(cGear) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1127 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1128 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1129 |
if TestRectForObstacle(x-20, y-20, x+20, y+20, true) then |
11937 | 1130 |
AddCaption(loc("Please place the waypoint in the air and within the map boundaries")) |
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1131 |
PlaySound(sndDenied) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1132 |
elseif (y > WaterLine-50) then |
11937 | 1133 |
AddCaption(loc("Please place the waypoint further away from the waterline")) |
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1134 |
PlaySound(sndDenied) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1135 |
else |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1136 |
CallBob(x, y) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1137 |
if wpCount == wpLimit then |
11937 | 1138 |
AddCaption(loc("Race complexity limit reached")) |
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1139 |
DisableTumbler() |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1140 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1141 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1142 |
else |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1143 |
DeleteGear(cGear) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1144 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1145 |
SetGearPosition(cGear, -10000, 0) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1146 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1147 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1148 |
|
13029
a568bc16a99a
Racer and TechRacer: Move cameera to first waypoint in Ready phase
Wuzzy <Wuzzy2@mail.ru>
parents:
12971
diff
changeset
|
1149 |
if activationStage < 10 then |
a568bc16a99a
Racer and TechRacer: Move cameera to first waypoint in Ready phase
Wuzzy <Wuzzy2@mail.ru>
parents:
12971
diff
changeset
|
1150 |
HandleFreshMapCreation() |
a568bc16a99a
Racer and TechRacer: Move cameera to first waypoint in Ready phase
Wuzzy <Wuzzy2@mail.ru>
parents:
12971
diff
changeset
|
1151 |
|
a568bc16a99a
Racer and TechRacer: Move cameera to first waypoint in Ready phase
Wuzzy <Wuzzy2@mail.ru>
parents:
12971
diff
changeset
|
1152 |
if not gameOver and gameBegun and not racerActive then |
a568bc16a99a
Racer and TechRacer: Move cameera to first waypoint in Ready phase
Wuzzy <Wuzzy2@mail.ru>
parents:
12971
diff
changeset
|
1153 |
if cameraGear then |
a568bc16a99a
Racer and TechRacer: Move cameera to first waypoint in Ready phase
Wuzzy <Wuzzy2@mail.ru>
parents:
12971
diff
changeset
|
1154 |
DeleteGear(cameraGear) |
a568bc16a99a
Racer and TechRacer: Move cameera to first waypoint in Ready phase
Wuzzy <Wuzzy2@mail.ru>
parents:
12971
diff
changeset
|
1155 |
end |
a568bc16a99a
Racer and TechRacer: Move cameera to first waypoint in Ready phase
Wuzzy <Wuzzy2@mail.ru>
parents:
12971
diff
changeset
|
1156 |
-- Move camera to first waypoint. |
a568bc16a99a
Racer and TechRacer: Move cameera to first waypoint in Ready phase
Wuzzy <Wuzzy2@mail.ru>
parents:
12971
diff
changeset
|
1157 |
-- We use a dummy gear to feed FollowGear. It does not affect the race. |
a568bc16a99a
Racer and TechRacer: Move cameera to first waypoint in Ready phase
Wuzzy <Wuzzy2@mail.ru>
parents:
12971
diff
changeset
|
1158 |
cameraGear = AddGear(wpX[0], wpY[0], gtGenericFaller, 0, 0, 0, 5000) |
a568bc16a99a
Racer and TechRacer: Move cameera to first waypoint in Ready phase
Wuzzy <Wuzzy2@mail.ru>
parents:
12971
diff
changeset
|
1159 |
SetState(cameraGear, bor(GetState(cameraGear), gstNoGravity+gstInvisiblee)) |
a568bc16a99a
Racer and TechRacer: Move cameera to first waypoint in Ready phase
Wuzzy <Wuzzy2@mail.ru>
parents:
12971
diff
changeset
|
1160 |
FollowGear(cameraGear) |
a568bc16a99a
Racer and TechRacer: Move cameera to first waypoint in Ready phase
Wuzzy <Wuzzy2@mail.ru>
parents:
12971
diff
changeset
|
1161 |
end |
a568bc16a99a
Racer and TechRacer: Move cameera to first waypoint in Ready phase
Wuzzy <Wuzzy2@mail.ru>
parents:
12971
diff
changeset
|
1162 |
|
a568bc16a99a
Racer and TechRacer: Move cameera to first waypoint in Ready phase
Wuzzy <Wuzzy2@mail.ru>
parents:
12971
diff
changeset
|
1163 |
end |
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1164 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1165 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1166 |
-- start the player tumbling with a boom once their turn has actually begun |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1167 |
if racerActive == false then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1168 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1169 |
if (TurnTimeLeft > 0) and (TurnTimeLeft ~= TurnTime) then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1170 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1171 |
-- if the gamehas started put the player in the middle of the first |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1172 |
--waypoint that was placed |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1173 |
--if activationStage == 200 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1174 |
if gameBegun == true then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1175 |
AddCaption(loc("Good to go!")) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1176 |
racerActive = true |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1177 |
trackTime = 0 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1178 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1179 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1180 |
SetGearPosition(CurrentHedgehog, wpX[0], wpY[0]) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1181 |
--AddGear(GetX(CurrentHedgehog), GetY(CurrentHedgehog), gtGrenade, 0, 0, 0, 1) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1182 |
--SetGearVelocity(CurrentHedgehog,1000000,1000000) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1183 |
SetGearMessage(CurrentHedgehog,gmLeft) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1184 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1185 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1186 |
FollowGear(CurrentHedgehog) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1187 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1188 |
HideMission() |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1189 |
activationStage = 201 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1190 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1191 |
else |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1192 |
-- still in placement mode |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1193 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1194 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1195 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1196 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1197 |
elseif (activationStage == 201) and (TurnTimeLeft > 0) and (TurnTimeLeft ~= TurnTime) then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1198 |
SetGearMessage(CurrentHedgehog,0) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1199 |
activationStage = 202 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1200 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1201 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1202 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1203 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1204 |
-- has the player started his tumbling spree? |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1205 |
if (CurrentHedgehog ~= nil) then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1206 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1207 |
--airstrike conversion used to be here |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1208 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1209 |
-- if the RACE has started, show tracktimes and keep tabs on waypoints |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1210 |
if (racerActive == true) and (activationStage == 202) then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1211 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1212 |
--ghost |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1213 |
if GameTime%40 == 0 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1214 |
HandleGhost() |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1215 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1216 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1217 |
trackTime = trackTime + 20 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1218 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1219 |
if GameTime%100 == 0 then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1220 |
|
11937 | 1221 |
AddCaption(string.format(loc("Time: %.1fs"), (trackTime/1000)), GetClanColor(GetHogClan(CurrentHedgehog)),capgrpMessage2) |
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1222 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1223 |
if (CheckWaypoints() == true) then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1224 |
AdjustScores() |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1225 |
DisableTumbler() |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1226 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1227 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1228 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1229 |
|
12292
faf1b93422ba
Use new EndTurn in a couple of scripts, esp. to fix timeout taunts in Racer
Wuzzy <almikes@aol.com>
parents:
12084
diff
changeset
|
1230 |
-- If hedgehog is not controlled anymore, stop racing mode |
faf1b93422ba
Use new EndTurn in a couple of scripts, esp. to fix timeout taunts in Racer
Wuzzy <almikes@aol.com>
parents:
12084
diff
changeset
|
1231 |
if band(GetState(CurrentHedgehog), gstHHDriven) == 0 then |
faf1b93422ba
Use new EndTurn in a couple of scripts, esp. to fix timeout taunts in Racer
Wuzzy <almikes@aol.com>
parents:
12084
diff
changeset
|
1232 |
DisableTumbler(false) |
faf1b93422ba
Use new EndTurn in a couple of scripts, esp. to fix timeout taunts in Racer
Wuzzy <almikes@aol.com>
parents:
12084
diff
changeset
|
1233 |
end |
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1234 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1235 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1236 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1237 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1238 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1239 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1240 |
|
10979 | 1241 |
-- handle short range portal gun |
1242 |
function PortalEffects(gear) |
|
1243 |
||
1244 |
if GetGearType(gear) == gtPortal then |
|
1245 |
||
1246 |
tag = GetTag(gear) |
|
1247 |
if tag == 0 then |
|
1248 |
col = 0xfab02aFF -- orange ball |
|
1249 |
elseif tag == 1 then |
|
1250 |
col = 0x00FF00FF -- orange portal |
|
1251 |
elseif tag == 2 then |
|
1252 |
col = 0x364df7FF -- blue ball |
|
1253 |
elseif tag == 3 then |
|
1254 |
col = 0xFFFF00FF -- blue portal |
|
1255 |
end |
|
1256 |
||
1257 |
if (tag == 0) or (tag == 2) then -- i.e ball form |
|
1258 |
tempE = AddVisualGear(GetX(gear), GetY(gear), vgtDust, 0, true) |
|
1259 |
g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(tempE) |
|
1260 |
SetVisualGearValues(tempE, g1, g2, g3, g4, g5, g6, g7, 1, g9, col ) |
|
1261 |
||
1262 |
remLife = getGearValue(gear,"life") |
|
1263 |
remLife = remLife - 1 |
|
1264 |
setGearValue(gear, "life", remLife) |
|
1265 |
||
1266 |
if remLife == 0 then |
|
1267 |
||
1268 |
tempE = AddVisualGear(GetX(gear)+15, GetY(gear), vgtSmoke, 0, true) |
|
1269 |
g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(tempE) |
|
1270 |
SetVisualGearValues(tempE, g1, g2, g3, g4, g5, g6, g7, g8, g9, col ) |
|
1271 |
||
1272 |
tempE = AddVisualGear(GetX(gear)-15, GetY(gear), vgtSmoke, 0, true) |
|
1273 |
g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(tempE) |
|
1274 |
SetVisualGearValues(tempE, g1, g2, g3, g4, g5, g6, g7, g8, g9, col ) |
|
1275 |
||
1276 |
tempE = AddVisualGear(GetX(gear), GetY(gear)+15, vgtSmoke, 0, true) |
|
1277 |
g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(tempE) |
|
1278 |
SetVisualGearValues(tempE, g1, g2, g3, g4, g5, g6, g7, g8, g9, col ) |
|
1279 |
||
1280 |
tempE = AddVisualGear(GetX(gear), GetY(gear)-15, vgtSmoke, 0, true) |
|
1281 |
g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(tempE) |
|
1282 |
SetVisualGearValues(tempE, g1, g2, g3, g4, g5, g6, g7, g8, g9, col ) |
|
1283 |
||
1284 |
||
1285 |
PlaySound(sndVaporize) |
|
1286 |
DeleteGear(gear) |
|
1287 |
||
1288 |
end |
|
1289 |
||
1290 |
end |
|
1291 |
||
1292 |
end |
|
1293 |
||
1294 |
end |
|
1295 |
||
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1296 |
function onGearResurrect(gear) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1297 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1298 |
AddVisualGear(GetX(gear), GetY(gear), vgtBigExplosion, 0, false) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1299 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1300 |
if gear == CurrentHedgehog then |
12292
faf1b93422ba
Use new EndTurn in a couple of scripts, esp. to fix timeout taunts in Racer
Wuzzy <almikes@aol.com>
parents:
12084
diff
changeset
|
1301 |
DisableTumbler(false) |
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1302 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1303 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1304 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1305 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1306 |
function isATrackedGear(gear) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1307 |
if (GetGearType(gear) == gtHedgehog) or |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1308 |
(GetGearType(gear) == gtGrenade) or |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1309 |
(GetGearType(gear) == gtTarget) or |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1310 |
(GetGearType(gear) == gtFlame) or |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1311 |
(GetGearType(gear) == gtExplosives) or |
10979 | 1312 |
(GetGearType(gear) == gtPortal) or |
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1313 |
(GetGearType(gear) == gtMine) or |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1314 |
(GetGearType(gear) == gtSMine) or |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1315 |
(GetGearType(gear) == gtAirMine) or |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1316 |
(GetGearType(gear) == gtCase) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1317 |
then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1318 |
return(true) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1319 |
else |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1320 |
return(false) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1321 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1322 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1323 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1324 |
function onGearAdd(gear) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1325 |
|
10979 | 1326 |
if isATrackedGear(gear) then |
1327 |
trackGear(gear) |
|
1328 |
||
1329 |
if GetGearType(gear) == gtPortal then |
|
1330 |
setGearValue(gear,"life",portalDistance) |
|
1331 |
elseif GetGearType(gear) == gtHedgehog then |
|
1332 |
hhs[numhhs] = gear |
|
1333 |
numhhs = numhhs + 1 |
|
1334 |
SetEffect(gear, heResurrectable, 1) |
|
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1335 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1336 |
|
10979 | 1337 |
end |
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1338 |
|
10979 | 1339 |
if GetGearType(gear) == gtAirAttack then |
1340 |
cGear = gear |
|
1341 |
elseif GetGearType(gear) == gtJetpack then |
|
1342 |
jet = gear |
|
1343 |
if (ufoFuel ~= 0) then |
|
1344 |
SetHealth(jet, ufoFuel) |
|
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1345 |
end |
10979 | 1346 |
end |
1347 |
||
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1348 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1349 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1350 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1351 |
function onGearDelete(gear) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1352 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1353 |
if isATrackedGear(gear) then |
13029
a568bc16a99a
Racer and TechRacer: Move cameera to first waypoint in Ready phase
Wuzzy <Wuzzy2@mail.ru>
parents:
12971
diff
changeset
|
1354 |
trackDeletion(gear) |
a568bc16a99a
Racer and TechRacer: Move cameera to first waypoint in Ready phase
Wuzzy <Wuzzy2@mail.ru>
parents:
12971
diff
changeset
|
1355 |
elseif GetGearType(gear) == gtAirAttack then |
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1356 |
cGear = nil |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1357 |
elseif GetGearType(gear) == gtJetpack then |
13029
a568bc16a99a
Racer and TechRacer: Move cameera to first waypoint in Ready phase
Wuzzy <Wuzzy2@mail.ru>
parents:
12971
diff
changeset
|
1358 |
jet = nil |
a568bc16a99a
Racer and TechRacer: Move cameera to first waypoint in Ready phase
Wuzzy <Wuzzy2@mail.ru>
parents:
12971
diff
changeset
|
1359 |
elseif gear == cameraGear then |
a568bc16a99a
Racer and TechRacer: Move cameera to first waypoint in Ready phase
Wuzzy <Wuzzy2@mail.ru>
parents:
12971
diff
changeset
|
1360 |
cameraGear = nil |
a568bc16a99a
Racer and TechRacer: Move cameera to first waypoint in Ready phase
Wuzzy <Wuzzy2@mail.ru>
parents:
12971
diff
changeset
|
1361 |
end |
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1362 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1363 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1364 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1365 |
function onAttack() |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1366 |
at = GetCurAmmoType() |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1367 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1368 |
usedWeapons[at] = 0 |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1369 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1370 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1371 |
function onAchievementsDeclaration() |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1372 |
usedWeapons[amSkip] = nil |
11568 | 1373 |
usedWeapons[amExtraTime] = nil |
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1374 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1375 |
usedRope = usedWeapons[amRope] ~= nil |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1376 |
usedPortal = usedWeapons[amPortalGun] ~= nil |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1377 |
usedSaucer = usedWeapons[amJetpack] ~= nil |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1378 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1379 |
usedWeapons[amRope] = nil |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1380 |
usedWeapons[amPortalGun] = nil |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1381 |
usedWeapons[amJetpack] = nil |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1382 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1383 |
usedOther = next(usedWeapons) ~= nil |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1384 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1385 |
if usedOther then -- smth besides skip, rope, portal or saucer used |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1386 |
raceType = "unknown race" |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1387 |
elseif usedRope and not usedPortal and not usedSaucer then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1388 |
raceType = "rope race" |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1389 |
elseif not usedRope and usedPortal and not usedSaucer then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1390 |
raceType = "portal race" |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1391 |
elseif not usedRope and not usedPortal and usedSaucer then |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1392 |
raceType = "saucer race" |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1393 |
elseif (usedRope or usedPortal or usedSaucer or usedOther) == false then -- no weapons used at all? |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1394 |
raceType = "no tools race" |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1395 |
else -- at least two of rope, portal and saucer used |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1396 |
raceType = "mixed race" |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1397 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1398 |
|
11547
64a5ab2c4f00
Attempt to implement hash for special points to detect tech racer maps
unC0Rr
parents:
11012
diff
changeset
|
1399 |
map = detectMapWithDigest() |
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1400 |
|
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1401 |
for i = 0, (numTeams-1) do |
11596
7c9243584a72
Fix TechRacer not recoding finish if time was >= 100s by raising this limit ten times.
unc0rr
parents:
11590
diff
changeset
|
1402 |
if teamScore[i] < 1000000 then |
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1403 |
DeclareAchievement(raceType, teamNameArr[i], map, teamScore[i]) |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1404 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1405 |
end |
11574 | 1406 |
|
11590 | 1407 |
if map ~= nil and fastCount > 0 then |
11574 | 1408 |
StartGhostPoints(fastCount) |
1409 |
||
1410 |
for i = 0, (fastCount - 1) do |
|
1411 |
DumpPoint(fastX[i], fastY[i]) |
|
1412 |
end |
|
1413 |
end |
|
1414 |
||
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1415 |
end |
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1416 |
|
10967
1434cec96ca3
- preview generation for rubbers, air-mines, crates, barrels
mikade <redgrinner@gmail.com>
parents:
10961
diff
changeset
|
1417 |
function onAmmoStoreInit() |
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1418 |
|
10967
1434cec96ca3
- preview generation for rubbers, air-mines, crates, barrels
mikade <redgrinner@gmail.com>
parents:
10961
diff
changeset
|
1419 |
SetAmmo(amSkip, 9, 0, 0, 0) |
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10950
diff
changeset
|
1420 |
|
10967
1434cec96ca3
- preview generation for rubbers, air-mines, crates, barrels
mikade <redgrinner@gmail.com>
parents:
10961
diff
changeset
|
1421 |
for i = 1, #atkArray do |
1434cec96ca3
- preview generation for rubbers, air-mines, crates, barrels
mikade <redgrinner@gmail.com>
parents:
10961
diff
changeset
|
1422 |
SetAmmo(atkArray[i][1], 0, 0, 0, 1) |
1434cec96ca3
- preview generation for rubbers, air-mines, crates, barrels
mikade <redgrinner@gmail.com>
parents:
10961
diff
changeset
|
1423 |
end |
1434cec96ca3
- preview generation for rubbers, air-mines, crates, barrels
mikade <redgrinner@gmail.com>
parents:
10961
diff
changeset
|
1424 |
|
1434cec96ca3
- preview generation for rubbers, air-mines, crates, barrels
mikade <redgrinner@gmail.com>
parents:
10961
diff
changeset
|
1425 |
for i = 1, #utilArray do |
1434cec96ca3
- preview generation for rubbers, air-mines, crates, barrels
mikade <redgrinner@gmail.com>
parents:
10961
diff
changeset
|
1426 |
SetAmmo(utilArray[i][1], 0, 0, 0, 1) |
1434cec96ca3
- preview generation for rubbers, air-mines, crates, barrels
mikade <redgrinner@gmail.com>
parents:
10961
diff
changeset
|
1427 |
end |
1434cec96ca3
- preview generation for rubbers, air-mines, crates, barrels
mikade <redgrinner@gmail.com>
parents:
10961
diff
changeset
|
1428 |
|
1434cec96ca3
- preview generation for rubbers, air-mines, crates, barrels
mikade <redgrinner@gmail.com>
parents:
10961
diff
changeset
|
1429 |
end |
1434cec96ca3
- preview generation for rubbers, air-mines, crates, barrels
mikade <redgrinner@gmail.com>
parents:
10961
diff
changeset
|
1430 |