author | Wuzzy <almikes@aol.com> |
Wed, 04 May 2016 05:23:58 +0200 | |
changeset 11956 | 221b38978401 |
parent 11692 | 68eddcdc9f26 |
child 11976 | d5dabb71d6bf |
permissions | -rw-r--r-- |
9404
4ae9b399fa73
desert planet main mission addition - hwp will be added when fully finished
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
1 |
------------------- ABOUT ---------------------- |
4ae9b399fa73
desert planet main mission addition - hwp will be added when fully finished
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
2 |
-- |
4ae9b399fa73
desert planet main mission addition - hwp will be added when fully finished
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
3 |
-- In the desert planet Hero will have to explore |
4ae9b399fa73
desert planet main mission addition - hwp will be added when fully finished
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
4 |
-- the dunes below the surface and find the hidden |
4ae9b399fa73
desert planet main mission addition - hwp will be added when fully finished
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
5 |
-- crates. It is told that one crate contains the |
4ae9b399fa73
desert planet main mission addition - hwp will be added when fully finished
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
6 |
-- lost part. |
4ae9b399fa73
desert planet main mission addition - hwp will be added when fully finished
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
7 |
|
9438
77dde6234fec
3rd battle event handler
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9436
diff
changeset
|
8 |
-- Idea: game will be successfully end when the 2 lower crates are collected |
77dde6234fec
3rd battle event handler
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9436
diff
changeset
|
9 |
-- it would be more defficult (and sadistic) if one should collect *all* the crates |
9404
4ae9b399fa73
desert planet main mission addition - hwp will be added when fully finished
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
10 |
|
4ae9b399fa73
desert planet main mission addition - hwp will be added when fully finished
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
11 |
HedgewarsScriptLoad("/Scripts/Locale.lua") |
4ae9b399fa73
desert planet main mission addition - hwp will be added when fully finished
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
12 |
HedgewarsScriptLoad("/Scripts/Animate.lua") |
9810
54c0fdec4600
changing math functions that may cause desyncs
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9802
diff
changeset
|
13 |
HedgewarsScriptLoad("/Scripts/Utils.lua") |
9578
16139270448f
save main missions' status
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9574
diff
changeset
|
14 |
HedgewarsScriptLoad("/Missions/Campaign/A_Space_Adventure/global_functions.lua") |
9404
4ae9b399fa73
desert planet main mission addition - hwp will be added when fully finished
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
15 |
|
4ae9b399fa73
desert planet main mission addition - hwp will be added when fully finished
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
16 |
----------------- VARIABLES -------------------- |
9410
92a0b74ed740
added hedgehogs in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9408
diff
changeset
|
17 |
-- globals |
92a0b74ed740
added hedgehogs in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9408
diff
changeset
|
18 |
local campaignName = loc("A Space Adventure") |
9574
da3d39667881
strings checked, all ok except ice02 that will be probably changed
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9490
diff
changeset
|
19 |
local missionName = loc("Searching in the dust") |
9426
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
20 |
local heroIsInBattle = false |
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
21 |
local ongoingBattle = 0 |
9441 | 22 |
local cratesFound = 0 |
9410
92a0b74ed740
added hedgehogs in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9408
diff
changeset
|
23 |
local checkPointReached = 1 -- 1 is normal spawn |
9422
85b17f344c97
first dialog added, maybe reconsider the seconds the bubbles are displayed later
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9420
diff
changeset
|
24 |
-- dialogs |
85b17f344c97
first dialog added, maybe reconsider the seconds the bubbles are displayed later
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9420
diff
changeset
|
25 |
local dialog01 = {} |
85b17f344c97
first dialog added, maybe reconsider the seconds the bubbles are displayed later
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9420
diff
changeset
|
26 |
-- mission objectives |
85b17f344c97
first dialog added, maybe reconsider the seconds the bubbles are displayed later
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9420
diff
changeset
|
27 |
local goals = { |
9802
00216d609140
desert01 fixed destructible terrain marks and cosmos marks for completed main missions
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9783
diff
changeset
|
28 |
[dialog01] = {missionName, loc("Getting ready"), loc("The device part is hidden in one of the crates! Go and get it!").."|".. |
00216d609140
desert01 fixed destructible terrain marks and cosmos marks for completed main missions
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9783
diff
changeset
|
29 |
loc("Most of the destructible terrain in marked with blue color"), 1, 4500}, |
9422
85b17f344c97
first dialog added, maybe reconsider the seconds the bubbles are displayed later
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9420
diff
changeset
|
30 |
} |
9416
8d0054adf0c6
added weapon crates
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9412
diff
changeset
|
31 |
-- crates |
8d0054adf0c6
added weapon crates
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9412
diff
changeset
|
32 |
local btorch1Y = 60 |
8d0054adf0c6
added weapon crates
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9412
diff
changeset
|
33 |
local btorch1X = 2700 |
9441 | 34 |
local btorch2Y = 1900 |
35 |
local btorch2X = 2150 |
|
9424
9a150b7862e9
hooray! more crates and mines
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9422
diff
changeset
|
36 |
local btorch3Y = 980 |
9a150b7862e9
hooray! more crates and mines
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9422
diff
changeset
|
37 |
local btorch3X = 3260 |
9416
8d0054adf0c6
added weapon crates
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9412
diff
changeset
|
38 |
local rope1Y = 970 |
8d0054adf0c6
added weapon crates
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9412
diff
changeset
|
39 |
local rope1X = 3200 |
8d0054adf0c6
added weapon crates
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9412
diff
changeset
|
40 |
local rope2Y = 1900 |
8d0054adf0c6
added weapon crates
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9412
diff
changeset
|
41 |
local rope2X = 680 |
8d0054adf0c6
added weapon crates
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9412
diff
changeset
|
42 |
local rope3Y = 1850 |
8d0054adf0c6
added weapon crates
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9412
diff
changeset
|
43 |
local rope3X = 2460 |
8d0054adf0c6
added weapon crates
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9412
diff
changeset
|
44 |
local portalY = 480 |
8d0054adf0c6
added weapon crates
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9412
diff
changeset
|
45 |
local portalX = 1465 |
9441 | 46 |
local girderY = 1630 |
47 |
local girderX = 3350 |
|
9782
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
48 |
-- win crates |
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
49 |
local btorch2 = {} |
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
50 |
local girder = {} |
9404
4ae9b399fa73
desert planet main mission addition - hwp will be added when fully finished
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
51 |
-- hogs |
4ae9b399fa73
desert planet main mission addition - hwp will be added when fully finished
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
52 |
local hero = {} |
9410
92a0b74ed740
added hedgehogs in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9408
diff
changeset
|
53 |
local ally = {} |
92a0b74ed740
added hedgehogs in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9408
diff
changeset
|
54 |
local smuggler1 = {} |
92a0b74ed740
added hedgehogs in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9408
diff
changeset
|
55 |
local smuggler2 = {} |
92a0b74ed740
added hedgehogs in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9408
diff
changeset
|
56 |
local smuggler3 = {} |
9404
4ae9b399fa73
desert planet main mission addition - hwp will be added when fully finished
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
57 |
-- teams |
4ae9b399fa73
desert planet main mission addition - hwp will be added when fully finished
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
58 |
local teamA = {} |
4ae9b399fa73
desert planet main mission addition - hwp will be added when fully finished
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
59 |
local teamB = {} |
4ae9b399fa73
desert planet main mission addition - hwp will be added when fully finished
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
60 |
local teamC = {} |
4ae9b399fa73
desert planet main mission addition - hwp will be added when fully finished
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
61 |
-- hedgehogs values |
9574
da3d39667881
strings checked, all ok except ice02 that will be probably changed
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9490
diff
changeset
|
62 |
hero.name = loc("Hog Solo") |
9410
92a0b74ed740
added hedgehogs in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9408
diff
changeset
|
63 |
hero.x = 1740 |
92a0b74ed740
added hedgehogs in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9408
diff
changeset
|
64 |
hero.y = 40 |
92a0b74ed740
added hedgehogs in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9408
diff
changeset
|
65 |
hero.dead = false |
9574
da3d39667881
strings checked, all ok except ice02 that will be probably changed
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9490
diff
changeset
|
66 |
ally.name = loc("Chief Sandologist") |
9410
92a0b74ed740
added hedgehogs in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9408
diff
changeset
|
67 |
ally.x = 1660 |
92a0b74ed740
added hedgehogs in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9408
diff
changeset
|
68 |
ally.y = 40 |
9574
da3d39667881
strings checked, all ok except ice02 that will be probably changed
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9490
diff
changeset
|
69 |
smuggler1.name = loc("Sandy") |
9426
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
70 |
smuggler1.x = 400 |
9410
92a0b74ed740
added hedgehogs in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9408
diff
changeset
|
71 |
smuggler1.y = 235 |
9574
da3d39667881
strings checked, all ok except ice02 that will be probably changed
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9490
diff
changeset
|
72 |
smuggler2.name = loc("Spike") |
9410
92a0b74ed740
added hedgehogs in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9408
diff
changeset
|
73 |
smuggler2.x = 736 |
92a0b74ed740
added hedgehogs in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9408
diff
changeset
|
74 |
smuggler2.y = 860 |
9574
da3d39667881
strings checked, all ok except ice02 that will be probably changed
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9490
diff
changeset
|
75 |
smuggler3.name = loc("Sandstorm") |
9410
92a0b74ed740
added hedgehogs in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9408
diff
changeset
|
76 |
smuggler3.x = 1940 |
92a0b74ed740
added hedgehogs in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9408
diff
changeset
|
77 |
smuggler3.y = 1625 |
92a0b74ed740
added hedgehogs in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9408
diff
changeset
|
78 |
teamA.name = loc("PAotH") |
92a0b74ed740
added hedgehogs in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9408
diff
changeset
|
79 |
teamA.color = tonumber("FF0000",16) -- red |
92a0b74ed740
added hedgehogs in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9408
diff
changeset
|
80 |
teamB.name = loc("Smugglers") |
9404
4ae9b399fa73
desert planet main mission addition - hwp will be added when fully finished
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
81 |
teamB.color = tonumber("0033FF",16) -- blues |
4ae9b399fa73
desert planet main mission addition - hwp will be added when fully finished
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
82 |
teamC.name = loc("Hog Solo") |
4ae9b399fa73
desert planet main mission addition - hwp will be added when fully finished
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
83 |
teamC.color = tonumber("38D61C",16) -- green |
4ae9b399fa73
desert planet main mission addition - hwp will be added when fully finished
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
84 |
|
4ae9b399fa73
desert planet main mission addition - hwp will be added when fully finished
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
85 |
-------------- LuaAPI EVENT HANDLERS ------------------ |
4ae9b399fa73
desert planet main mission addition - hwp will be added when fully finished
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
86 |
|
4ae9b399fa73
desert planet main mission addition - hwp will be added when fully finished
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
87 |
function onGameInit() |
4ae9b399fa73
desert planet main mission addition - hwp will be added when fully finished
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
88 |
Seed = 1 |
9426
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
89 |
TurnTime = 20000 |
9404
4ae9b399fa73
desert planet main mission addition - hwp will be added when fully finished
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
90 |
CaseFreq = 0 |
4ae9b399fa73
desert planet main mission addition - hwp will be added when fully finished
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
91 |
MinesNum = 0 |
4ae9b399fa73
desert planet main mission addition - hwp will be added when fully finished
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
92 |
MinesTime = 1 |
4ae9b399fa73
desert planet main mission addition - hwp will be added when fully finished
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
93 |
Explosives = 0 |
4ae9b399fa73
desert planet main mission addition - hwp will be added when fully finished
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
94 |
Delay = 3 |
9418
6e0831e42e12
added health crate
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9416
diff
changeset
|
95 |
HealthCaseAmount = 30 |
9404
4ae9b399fa73
desert planet main mission addition - hwp will be added when fully finished
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
96 |
Map = "desert01_map" |
4ae9b399fa73
desert planet main mission addition - hwp will be added when fully finished
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
97 |
Theme = "Desert" |
9758 | 98 |
|
9428
b483a2683d08
first checkpoint with saved ammo left :)
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9426
diff
changeset
|
99 |
-- get the check point |
9582
bf314b2258b3
less variables used to save the checkpoints - potential breakage xD
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9578
diff
changeset
|
100 |
checkPointReached = initCheckpoint("desert01") |
9428
b483a2683d08
first checkpoint with saved ammo left :)
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9426
diff
changeset
|
101 |
-- get hero health |
b483a2683d08
first checkpoint with saved ammo left :)
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9426
diff
changeset
|
102 |
local heroHealth = 100 |
b483a2683d08
first checkpoint with saved ammo left :)
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9426
diff
changeset
|
103 |
if checkPointReached > 1 and tonumber(GetCampaignVar("HeroHealth")) then |
b483a2683d08
first checkpoint with saved ammo left :)
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9426
diff
changeset
|
104 |
heroHealth = tonumber(GetCampaignVar("HeroHealth")) |
b483a2683d08
first checkpoint with saved ammo left :)
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9426
diff
changeset
|
105 |
end |
9758 | 106 |
|
9404
4ae9b399fa73
desert planet main mission addition - hwp will be added when fully finished
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
107 |
-- Hog Solo |
4ae9b399fa73
desert planet main mission addition - hwp will be added when fully finished
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
108 |
AddTeam(teamC.name, teamC.color, "Bone", "Island", "HillBilly", "cm_birdy") |
9428
b483a2683d08
first checkpoint with saved ammo left :)
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9426
diff
changeset
|
109 |
hero.gear = AddHog(hero.name, 0, heroHealth, "war_desertgrenadier1") |
9404
4ae9b399fa73
desert planet main mission addition - hwp will be added when fully finished
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
110 |
AnimSetGearPosition(hero.gear, hero.x, hero.y) |
4ae9b399fa73
desert planet main mission addition - hwp will be added when fully finished
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
111 |
HogTurnLeft(hero.gear, true) |
9410
92a0b74ed740
added hedgehogs in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9408
diff
changeset
|
112 |
-- PAotH undercover scientist and chief Sandologist |
92a0b74ed740
added hedgehogs in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9408
diff
changeset
|
113 |
AddTeam(teamA.name, teamA.color, "Bone", "Island", "HillBilly", "cm_birdy") |
9629 | 114 |
ally.gear = AddHog(ally.name, 0, 100, "Cowboy") |
9410
92a0b74ed740
added hedgehogs in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9408
diff
changeset
|
115 |
AnimSetGearPosition(ally.gear, ally.x, ally.y) |
92a0b74ed740
added hedgehogs in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9408
diff
changeset
|
116 |
-- Smugglers |
9404
4ae9b399fa73
desert planet main mission addition - hwp will be added when fully finished
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
117 |
AddTeam(teamB.name, teamB.color, "Bone", "Island", "HillBilly", "cm_birdy") |
9629 | 118 |
smuggler1.gear = AddHog(smuggler1.name, 1, 100, "hair_orange") |
9412
b4717f50846e
oops, hogs placing corrections
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9410
diff
changeset
|
119 |
AnimSetGearPosition(smuggler1.gear, smuggler1.x, smuggler1.y) |
9629 | 120 |
smuggler2.gear = AddHog(smuggler2.name, 1, 100, "lambda") |
9758 | 121 |
AnimSetGearPosition(smuggler2.gear, smuggler2.x, smuggler2.y) |
9629 | 122 |
smuggler3.gear = AddHog(smuggler3.name, 1, 100, "beefeater") |
9758 | 123 |
AnimSetGearPosition(smuggler3.gear, smuggler3.x, smuggler3.y) |
124 |
||
9428
b483a2683d08
first checkpoint with saved ammo left :)
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9426
diff
changeset
|
125 |
if checkPointReached == 1 then |
b483a2683d08
first checkpoint with saved ammo left :)
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9426
diff
changeset
|
126 |
-- Start of the game |
b483a2683d08
first checkpoint with saved ammo left :)
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9426
diff
changeset
|
127 |
elseif checkPointReached == 2 then |
b483a2683d08
first checkpoint with saved ammo left :)
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9426
diff
changeset
|
128 |
AnimSetGearPosition(hero.gear, 1050, 615) |
b483a2683d08
first checkpoint with saved ammo left :)
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9426
diff
changeset
|
129 |
HogTurnLeft(hero.gear, true) |
9432 | 130 |
elseif checkPointReached == 3 then |
131 |
AnimSetGearPosition(hero.gear, 1680, 920) |
|
132 |
HogTurnLeft(hero.gear, true) |
|
9434 | 133 |
elseif checkPointReached == 4 then |
134 |
AnimSetGearPosition(hero.gear, 1160, 1180) |
|
9443 | 135 |
elseif checkPointReached == 5 then |
9782
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
136 |
local positions = GetCampaignVar("HogsPosition") |
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
137 |
positions = split(positions,",") |
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
138 |
local x |
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
139 |
local y |
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
140 |
if positions[1] then |
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
141 |
x = positions[1] |
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
142 |
y = positions[2] |
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
143 |
else |
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
144 |
-- this should *NEVER* happen, remove? |
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
145 |
x = girderX+40 |
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
146 |
y = girderY-30 |
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
147 |
end |
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
148 |
AnimSetGearPosition(hero.gear, x, y) |
9428
b483a2683d08
first checkpoint with saved ammo left :)
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9426
diff
changeset
|
149 |
end |
9758 | 150 |
|
9422
85b17f344c97
first dialog added, maybe reconsider the seconds the bubbles are displayed later
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9420
diff
changeset
|
151 |
AnimInit() |
9758 | 152 |
AnimationSetup() |
9404
4ae9b399fa73
desert planet main mission addition - hwp will be added when fully finished
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
153 |
end |
4ae9b399fa73
desert planet main mission addition - hwp will be added when fully finished
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
154 |
|
4ae9b399fa73
desert planet main mission addition - hwp will be added when fully finished
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
155 |
function onGameStart() |
9422
85b17f344c97
first dialog added, maybe reconsider the seconds the bubbles are displayed later
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9420
diff
changeset
|
156 |
AnimWait(hero.gear, 3000) |
9404
4ae9b399fa73
desert planet main mission addition - hwp will be added when fully finished
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
157 |
FollowGear(hero.gear) |
9758 | 158 |
|
9426
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
159 |
AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 0) |
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
160 |
AddEvent(onHeroAtFirstBattle, {hero.gear}, heroAtFirstBattle, {hero.gear}, 1) |
9434 | 161 |
AddEvent(onHeroAtCheckpoint4, {hero.gear}, heroAtCheckpoint4, {hero.gear}, 0) |
9438
77dde6234fec
3rd battle event handler
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9436
diff
changeset
|
162 |
AddEvent(onHeroAtThirdBattle, {hero.gear}, heroAtThirdBattle, {hero.gear}, 0) |
9441 | 163 |
AddEvent(onCheckForWin1, {hero.gear}, checkForWin1, {hero.gear}, 0) |
164 |
AddEvent(onCheckForWin2, {hero.gear}, checkForWin2, {hero.gear}, 0) |
|
9782
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
165 |
AddEvent(onCrateDestroyed, {hero.gear}, crateDestroyed, {hero.gear}, 0) |
9758 | 166 |
|
9426
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
167 |
-- smugglers ammo |
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
168 |
AddAmmo(smuggler1.gear, amBazooka, 2) |
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
169 |
AddAmmo(smuggler1.gear, amGrenade, 2) |
9758 | 170 |
AddAmmo(smuggler1.gear, amDEagle, 2) |
9441 | 171 |
AddAmmo(smuggler3.gear, amRope, 2) |
9758 | 172 |
|
9632
9dd1c36d8b54
final mission map and most logic
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9630
diff
changeset
|
173 |
-- spawn crates |
9416
8d0054adf0c6
added weapon crates
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9412
diff
changeset
|
174 |
SpawnAmmoCrate(btorch2X, btorch2Y, amBlowTorch) |
9424
9a150b7862e9
hooray! more crates and mines
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9422
diff
changeset
|
175 |
SpawnAmmoCrate(btorch3X, btorch3Y, amBlowTorch) |
9416
8d0054adf0c6
added weapon crates
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9412
diff
changeset
|
176 |
SpawnAmmoCrate(rope1X, rope1Y, amRope) |
8d0054adf0c6
added weapon crates
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9412
diff
changeset
|
177 |
SpawnAmmoCrate(rope2X, rope2Y, amRope) |
8d0054adf0c6
added weapon crates
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9412
diff
changeset
|
178 |
SpawnAmmoCrate(rope3X, rope3Y, amRope) |
9758 | 179 |
SpawnAmmoCrate(portalX, portalY, amPortalGun) |
9441 | 180 |
SpawnAmmoCrate(girderX, girderY, amGirder) |
9758 | 181 |
|
9418
6e0831e42e12
added health crate
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9416
diff
changeset
|
182 |
SpawnHealthCrate(3300, 970) |
9758 | 183 |
|
9420 | 184 |
-- adding mines - BOOM! |
185 |
AddGear(1280, 460, gtMine, 0, 0, 0, 0) |
|
186 |
AddGear(270, 460, gtMine, 0, 0, 0, 0) |
|
187 |
AddGear(3460, 60, gtMine, 0, 0, 0, 0) |
|
188 |
AddGear(3500, 240, gtMine, 0, 0, 0, 0) |
|
189 |
AddGear(3410, 670, gtMine, 0, 0, 0, 0) |
|
190 |
AddGear(3450, 720, gtMine, 0, 0, 0, 0) |
|
9758 | 191 |
|
9420 | 192 |
local x = 800 |
9432 | 193 |
while x < 1630 do |
9420 | 194 |
AddGear(x, 900, gtMine, 0, 0, 0, 0) |
9810
54c0fdec4600
changing math functions that may cause desyncs
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9802
diff
changeset
|
195 |
x = x + GetRandom(13)+8 |
9420 | 196 |
end |
197 |
x = 1890 |
|
198 |
while x < 2988 do |
|
199 |
AddGear(x, 760, gtMine, 0, 0, 0, 0) |
|
9810
54c0fdec4600
changing math functions that may cause desyncs
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9802
diff
changeset
|
200 |
x = x + GetRandom(13)+8 |
9420 | 201 |
end |
9441 | 202 |
x = 2500 |
9420 | 203 |
while x < 3300 do |
204 |
AddGear(x, 1450, gtMine, 0, 0, 0, 0) |
|
9810
54c0fdec4600
changing math functions that may cause desyncs
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9802
diff
changeset
|
205 |
x = x + GetRandom(13)+8 |
9420 | 206 |
end |
9424
9a150b7862e9
hooray! more crates and mines
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9422
diff
changeset
|
207 |
x = 1570 |
9a150b7862e9
hooray! more crates and mines
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9422
diff
changeset
|
208 |
while x < 2900 do |
9a150b7862e9
hooray! more crates and mines
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9422
diff
changeset
|
209 |
AddGear(x, 470, gtMine, 0, 0, 0, 0) |
9810
54c0fdec4600
changing math functions that may cause desyncs
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9802
diff
changeset
|
210 |
x = x + GetRandom(13)+8 |
9424
9a150b7862e9
hooray! more crates and mines
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9422
diff
changeset
|
211 |
end |
9758 | 212 |
|
213 |
if checkPointReached == 1 then |
|
9783
1e6b91080bfc
changed some things about checkpoints and battle events in desert01,fixes turn interruption when battle one or two is triggered
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9782
diff
changeset
|
214 |
AddEvent(onHeroFleeFirstBattle, {hero.gear}, heroFleeFirstBattle, {hero.gear}, 1) |
9434 | 215 |
AddEvent(onHeroAtCheckpoint2, {hero.gear}, heroAtCheckpoint2, {hero.gear}, 0) |
216 |
AddEvent(onHeroAtCheckpoint3, {hero.gear}, heroAtCheckpoint3, {hero.gear}, 0) |
|
9449
435ba2dd5508
changing when some crates are spawned
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9447
diff
changeset
|
217 |
-- crates |
435ba2dd5508
changing when some crates are spawned
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9447
diff
changeset
|
218 |
SpawnAmmoCrate(btorch1X, btorch1Y, amBlowTorch) |
435ba2dd5508
changing when some crates are spawned
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9447
diff
changeset
|
219 |
SpawnHealthCrate(680, 460) |
9428
b483a2683d08
first checkpoint with saved ammo left :)
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9426
diff
changeset
|
220 |
-- hero ammo |
b483a2683d08
first checkpoint with saved ammo left :)
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9426
diff
changeset
|
221 |
AddAmmo(hero.gear, amRope, 2) |
b483a2683d08
first checkpoint with saved ammo left :)
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9426
diff
changeset
|
222 |
AddAmmo(hero.gear, amBazooka, 3) |
b483a2683d08
first checkpoint with saved ammo left :)
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9426
diff
changeset
|
223 |
AddAmmo(hero.gear, amParachute, 1) |
b483a2683d08
first checkpoint with saved ammo left :)
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9426
diff
changeset
|
224 |
AddAmmo(hero.gear, amGrenade, 6) |
b483a2683d08
first checkpoint with saved ammo left :)
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9426
diff
changeset
|
225 |
AddAmmo(hero.gear, amDEagle, 4) |
9630 | 226 |
AddAmmo(hero.gear, amRCPlane, tonumber(getBonus(1))) |
9758 | 227 |
|
9428
b483a2683d08
first checkpoint with saved ammo left :)
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9426
diff
changeset
|
228 |
AddAnim(dialog01) |
9432 | 229 |
elseif checkPointReached == 2 or checkPointReached == 3 then |
9758 | 230 |
ShowMission(campaignName, missionName, loc("The device part is hidden in one of the crates! Go and get it!"), -amSkip, 0) |
9436 | 231 |
loadHeroAmmo() |
9758 | 232 |
|
9432 | 233 |
secondBattle() |
9443 | 234 |
elseif checkPointReached == 4 or checkPointReached == 5 then |
9758 | 235 |
ShowMission(campaignName, missionName, loc("The part device is hidden in one of the crates! Go and get it!"), -amSkip, 0) |
9436 | 236 |
loadHeroAmmo() |
9428
b483a2683d08
first checkpoint with saved ammo left :)
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9426
diff
changeset
|
237 |
end |
9758 | 238 |
|
9426
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
239 |
SendHealthStatsOff() |
9422
85b17f344c97
first dialog added, maybe reconsider the seconds the bubbles are displayed later
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9420
diff
changeset
|
240 |
end |
85b17f344c97
first dialog added, maybe reconsider the seconds the bubbles are displayed later
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9420
diff
changeset
|
241 |
|
9426
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
242 |
function onNewTurn() |
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
243 |
if CurrentHedgehog ~= hero.gear and not heroIsInBattle then |
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
244 |
TurnTimeLeft = 0 |
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
245 |
elseif CurrentHedgehog == hero.gear and not heroIsInBattle then |
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
246 |
TurnTimeLeft = -1 |
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
247 |
elseif (CurrentHedgehog == smuggler2.gear or CurrentHedgehog == smuggler3.gear) and ongoingBattle == 1 then |
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
248 |
AnimSwitchHog(hero.gear) |
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
249 |
TurnTimeLeft = 0 |
9430 | 250 |
elseif (CurrentHedgehog == smuggler1.gear or CurrentHedgehog == smuggler3.gear) and ongoingBattle == 2 then |
251 |
AnimSwitchHog(hero.gear) |
|
252 |
TurnTimeLeft = 0 |
|
9438
77dde6234fec
3rd battle event handler
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9436
diff
changeset
|
253 |
elseif (CurrentHedgehog == smuggler1.gear or CurrentHedgehog == smuggler2.gear) and ongoingBattle == 3 then |
77dde6234fec
3rd battle event handler
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9436
diff
changeset
|
254 |
AnimSwitchHog(hero.gear) |
77dde6234fec
3rd battle event handler
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9436
diff
changeset
|
255 |
TurnTimeLeft = 0 |
9426
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
256 |
elseif CurrentHedgehog == ally.gear then |
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
257 |
TurnTimeLeft = 0 |
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
258 |
end |
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
259 |
end |
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
260 |
|
9422
85b17f344c97
first dialog added, maybe reconsider the seconds the bubbles are displayed later
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9420
diff
changeset
|
261 |
function onGameTick() |
85b17f344c97
first dialog added, maybe reconsider the seconds the bubbles are displayed later
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9420
diff
changeset
|
262 |
AnimUnWait() |
85b17f344c97
first dialog added, maybe reconsider the seconds the bubbles are displayed later
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9420
diff
changeset
|
263 |
if ShowAnimation() == false then |
85b17f344c97
first dialog added, maybe reconsider the seconds the bubbles are displayed later
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9420
diff
changeset
|
264 |
return |
85b17f344c97
first dialog added, maybe reconsider the seconds the bubbles are displayed later
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9420
diff
changeset
|
265 |
end |
85b17f344c97
first dialog added, maybe reconsider the seconds the bubbles are displayed later
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9420
diff
changeset
|
266 |
ExecuteAfterAnimations() |
85b17f344c97
first dialog added, maybe reconsider the seconds the bubbles are displayed later
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9420
diff
changeset
|
267 |
CheckEvents() |
9416
8d0054adf0c6
added weapon crates
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9412
diff
changeset
|
268 |
end |
8d0054adf0c6
added weapon crates
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9412
diff
changeset
|
269 |
|
8d0054adf0c6
added weapon crates
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9412
diff
changeset
|
270 |
function onAmmoStoreInit() |
8d0054adf0c6
added weapon crates
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9412
diff
changeset
|
271 |
SetAmmo(amBlowTorch, 0, 0, 0, 1) |
8d0054adf0c6
added weapon crates
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9412
diff
changeset
|
272 |
SetAmmo(amRope, 0, 0, 0, 1) |
9758 | 273 |
SetAmmo(amPortalGun, 0, 0, 0, 1) |
9441 | 274 |
SetAmmo(amGirder, 0, 0, 0, 3) |
9404
4ae9b399fa73
desert planet main mission addition - hwp will be added when fully finished
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
275 |
end |
4ae9b399fa73
desert planet main mission addition - hwp will be added when fully finished
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
276 |
|
9782
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
277 |
function onGearAdd(gear) |
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
278 |
if GetGearType(gear) == gtCase then |
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
279 |
if GetX(gear) == btorch2X and GetY(gear) == btorch2Y then |
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
280 |
btorch2.gear = gear |
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
281 |
btorch2.destroyed = false |
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
282 |
btorch2.deleted = false |
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
283 |
elseif GetX(gear) == girderX and GetY(gear) == girderY then |
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
284 |
girder.gear = gear |
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
285 |
girder.destroyed = false |
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
286 |
girder.deleted = false |
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
287 |
end |
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
288 |
end |
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
289 |
end |
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
290 |
|
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
291 |
function onGearDamage(gear, damage) |
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
292 |
if gear == girder.gear then |
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
293 |
girder.destroyed = true |
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
294 |
elseif gear == btorch2.gear then |
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
295 |
btorch2.destroyed = true |
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
296 |
end |
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
297 |
end |
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
298 |
|
9410
92a0b74ed740
added hedgehogs in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9408
diff
changeset
|
299 |
function onGearDelete(gear) |
9782
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
300 |
if gear == girder.gear then |
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
301 |
girder.deleted = true |
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
302 |
elseif gear == btorch2.gear then |
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
303 |
btorch2.deleted = true |
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
304 |
end |
9410
92a0b74ed740
added hedgehogs in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9408
diff
changeset
|
305 |
if gear == hero.gear then |
92a0b74ed740
added hedgehogs in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9408
diff
changeset
|
306 |
hero.dead = true |
9430 | 307 |
elseif (gear == smuggler1.gear or gear == smuggler2.gear or gear == smuggler3.gear) and heroIsInBattle then |
308 |
heroIsInBattle = false |
|
309 |
ongoingBattle = 0 |
|
9410
92a0b74ed740
added hedgehogs in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9408
diff
changeset
|
310 |
end |
92a0b74ed740
added hedgehogs in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9408
diff
changeset
|
311 |
end |
92a0b74ed740
added hedgehogs in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9408
diff
changeset
|
312 |
|
9422
85b17f344c97
first dialog added, maybe reconsider the seconds the bubbles are displayed later
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9420
diff
changeset
|
313 |
function onPrecise() |
85b17f344c97
first dialog added, maybe reconsider the seconds the bubbles are displayed later
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9420
diff
changeset
|
314 |
if GameTime > 3000 then |
9758 | 315 |
SetAnimSkip(true) |
9422
85b17f344c97
first dialog added, maybe reconsider the seconds the bubbles are displayed later
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9420
diff
changeset
|
316 |
end |
85b17f344c97
first dialog added, maybe reconsider the seconds the bubbles are displayed later
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9420
diff
changeset
|
317 |
end |
85b17f344c97
first dialog added, maybe reconsider the seconds the bubbles are displayed later
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9420
diff
changeset
|
318 |
|
9426
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
319 |
-------------- EVENTS ------------------ |
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
320 |
|
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
321 |
function onHeroDeath(gear) |
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
322 |
if hero.dead then |
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
323 |
return true |
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
324 |
end |
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
325 |
return false |
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
326 |
end |
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
327 |
|
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
328 |
function onHeroAtFirstBattle(gear) |
9783
1e6b91080bfc
changed some things about checkpoints and battle events in desert01,fixes turn interruption when battle one or two is triggered
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9782
diff
changeset
|
329 |
if not hero.dead and not heroIsInBattle and GetHealth(smuggler1.gear) and GetX(hero.gear) <= 1450 and GetX(hero.gear) > 80 |
1e6b91080bfc
changed some things about checkpoints and battle events in desert01,fixes turn interruption when battle one or two is triggered
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9782
diff
changeset
|
330 |
and GetY(hero.gear) <= GetY(smuggler1.gear)+5 and GetY(hero.gear) >= GetY(smuggler1.gear)-40 and StoppedGear(hero.gear) then |
9426
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
331 |
return true |
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
332 |
end |
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
333 |
return false |
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
334 |
end |
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
335 |
|
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
336 |
function onHeroFleeFirstBattle(gear) |
9783
1e6b91080bfc
changed some things about checkpoints and battle events in desert01,fixes turn interruption when battle one or two is triggered
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9782
diff
changeset
|
337 |
if GetHealth(hero.gear) and GetHealth(smuggler1.gear) and heroIsInBattle |
9810
54c0fdec4600
changing math functions that may cause desyncs
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9802
diff
changeset
|
338 |
and not gearIsInCircle(smuggler1.gear, GetX(hero.gear), GetY(hero.gear), 1400, false) |
54c0fdec4600
changing math functions that may cause desyncs
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9802
diff
changeset
|
339 |
and StoppedGear(hero.gear) then |
9428
b483a2683d08
first checkpoint with saved ammo left :)
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9426
diff
changeset
|
340 |
return true |
b483a2683d08
first checkpoint with saved ammo left :)
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9426
diff
changeset
|
341 |
end |
b483a2683d08
first checkpoint with saved ammo left :)
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9426
diff
changeset
|
342 |
return false |
b483a2683d08
first checkpoint with saved ammo left :)
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9426
diff
changeset
|
343 |
end |
b483a2683d08
first checkpoint with saved ammo left :)
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9426
diff
changeset
|
344 |
|
9430 | 345 |
-- saves the location of the hero and prompts him for the second battle |
9428
b483a2683d08
first checkpoint with saved ammo left :)
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9426
diff
changeset
|
346 |
function onHeroAtCheckpoint2(gear) |
b483a2683d08
first checkpoint with saved ammo left :)
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9426
diff
changeset
|
347 |
if not hero.dead and GetX(hero.gear) > 1000 and GetX(hero.gear) < 1100 |
9783
1e6b91080bfc
changed some things about checkpoints and battle events in desert01,fixes turn interruption when battle one or two is triggered
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9782
diff
changeset
|
348 |
and GetY(hero.gear) > 590 and GetY(hero.gear) < 700 and StoppedGear(hero.gear) then |
9432 | 349 |
return true |
350 |
end |
|
351 |
return false |
|
352 |
end |
|
353 |
||
354 |
function onHeroAtCheckpoint3(gear) |
|
355 |
if not hero.dead and GetX(hero.gear) > 1610 and GetX(hero.gear) < 1680 |
|
9783
1e6b91080bfc
changed some things about checkpoints and battle events in desert01,fixes turn interruption when battle one or two is triggered
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9782
diff
changeset
|
356 |
and GetY(hero.gear) > 850 and GetY(hero.gear) < 1000 and StoppedGear(hero.gear) then |
9426
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
357 |
return true |
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
358 |
end |
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
359 |
return false |
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
360 |
end |
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
361 |
|
9434 | 362 |
function onHeroAtCheckpoint4(gear) |
363 |
if not hero.dead and GetX(hero.gear) > 1110 and GetX(hero.gear) < 1300 |
|
364 |
and GetY(hero.gear) > 1100 and GetY(hero.gear) < 1220 then |
|
365 |
return true |
|
366 |
end |
|
367 |
return false |
|
368 |
end |
|
369 |
||
9438
77dde6234fec
3rd battle event handler
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9436
diff
changeset
|
370 |
function onHeroAtThirdBattle(gear) |
77dde6234fec
3rd battle event handler
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9436
diff
changeset
|
371 |
if not hero.dead and GetX(hero.gear) > 2000 and GetX(hero.gear) < 2200 |
77dde6234fec
3rd battle event handler
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9436
diff
changeset
|
372 |
and GetY(hero.gear) > 1430 and GetY(hero.gear) < 1670 then |
77dde6234fec
3rd battle event handler
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9436
diff
changeset
|
373 |
return true |
77dde6234fec
3rd battle event handler
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9436
diff
changeset
|
374 |
end |
77dde6234fec
3rd battle event handler
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9436
diff
changeset
|
375 |
return false |
77dde6234fec
3rd battle event handler
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9436
diff
changeset
|
376 |
end |
77dde6234fec
3rd battle event handler
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9436
diff
changeset
|
377 |
|
9441 | 378 |
function onCheckForWin1(gear) |
9782
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
379 |
if not hero.dead and not btorch2.destroyed and btorch2.deleted then |
9441 | 380 |
return true |
381 |
end |
|
382 |
return false |
|
383 |
end |
|
384 |
||
385 |
function onCheckForWin2(gear) |
|
9782
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
386 |
if not hero.dead and not girder.destroyed and girder.deleted then |
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
387 |
return true |
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
388 |
end |
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
389 |
return false |
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
390 |
end |
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
391 |
|
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
392 |
function onCrateDestroyed(gear) |
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
393 |
if not hero.dead and girder.destroyed or btorch2.destroyed then |
9441 | 394 |
return true |
395 |
end |
|
396 |
return false |
|
397 |
end |
|
398 |
||
9639
6b2ae2eaf1b2
remove unnecessary comments
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9632
diff
changeset
|
399 |
-------------- ACTIONS ------------------ |
9426
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
400 |
|
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
401 |
function heroDeath(gear) |
9782
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
402 |
lose() |
9426
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
403 |
end |
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
404 |
|
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
405 |
function heroAtFirstBattle(gear) |
9428
b483a2683d08
first checkpoint with saved ammo left :)
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9426
diff
changeset
|
406 |
AnimCaption(hero.gear, loc("A smuggler! Prepare for battle"), 5000) |
9426
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
407 |
TurnTimeLeft = 0 |
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
408 |
heroIsInBattle = true |
9758 | 409 |
ongoingBattle = 1 |
9426
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
410 |
AnimSwitchHog(smuggler1.gear) |
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
411 |
TurnTimeLeft = 0 |
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
412 |
end |
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
413 |
|
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
414 |
function heroFleeFirstBattle(gear) |
11692
68eddcdc9f26
Typo fixes for A Space Adventure campaign
Wuzzy <almikes@aol.com>
parents:
10712
diff
changeset
|
415 |
AnimSay(smuggler1.gear, loc("Run away, you coward!"), SAY_SHOUT, 4000) |
9426
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
416 |
TurnTimeLeft = 0 |
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
417 |
heroIsInBattle = false |
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
418 |
ongoingBattle = 0 |
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
419 |
end |
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
420 |
|
9428
b483a2683d08
first checkpoint with saved ammo left :)
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9426
diff
changeset
|
421 |
function heroAtCheckpoint2(gear) |
9621
0e633b929825
should fix deadlock checkpoint reported by Wuzzy
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9620
diff
changeset
|
422 |
if GetAmmoCount(hero.gear, amRope) > 0 or GetAmmoCount(hero.gear, amParachute) > 0 then |
0e633b929825
should fix deadlock checkpoint reported by Wuzzy
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9620
diff
changeset
|
423 |
saveCheckPointLocal("2") |
0e633b929825
should fix deadlock checkpoint reported by Wuzzy
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9620
diff
changeset
|
424 |
end |
9476
3ca7160dc6d2
fix bug, not triggered event
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9474
diff
changeset
|
425 |
secondBattle() |
9432 | 426 |
end |
427 |
||
428 |
function heroAtCheckpoint3(gear) |
|
9621
0e633b929825
should fix deadlock checkpoint reported by Wuzzy
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9620
diff
changeset
|
429 |
if GetAmmoCount(hero.gear, amRope) > 0 then |
0e633b929825
should fix deadlock checkpoint reported by Wuzzy
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9620
diff
changeset
|
430 |
saveCheckPointLocal("3") |
0e633b929825
should fix deadlock checkpoint reported by Wuzzy
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9620
diff
changeset
|
431 |
end |
9476
3ca7160dc6d2
fix bug, not triggered event
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9474
diff
changeset
|
432 |
secondBattle() |
9428
b483a2683d08
first checkpoint with saved ammo left :)
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9426
diff
changeset
|
433 |
end |
b483a2683d08
first checkpoint with saved ammo left :)
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9426
diff
changeset
|
434 |
|
9434 | 435 |
function heroAtCheckpoint4(gear) |
9582
bf314b2258b3
less variables used to save the checkpoints - potential breakage xD
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9578
diff
changeset
|
436 |
saveCheckPointLocal("4") |
9434 | 437 |
end |
438 |
||
9438
77dde6234fec
3rd battle event handler
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9436
diff
changeset
|
439 |
function heroAtThirdBattle(gear) |
77dde6234fec
3rd battle event handler
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9436
diff
changeset
|
440 |
heroIsInBattle = true |
77dde6234fec
3rd battle event handler
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9436
diff
changeset
|
441 |
ongoingBattle = 3 |
11692
68eddcdc9f26
Typo fixes for A Space Adventure campaign
Wuzzy <almikes@aol.com>
parents:
10712
diff
changeset
|
442 |
AnimSay(smuggler3.gear, loc("Who's there?! I'll get you!"), SAY_SHOUT, 5000) |
9438
77dde6234fec
3rd battle event handler
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9436
diff
changeset
|
443 |
AnimSwitchHog(smuggler3.gear) |
77dde6234fec
3rd battle event handler
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9436
diff
changeset
|
444 |
TurnTimeLeft = 0 |
77dde6234fec
3rd battle event handler
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9436
diff
changeset
|
445 |
end |
77dde6234fec
3rd battle event handler
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9436
diff
changeset
|
446 |
|
9782
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
447 |
function crateDestroyed(gear) |
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
448 |
lose() |
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
449 |
end |
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
450 |
|
9443 | 451 |
-- for some weird reson I couldn't call the same action for both events |
9441 | 452 |
function checkForWin1(gear) |
453 |
checkForWin() |
|
454 |
end |
|
455 |
||
456 |
function checkForWin2(gear) |
|
9443 | 457 |
-- ok lets place one more checkpoint as next part seems challenging without rope |
458 |
if cratesFound == 0 then |
|
9582
bf314b2258b3
less variables used to save the checkpoints - potential breakage xD
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9578
diff
changeset
|
459 |
saveCheckPointLocal("5") |
9782
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
460 |
SaveCampaignVar("HogsPosition", GetX(hero.gear)..","..GetY(hero.gear)) |
9443 | 461 |
end |
9758 | 462 |
|
463 |
checkForWin() |
|
9441 | 464 |
end |
465 |
||
9422
85b17f344c97
first dialog added, maybe reconsider the seconds the bubbles are displayed later
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9420
diff
changeset
|
466 |
-------------- ANIMATIONS ------------------ |
85b17f344c97
first dialog added, maybe reconsider the seconds the bubbles are displayed later
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9420
diff
changeset
|
467 |
|
85b17f344c97
first dialog added, maybe reconsider the seconds the bubbles are displayed later
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9420
diff
changeset
|
468 |
function Skipanim(anim) |
85b17f344c97
first dialog added, maybe reconsider the seconds the bubbles are displayed later
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9420
diff
changeset
|
469 |
if goals[anim] ~= nil then |
85b17f344c97
first dialog added, maybe reconsider the seconds the bubbles are displayed later
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9420
diff
changeset
|
470 |
ShowMission(unpack(goals[anim])) |
85b17f344c97
first dialog added, maybe reconsider the seconds the bubbles are displayed later
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9420
diff
changeset
|
471 |
end |
9426
f89c512925da
first battle event handlers, hero starting ammo and hero death event handlers
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9424
diff
changeset
|
472 |
AnimSwitchHog(hero.gear) |
9620
55c82fd210cb
fixed lua error reported by Wuzzy
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9582
diff
changeset
|
473 |
if anim == dialog01 then |
55c82fd210cb
fixed lua error reported by Wuzzy
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9582
diff
changeset
|
474 |
startMission() |
55c82fd210cb
fixed lua error reported by Wuzzy
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9582
diff
changeset
|
475 |
end |
9422
85b17f344c97
first dialog added, maybe reconsider the seconds the bubbles are displayed later
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9420
diff
changeset
|
476 |
end |
85b17f344c97
first dialog added, maybe reconsider the seconds the bubbles are displayed later
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9420
diff
changeset
|
477 |
|
85b17f344c97
first dialog added, maybe reconsider the seconds the bubbles are displayed later
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9420
diff
changeset
|
478 |
function AnimationSetup() |
85b17f344c97
first dialog added, maybe reconsider the seconds the bubbles are displayed later
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9420
diff
changeset
|
479 |
-- DIALOG 01 - Start, getting info about the device |
85b17f344c97
first dialog added, maybe reconsider the seconds the bubbles are displayed later
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9420
diff
changeset
|
480 |
AddSkipFunction(dialog01, Skipanim, {dialog01}) |
85b17f344c97
first dialog added, maybe reconsider the seconds the bubbles are displayed later
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9420
diff
changeset
|
481 |
table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}}) |
11692
68eddcdc9f26
Typo fixes for A Space Adventure campaign
Wuzzy <almikes@aol.com>
parents:
10712
diff
changeset
|
482 |
table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("On the Planet of Sand, you have to double check your moves ..."), 5000}}) |
68eddcdc9f26
Typo fixes for A Space Adventure campaign
Wuzzy <almikes@aol.com>
parents:
10712
diff
changeset
|
483 |
table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Finally you are here!"), SAY_SAY, 2000}}) |
9422
85b17f344c97
first dialog added, maybe reconsider the seconds the bubbles are displayed later
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9420
diff
changeset
|
484 |
table.insert(dialog01, {func = AnimWait, args = {hero.gear, 2000}}) |
9758 | 485 |
table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("Thank you for meeting me on such a short notice!"), SAY_SAY, 3000}}) |
9422
85b17f344c97
first dialog added, maybe reconsider the seconds the bubbles are displayed later
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9420
diff
changeset
|
486 |
table.insert(dialog01, {func = AnimWait, args = {ally.gear, 4000}}) |
9574
da3d39667881
strings checked, all ok except ice02 that will be probably changed
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9490
diff
changeset
|
487 |
table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("No problem, I would do anything for H!"), SAY_SAY, 4000}}) |
9422
85b17f344c97
first dialog added, maybe reconsider the seconds the bubbles are displayed later
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9420
diff
changeset
|
488 |
table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Now listen carefully! Below us there are tunnels that have been created naturally over the years"), SAY_SAY, 4000}}) |
11692
68eddcdc9f26
Typo fixes for A Space Adventure campaign
Wuzzy <almikes@aol.com>
parents:
10712
diff
changeset
|
489 |
table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("I have heard that the local tribes say that many years ago some PAotH scientists were dumping their waste here."), SAY_SAY, 5000}}) |
68eddcdc9f26
Typo fixes for A Space Adventure campaign
Wuzzy <almikes@aol.com>
parents:
10712
diff
changeset
|
490 |
table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("H confirmed that there isn't such a PAotH activity logged."), SAY_SAY, 4000}}) |
68eddcdc9f26
Typo fixes for A Space Adventure campaign
Wuzzy <almikes@aol.com>
parents:
10712
diff
changeset
|
491 |
table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("So, I believe that it's a good place to start."), SAY_SAY, 3000}}) |
68eddcdc9f26
Typo fixes for A Space Adventure campaign
Wuzzy <almikes@aol.com>
parents:
10712
diff
changeset
|
492 |
table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Beware, though! Many smugglers come often to explore these tunnels and scavenge whatever valuable items they can find."), SAY_SAY, 5000}}) |
9574
da3d39667881
strings checked, all ok except ice02 that will be probably changed
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9490
diff
changeset
|
493 |
table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("They won't hesitate to attack you in order to rob you!"), SAY_SAY, 4000}}) |
9422
85b17f344c97
first dialog added, maybe reconsider the seconds the bubbles are displayed later
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9420
diff
changeset
|
494 |
table.insert(dialog01, {func = AnimWait, args = {hero.gear, 6000}}) |
11692
68eddcdc9f26
Typo fixes for A Space Adventure campaign
Wuzzy <almikes@aol.com>
parents:
10712
diff
changeset
|
495 |
table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("Okay, I'll be extra careful!"), SAY_SAY, 4000}}) |
9422
85b17f344c97
first dialog added, maybe reconsider the seconds the bubbles are displayed later
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9420
diff
changeset
|
496 |
table.insert(dialog01, {func = AnimWait, args = {ally.gear, 2000}}) |
11692
68eddcdc9f26
Typo fixes for A Space Adventure campaign
Wuzzy <almikes@aol.com>
parents:
10712
diff
changeset
|
497 |
table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("The tunnel entrance is over there."), SAY_SAY, 3000}}) |
9422
85b17f344c97
first dialog added, maybe reconsider the seconds the bubbles are displayed later
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9420
diff
changeset
|
498 |
table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Good luck!"), SAY_SAY, 3000}}) |
85b17f344c97
first dialog added, maybe reconsider the seconds the bubbles are displayed later
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9420
diff
changeset
|
499 |
table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}}) |
9758 | 500 |
table.insert(dialog01, {func = startMission, args = {hero.gear}}) |
9422
85b17f344c97
first dialog added, maybe reconsider the seconds the bubbles are displayed later
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9420
diff
changeset
|
501 |
end |
9432 | 502 |
|
503 |
--------------- OTHER FUNCTIONS ------------------ |
|
504 |
||
9474
c255f6c46e33
stats and minor corrections, difficulty adjustment
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9453
diff
changeset
|
505 |
function startMission() |
9620
55c82fd210cb
fixed lua error reported by Wuzzy
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9582
diff
changeset
|
506 |
AnimSwitchHog(ally.gear) |
9474
c255f6c46e33
stats and minor corrections, difficulty adjustment
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9453
diff
changeset
|
507 |
TurnTimeLeft = 0 |
c255f6c46e33
stats and minor corrections, difficulty adjustment
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9453
diff
changeset
|
508 |
end |
c255f6c46e33
stats and minor corrections, difficulty adjustment
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9453
diff
changeset
|
509 |
|
9432 | 510 |
function secondBattle() |
511 |
-- second battle |
|
9783
1e6b91080bfc
changed some things about checkpoints and battle events in desert01,fixes turn interruption when battle one or two is triggered
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9782
diff
changeset
|
512 |
if heroIsInBattle and ongoingBattle == 1 then |
11692
68eddcdc9f26
Typo fixes for A Space Adventure campaign
Wuzzy <almikes@aol.com>
parents:
10712
diff
changeset
|
513 |
AnimSay(smuggler1.gear, loc("Get him, Spike!"), SAY_SHOUT, 4000) |
9783
1e6b91080bfc
changed some things about checkpoints and battle events in desert01,fixes turn interruption when battle one or two is triggered
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9782
diff
changeset
|
514 |
end |
9432 | 515 |
heroIsInBattle = true |
516 |
ongoingBattle = 2 |
|
11692
68eddcdc9f26
Typo fixes for A Space Adventure campaign
Wuzzy <almikes@aol.com>
parents:
10712
diff
changeset
|
517 |
AnimSay(smuggler2.gear, loc("This is seems like a wealthy hedgehog, nice ..."), SAY_THINK, 5000) |
9432 | 518 |
AnimSwitchHog(smuggler2.gear) |
519 |
TurnTimeLeft = 0 |
|
520 |
end |
|
9434 | 521 |
|
9582
bf314b2258b3
less variables used to save the checkpoints - potential breakage xD
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9578
diff
changeset
|
522 |
function saveCheckPointLocal(cpoint) |
9436 | 523 |
-- save checkpoint |
9758 | 524 |
saveCheckpoint(cpoint) |
9436 | 525 |
SaveCampaignVar("HeroHealth", GetHealth(hero.gear)) |
9630 | 526 |
-- bazooka - grenade - rope - parachute - deagle - btorch - construct - portal - rcplane |
9436 | 527 |
SaveCampaignVar("HeroAmmo", GetAmmoCount(hero.gear, amBazooka)..GetAmmoCount(hero.gear, amGrenade).. |
528 |
GetAmmoCount(hero.gear, amRope)..GetAmmoCount(hero.gear, amParachute)..GetAmmoCount(hero.gear, amDEagle).. |
|
10712
89eaf51d0e9a
Probably fixes issue #891 although the overall playability of the campaign, who knows, since invalid name was used in the add too
nemo
parents:
9831
diff
changeset
|
529 |
GetAmmoCount(hero.gear, amBlowTorch)..GetAmmoCount(hero.gear, amGirder).. |
9630 | 530 |
GetAmmoCount(hero.gear, amPortalGun)..GetAmmoCount(hero.gear, amRCPlane)) |
9436 | 531 |
AnimCaption(hero.gear, loc("Checkpoint reached!"), 5000) |
532 |
end |
|
9434 | 533 |
|
9436 | 534 |
function loadHeroAmmo() |
535 |
-- hero ammo |
|
536 |
local ammo = GetCampaignVar("HeroAmmo") |
|
537 |
AddAmmo(hero.gear, amRope, tonumber(ammo:sub(3,3))) |
|
538 |
AddAmmo(hero.gear, amBazooka, tonumber(ammo:sub(1,1))) |
|
539 |
AddAmmo(hero.gear, amParachute, tonumber(ammo:sub(4,4))) |
|
540 |
AddAmmo(hero.gear, amGrenade, tonumber(ammo:sub(2,2))) |
|
541 |
AddAmmo(hero.gear, amDEagle, tonumber(ammo:sub(5,5))) |
|
542 |
AddAmmo(hero.gear, amBlowTorch, tonumber(ammo:sub(6,6))) |
|
543 |
-- weird, if 0 bazooka isn't displayed in the weapons menu |
|
544 |
if tonumber(ammo:sub(7,7)) > 0 then |
|
10712
89eaf51d0e9a
Probably fixes issue #891 although the overall playability of the campaign, who knows, since invalid name was used in the add too
nemo
parents:
9831
diff
changeset
|
545 |
AddAmmo(hero.gear, amGirder, tonumber(ammo:sub(7,7))) |
9436 | 546 |
end |
547 |
AddAmmo(hero.gear, amPortalGun, tonumber(ammo:sub(8,8))) |
|
9630 | 548 |
AddAmmo(hero.gear, amRCPlane, tonumber(ammo:sub(9,9))) |
9434 | 549 |
end |
9441 | 550 |
|
551 |
function checkForWin() |
|
552 |
if cratesFound == 0 then |
|
9758 | 553 |
-- have to look more |
11692
68eddcdc9f26
Typo fixes for A Space Adventure campaign
Wuzzy <almikes@aol.com>
parents:
10712
diff
changeset
|
554 |
AnimSay(hero.gear, loc("Haven't found it yet ..."), SAY_THINK, 5000) |
9441 | 555 |
cratesFound = cratesFound + 1 |
556 |
elseif cratesFound == 1 then |
|
557 |
-- end game |
|
9578
16139270448f
save main missions' status
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9574
diff
changeset
|
558 |
saveCompletedStatus(5) |
11692
68eddcdc9f26
Typo fixes for A Space Adventure campaign
Wuzzy <almikes@aol.com>
parents:
10712
diff
changeset
|
559 |
AnimSay(hero.gear, loc("Hooray!"), SAY_SHOUT, 5000) |
9642
8a691e0f117a
use consts for TStatInfo enum
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9639
diff
changeset
|
560 |
SendStat(siGameResult, loc("Congratulations, you won!")) |
11692
68eddcdc9f26
Typo fixes for A Space Adventure campaign
Wuzzy <almikes@aol.com>
parents:
10712
diff
changeset
|
561 |
SendStat(siCustomAchievement, loc("To win the game you had to collect the 2 crates with no specific order.")) |
9642
8a691e0f117a
use consts for TStatInfo enum
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9639
diff
changeset
|
562 |
SendStat(siPlayerKills,'1',teamC.name) |
8a691e0f117a
use consts for TStatInfo enum
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9639
diff
changeset
|
563 |
SendStat(siPlayerKills,'0',teamB.name) |
9441 | 564 |
EndGame() |
565 |
end |
|
566 |
end |
|
9782
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
567 |
|
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
568 |
function lose() |
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
569 |
SendStat(siGameResult, loc("Hog Solo lost, try again!")) |
11692
68eddcdc9f26
Typo fixes for A Space Adventure campaign
Wuzzy <almikes@aol.com>
parents:
10712
diff
changeset
|
570 |
SendStat(siCustomAchievement, loc("To win the game you have to find the right crate.")) |
68eddcdc9f26
Typo fixes for A Space Adventure campaign
Wuzzy <almikes@aol.com>
parents:
10712
diff
changeset
|
571 |
SendStat(siCustomAchievement, loc("You can avoid some battles.")) |
68eddcdc9f26
Typo fixes for A Space Adventure campaign
Wuzzy <almikes@aol.com>
parents:
10712
diff
changeset
|
572 |
SendStat(siCustomAchievement, loc("Use your ammo wisely.")) |
9782
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
573 |
SendStat(siCustomAchievement, loc("Don't destroy the device crate!")) |
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
574 |
SendStat(siPlayerKills,'1',teamB.name) |
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
575 |
SendStat(siPlayerKills,'0',teamC.name) |
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
576 |
EndGame() |
6c3cad32d4f4
fixed getting device crates with rc plane,end game when device crates destroyed,save/load hero position for checkpoint 5 in desert01
Periklis Ntanasis <pntanasis@gmail.com>
parents:
9765
diff
changeset
|
577 |
end |