3 -- In the desert planet Hero will have to explore |
3 -- In the desert planet Hero will have to explore |
4 -- the dunes below the surface and find the hidden |
4 -- the dunes below the surface and find the hidden |
5 -- crates. It is told that one crate contains the |
5 -- crates. It is told that one crate contains the |
6 -- lost part. |
6 -- lost part. |
7 |
7 |
|
8 -- TODO |
|
9 -- maybe use same name in missionName and frontend mission name.. |
8 |
10 |
9 HedgewarsScriptLoad("/Scripts/Locale.lua") |
11 HedgewarsScriptLoad("/Scripts/Locale.lua") |
10 HedgewarsScriptLoad("/Scripts/Animate.lua") |
12 HedgewarsScriptLoad("/Scripts/Animate.lua") |
11 |
13 |
12 ----------------- VARIABLES -------------------- |
14 ----------------- VARIABLES -------------------- |
|
15 -- globals |
|
16 local campaignName = loc("A Space Adventure") |
|
17 local missionName = loc("Desert planet, lost in sand!") |
|
18 local checkPointReached = 1 -- 1 is normal spawn |
13 -- hogs |
19 -- hogs |
14 local hero = {} |
20 local hero = {} |
15 local bandit1 = {} |
21 local ally = {} |
|
22 local smuggler1 = {} |
|
23 local smuggler2 = {} |
|
24 local smuggler3 = {} |
16 -- teams |
25 -- teams |
17 local teamA = {} |
26 local teamA = {} |
18 local teamB = {} |
27 local teamB = {} |
19 local teamC = {} |
28 local teamC = {} |
20 local teamD = {} |
|
21 -- hedgehogs values |
29 -- hedgehogs values |
22 hero.name = "Hog Solo" |
30 hero.name = "Hog Solo" |
23 hero.x = 340 |
31 hero.x = 1740 |
24 hero.y = 200 |
32 hero.y = 40 |
25 bandit1.name = "Thanta" |
33 hero.dead = false |
26 bandit1.x = 500 |
34 ally.name = "Chief Sandologist" |
27 bandit1.y = 1280 |
35 ally.x = 1660 |
28 teamB.name = loc("Frozen Bandits") |
36 ally.y = 40 |
|
37 smuggler1.name = "Sanndy" |
|
38 smuggler1.x = 320 |
|
39 smuggler1.y = 235 |
|
40 smuggler2.name = "Spike" |
|
41 smuggler2.x = 736 |
|
42 smuggler2.y = 860 |
|
43 smuggler3.name = "Sandstorm" |
|
44 smuggler3.x = 1940 |
|
45 smuggler3.y = 1625 |
|
46 teamA.name = loc("PAotH") |
|
47 teamA.color = tonumber("FF0000",16) -- red |
|
48 teamB.name = loc("Smugglers") |
29 teamB.color = tonumber("0033FF",16) -- blues |
49 teamB.color = tonumber("0033FF",16) -- blues |
30 teamC.name = loc("Hog Solo") |
50 teamC.name = loc("Hog Solo") |
31 teamC.color = tonumber("38D61C",16) -- green |
51 teamC.color = tonumber("38D61C",16) -- green |
32 |
52 |
33 -------------- LuaAPI EVENT HANDLERS ------------------ |
53 -------------- LuaAPI EVENT HANDLERS ------------------ |
34 |
54 |
35 function onGameInit() |
55 function onGameInit() |
36 Seed = 1 |
56 Seed = 1 |
37 --GameFlags = gfDisableWind |
|
38 TurnTime = 25000 |
57 TurnTime = 25000 |
39 CaseFreq = 0 |
58 CaseFreq = 0 |
40 MinesNum = 0 |
59 MinesNum = 0 |
41 MinesTime = 1 |
60 MinesTime = 1 |
42 Explosives = 0 |
61 Explosives = 0 |
47 -- Hog Solo |
66 -- Hog Solo |
48 AddTeam(teamC.name, teamC.color, "Bone", "Island", "HillBilly", "cm_birdy") |
67 AddTeam(teamC.name, teamC.color, "Bone", "Island", "HillBilly", "cm_birdy") |
49 hero.gear = AddHog(hero.name, 0, 100, "war_desertgrenadier1") |
68 hero.gear = AddHog(hero.name, 0, 100, "war_desertgrenadier1") |
50 AnimSetGearPosition(hero.gear, hero.x, hero.y) |
69 AnimSetGearPosition(hero.gear, hero.x, hero.y) |
51 HogTurnLeft(hero.gear, true) |
70 HogTurnLeft(hero.gear, true) |
52 -- Frozen Bandits |
71 -- PAotH undercover scientist and chief Sandologist |
|
72 AddTeam(teamA.name, teamA.color, "Bone", "Island", "HillBilly", "cm_birdy") |
|
73 ally.gear = AddHog(ally.name, 0, 100, "war_desertgrenadier1") |
|
74 AnimSetGearPosition(ally.gear, ally.x, ally.y) |
|
75 -- Smugglers |
53 AddTeam(teamB.name, teamB.color, "Bone", "Island", "HillBilly", "cm_birdy") |
76 AddTeam(teamB.name, teamB.color, "Bone", "Island", "HillBilly", "cm_birdy") |
54 bandit1.gear = AddHog(bandit1.name, 1, 120, "tophats") |
77 smuggler1.gear = AddHog(smuggler1.name, 1, 120, "tophats") |
55 AnimSetGearPosition(bandit1.gear, bandit1.x, bandit1.y) |
78 AnimSetGearPosition(smuggler1.gear, smuggler1.x, smuggler1.y |
56 HogTurnLeft(bandit1.gear, true) |
79 smuggler2.gear = AddHog(smuggler2.name, 1, 120, "tophats") |
57 |
80 AnimSetGearPosition(smuggler2.gear, smuggler2.x, smuggler2.y) |
|
81 smuggler1.gear = AddHog(smuggler3.name, 1, 120, "tophats") |
|
82 AnimSetGearPosition(smuggler3.gear, smuggler3.x, smuggler3.y) |
58 |
83 |
59 --AnimInit() |
84 --AnimInit() |
60 --AnimationSetup() |
85 --AnimationSetup() |
61 end |
86 end |
62 |
87 |