author | Periklis Ntanasis <pntanasis@gmail.com> |
Mon, 05 Aug 2013 19:49:43 +0300 | |
branch | spacecampaign |
changeset 9469 | 6896f9298b80 |
parent 9467 | 483a73697535 |
child 9471 | 867f020b0621 |
permissions | -rw-r--r-- |
9467
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
1 |
------------------- ABOUT ---------------------- |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
2 |
-- |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
3 |
-- Hero has to pass as fast as possible inside the |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
4 |
-- rings as in the racer mode |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
5 |
|
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
6 |
HedgewarsScriptLoad("/Scripts/Locale.lua") |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
7 |
HedgewarsScriptLoad("/Scripts/Animate.lua") |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
8 |
|
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
9 |
----------------- VARIABLES -------------------- |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
10 |
-- globals |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
11 |
local campaignName = loc("A Space Adventure") |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
12 |
local missionName = loc("Desert planet, Journey down below!") |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
13 |
local challengeStarted = false |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
14 |
local currentWaypoint = 1 |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
15 |
local radius = 75 |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
16 |
local totalTime = 15000 |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
17 |
local totalSaucers = 3 |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
18 |
local gameEnded = false |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
19 |
-- dialogs |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
20 |
local dialog01 = {} |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
21 |
-- mission objectives |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
22 |
local goals = { |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
23 |
[dialog01] = {missionName, loc("Getting ready"), loc("Use your saucer and pass from the rings!"), 1, 4500}, |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
24 |
} |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
25 |
-- hogs |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
26 |
local hero = {} |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
27 |
local ally = {} |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
28 |
-- teams |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
29 |
local teamA = {} |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
30 |
-- hedgehogs values |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
31 |
hero.name = "Hog Solo" |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
32 |
hero.x = 1600 |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
33 |
hero.y = 1950 |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
34 |
hero.dead = false |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
35 |
teamA.name = loc("Hog Solo") |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
36 |
teamA.color = tonumber("38D61C",16) -- green |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
37 |
-- way points |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
38 |
local current waypoint = 1 |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
39 |
local waypoints = { |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
40 |
[1] = {x=1450, y=140}, |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
41 |
[2] = {x=990, y=580}, |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
42 |
[3] = {x=1650, y=950}, |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
43 |
[4] = {x=620, y=630}, |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
44 |
[5] = {x=1470, y=540}, |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
45 |
[6] = {x=1960, y=60}, |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
46 |
[7] = {x=1600, y=400}, |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
47 |
[8] = {x=240, y=940}, |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
48 |
[9] = {x=200, y=530}, |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
49 |
[10] = {x=1180, y=120}, |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
50 |
[11] = {x=1950, y=660}, |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
51 |
[12] = {x=1280, y=980}, |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
52 |
[13] = {x=590, y=1100}, |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
53 |
[14] = {x=20, y=620}, |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
54 |
[15] = {x=hero.x, y=hero.y} |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
55 |
} |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
56 |
|
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
57 |
-------------- LuaAPI EVENT HANDLERS ------------------ |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
58 |
|
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
59 |
function onGameInit() |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
60 |
GameFlags = gfOneClanMode |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
61 |
Seed = 1 |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
62 |
TurnTime = 6000 |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
63 |
Delay = 2 |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
64 |
CaseFreq = 0 |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
65 |
MinesNum = 0 |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
66 |
MinesTime = 1 |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
67 |
Explosives = 0 |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
68 |
SuddenDeathTurns = 1 |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
69 |
WaterRise = 150 |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
70 |
Map = "desert02_map" |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
71 |
Theme = "Desert" |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
72 |
|
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
73 |
-- Hog Solo |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
74 |
AddTeam(teamA.name, teamA.color, "Bone", "Island", "HillBilly", "cm_birdy") |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
75 |
hero.gear = AddHog(hero.name, 0, 100, "war_desertgrenadier1") |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
76 |
AnimSetGearPosition(hero.gear, hero.x, hero.y) |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
77 |
HogTurnLeft(hero.gear, true) |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
78 |
|
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
79 |
AnimInit() |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
80 |
AnimationSetup() |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
81 |
end |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
82 |
|
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
83 |
function onGameStart() |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
84 |
AnimWait(hero.gear, 3000) |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
85 |
FollowGear(hero.gear) |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
86 |
|
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
87 |
AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 0) |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
88 |
|
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
89 |
AddAmmo(hero.gear, amRope, 99) |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
90 |
|
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
91 |
SendHealthStatsOff() |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
92 |
AddAnim(dialog01) |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
93 |
end |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
94 |
|
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
95 |
function onNewTurn() |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
96 |
if not hero.dead and CurrentHedgehog == ally.gear and challengeStarted then |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
97 |
heroLost() |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
98 |
end |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
99 |
end |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
100 |
|
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
101 |
function onGameTick() |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
102 |
AnimUnWait() |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
103 |
if ShowAnimation() == false then |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
104 |
return |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
105 |
end |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
106 |
ExecuteAfterAnimations() |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
107 |
CheckEvents() |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
108 |
end |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
109 |
|
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
110 |
function onGearDelete(gear) |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
111 |
if gear == hero.gear then |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
112 |
hero.dead = true |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
113 |
end |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
114 |
end |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
115 |
|
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
116 |
function onPrecise() |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
117 |
if GameTime > 3000 then |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
118 |
SetAnimSkip(true) |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
119 |
end |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
120 |
end |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
121 |
|
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
122 |
-------------- EVENTS ------------------ |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
123 |
|
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
124 |
function onHeroDeath(gear) |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
125 |
if hero.dead then |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
126 |
return true |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
127 |
end |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
128 |
return false |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
129 |
end |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
130 |
|
9469 | 131 |
function onHeroSafe(gear) |
132 |
if not hero.dead and GetY(hero.gear) < 200 and StoppedGear(hero.gear) then |
|
133 |
return true |
|
134 |
end |
|
135 |
return false |
|
136 |
end |
|
137 |
||
9467
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
138 |
-------------- OUTCOMES ------------------ |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
139 |
|
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
140 |
function heroDeath(gear) |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
141 |
heroLost() |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
142 |
end |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
143 |
|
9469 | 144 |
function heroSafe(gear) |
145 |
-- hero win stuff |
|
146 |
EndGame() |
|
147 |
end |
|
148 |
||
9467
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
149 |
-------------- ANIMATIONS ------------------ |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
150 |
|
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
151 |
function Skipanim(anim) |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
152 |
if goals[anim] ~= nil then |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
153 |
ShowMission(unpack(goals[anim])) |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
154 |
end |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
155 |
end |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
156 |
|
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
157 |
function AnimationSetup() |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
158 |
-- DIALOG 01 - Start |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
159 |
AddSkipFunction(dialog01, Skipanim, {dialog01}) |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
160 |
table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}}) |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
161 |
table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Many meters below the surface..."), 5000}}) |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
162 |
table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("The tunnel is about to get flooded..."), SAY_THINK, 4000}}) |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
163 |
table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("I have to reach the surface asap..."), SAY_THINK, 4000}}) |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
164 |
table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}}) |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
165 |
table.insert(dialog01, {func = challengeStart, args = {hero.gear}}) |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
166 |
end |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
167 |
|
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
168 |
------------------ Other Functions ------------------- |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
169 |
|
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
170 |
function challengeStart() |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
171 |
TurnTimeLeft = 0 |
483a73697535
desert sidwquest map and basic script
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff
changeset
|
172 |
end |