Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/campaignHS15/data/levels/expeditionSector.oxw @ 10892

Last change on this file since 10892 was 10892, checked in by bhatiab, 9 years ago

Edited planets in expeditionsector and shuttlerealiation

File size: 14.0 KB
Line 
1<!--TODO: Rename screenshot as soon as it is in data_extern branch -->
2<LevelInfo
3    name = "Expedition to Sector 5C"
4    description = "Commander, our scientists are reporting strange binary radio signals from a yet unexplored and thought to be uninhabited region, sector 5C. Explore the sector and get to the bottom of these messages!"
5    tags = "mission"
6    screenshot = "missionOne.png"
7/>
8
9<?lua
10    include("stats.oxo")
11    include("HUDTemplates3.oxo")
12    include("templates/lodInformation.oxt")
13
14    include("templates/spaceshipAssff.oxt")
15    include("templates/spaceshipPirate.oxt")
16    include("templates/spaceshipEscort.oxt")
17    include("templates/spaceshipShuttle.oxt")
18    include("templates/FPS.oxt")
19    include("templates/pickupRepresentationTemplates.oxt")
20?>
21
22<Level gametype = "Mission">
23    <templates>
24        <Template link="lodtemplate_default" />
25    </templates>
26
27    <?lua include("includes/notifications.oxi") ?>
28
29    <NotificationQueueCEGUI
30        name="narrative"
31        targets="simpleNotification"
32        size=3
33        displayTime=3.9
34        position="0.15, 0, 0.1, 0"
35        fontSize="15"
36        fontColor="0.3, 1, 0.2, 0.8"
37        alignment="HorzCentred"
38        displaySize="0.7, 0, 0, 0"
39    />
40
41    <!-- GLOBAL LUA VARIABLES -->
42    <?lua
43
44        --[[ Coordinates in (y,z,x). NOTE: Indexing starts at 1 in lua! Don´t forget to adapt the for loops, too! ]]--
45        cCenter = {0, 0, 0}
46        cSpawn = {-50, 0, 0}
47        cSector = {-15000, -5500, -9000}
48        cSectorEntry = {-4710, -5500, -2826}
49        cPathToEntry = {{0, -2000, 0}}
50        cBeacon = {-6500, -5500, -4400}
51
52              cStationA = {1400, 400, -800}
53        cNewShip = {1000, 250, -350}
54
55        cPlanet1 = {20000, 0, 29000}
56        cPlanet2 = {-22000, 0, -29000}
57
58        cEnemyBasePlanet = {-20000, -5500, -8000}
59
60        cEnemyBaseStation1 = {-12500, -4500, -3500}
61
62              cField1 = {-5000, -4000, -3000}
63              cField2 = {4000, 2000, 4500}
64
65        --[[ Function to print Coordinates. Quotes not included! ]]--
66        function printC(coord)
67          print(coord[1] .. [[,]] .. coord[2] .. [[,]] .. coord[3])
68        end
69    ?>
70
71    <Scene
72        ambientlight = "0.8, 0.8, 0.8"
73        skybox = "Orxonox/skyBoxMoreNebula"
74        hasPhysics = true
75    >
76
77    <SpawnPoint name="playerSpawn" team=0 position="<?lua printC(cSpawn) ?>" lookat="<?lua printC(cCenter) ?>" spawnclass=SpaceShip pawndesign=spaceshipescort />
78
79    <WorldAmbientSound source="Earth.ogg" looping="true" playOnLoad="true" />
80
81    <Light type=directional position="<?lua printC(cCenter) ?>" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0"/>
82
83    <!--QUEST DEFINITIONS-->
84
85    <GlobalQuest id="quest1">
86        <QuestDescription title="Quest 1" description="We received some extraterrestial binary radio signals from Sector 5C! We'd like yout to take the portal and fly over there to check out if life can be found there as we believed to be an inhabitated region in space." failMessage="" completeMessage="" />
87        <hints>
88        </hints>
89        <complete-effects>
90            <AddQuest questId="quest2" />
91        </complete-effects>
92    </GlobalQuest>
93
94    <!--EVENTS AND TRIGGERS
95        Usable events and triggers:
96        spawntrigger
97
98        BASE-STORY-LINE:
99        We receive alien radio activity, you are asked to dock into the station, and change into the faster spaceship,[Quest: Dock to station, Event: when docked, change spaceship as in the main level! This triggers the next quest to fly in to the sector] after that
100        [Quest: fly to sector] go into the sector 5c [Event: when in range, Planet becomes visible, an enemy base station, as well es the enmies, around 25 of them], you want to warn your commander, but 5 of the patroling enemies discover[WAYPOINT-Controlled Enemies] you so they hund and try to kill you [Quest: destroy the Aliens who want to hunt you, and escape, Event: 5 of the enemies are hunting you]
101        [Quest: Triggerd after all 5 enemies are dead, if you die, you fail the mission! AFter destroying the enemies, go to your base and report what you have discovered!]
102    -->
103
104    <EventMultiTrigger name="spawntrigger">
105        <events>
106            <trigger>
107                <EventListener event="playerSpawn" />
108            </trigger>
109        </events>
110    </EventMultiTrigger>
111
112    <!--TODO: Complete the DistanceTriggers for completing/succeeding correctly! -->
113
114    <DistanceTrigger active=false name="missionComplete" position="2000,0,0" distance=100 target="SpaceShip" stayactive=true>
115        <events>
116            <activity>
117                <EventListener event="missionCompletePrereq" />
118            </activity>
119        </events>
120    </DistanceTrigger>
121
122    <Script code="Mission endMission true" onLoad="false">
123        <events>
124            <trigger>
125                <EventListener event="missionComplete" />
126            </trigger>
127        </events>
128    </Script>
129
130    <DistanceTrigger active=false name="missionFailed" position="2000,0,0" distance=100 target="SpaceShip" stayactive=true>
131        <events>
132            <activity>
133                <EventListener event="missionFailedPrereq" />
134            </activity>
135        </events>
136    </DistanceTrigger>
137
138    <Script code="Mission endMission fail" onLoad="false">
139        <events>
140            <trigger>
141                <EventListener event="failMission" />
142            </trigger>
143        </events>
144    </Script>
145
146    <!--QUEST EFFECT BEACONS -->
147
148    <QuestEffectBeacon times=1>
149        <effects>
150            <AddQuest questId="quest1" />
151        </effects>
152        <events>
153            <execute>
154                <EventListener event="spawntrigger" />
155            </execute>
156        </events>
157    </QuestEffectBeacon>
158
159    <!--NOTIFICATIONS -->
160
161    <SimpleNotification broadcast="true" message="Welcome, Commander.">
162        <events>
163            <trigger>
164                <EventTrigger stayactive="true" delay=4 >
165                   <events>
166                      <trigger>
167                         <EventListener event="spawntrigger" />
168                      </trigger>
169                   </events>
170                </EventTrigger>
171            </trigger>
172        </events>
173    </SimpleNotification>
174
175    <SimpleNotification broadcast="true" message="Please check your quests!">
176        <events>
177            <trigger>
178                <EventTrigger stayactive="true" delay=7 >
179                   <events>
180                      <trigger>
181                         <EventListener event="spawntrigger" />
182                      </trigger>
183                   </events>
184                </EventTrigger>
185            </trigger>
186        </events>
187    </SimpleNotification>
188
189    <!--STATIONS -->
190
191    <Template name="station">
192        <Pawn mass=10000000 collisionType=dynamic friction=0.01>
193            <attached>
194                <Model mesh="HydroHarvester.mesh" position="0,0,0" scale=50 />
195                <DistanceTriggerBeacon name="NPC" />
196            </attached>
197            <collisionShapes>
198                <BoxCollisionShape  position="-560,0,0" halfExtents="115,100,245" /><!-- Three lower boxes -->
199                <BoxCollisionShape  position="290,0,-480" halfExtents="115,100,245" yaw=-120 />
200                <BoxCollisionShape  position="290,0,480" halfExtents="115,100,245" yaw=-240 />
201                <BoxCollisionShape  position="-280,0,0" halfExtents="163,50,50" /><!-- Three lower connections -->
202                <BoxCollisionShape  position="140,0,-240" halfExtents="163,50,50" yaw=-120 />
203                <BoxCollisionShape  position="140,0,240" halfExtents="163,50,50" yaw=-240 />
204                <BoxCollisionShape  position="0,530,0" halfExtents="172,52,298" /><!-- Upper Tower -->
205                <BoxCollisionShape  position="0,530,0" halfExtents="172,52,298" yaw=-120 />
206                <BoxCollisionShape  position="0,530,0" halfExtents="172,52,298" yaw=-240 />
207                <BoxCollisionShape  position="0,400,0" halfExtents="43,110,26" yaw=-30 /><!-- Middle one-->
208                <BoxCollisionShape  position="-200,100,0" halfExtents="26,50,43" /><!--Three lower legs -->
209                <BoxCollisionShape  position="100,100,-173" halfExtents="43,50,26" yaw=-30 />
210                <BoxCollisionShape  position="100,100,-173" halfExtents="43,50,26" yaw=30 />
211                <BoxCollisionShape  position="-100,264,0" halfExtents="26,105,43" roll=-49 /><!--Three upper legs -->
212                <BoxCollisionShape  position="50,264,-87" halfExtents="26,105,43" roll=-49 yaw=-120 />
213                <BoxCollisionShape  position="50,264,87" halfExtents="26,105,43" roll=-49 yaw=-240 />
214            </collisionShapes>
215        </Pawn>
216    </Template>
217
218    <Pawn name="statA" team=0 radarname="Outer Base - Sector 4B" position="<?lua printC(cStationA) ?>" direction="<?lua printC(cSpawn) ?>" yaw=45 pitch=-5 roll=-25 initialhealth=10000 maxhealth=10000 >
219        <templates>
220            <Template link="station" />
221        </templates>
222        <attached>
223            <DockingTarget name="dockTargetA" />
224            <Dock position="0,0,0" active=true>
225                <animations>
226                    <MoveToDockingTarget target="dockTargetA" />
227                </animations>
228                <effects>
229                    <DockToShip target="newSpaceShip" />
230                </effects>
231                <events>
232                    <execute>
233                        <EventListener event="dockA" />
234                    </execute>
235                </events>
236            </Dock>
237        </attached>
238    </Pawn>
239
240    <!-- EnemyStation -->
241
242    <Pawn name="statB" team=1 radarname="EnemyBase" position="<?lua printC(cEnemyBaseStation1) ?>" direction="<?lua printC(cSpawn) ?>" yaw=45 pitch=-5 roll=-25 initialhealth=10000 maxhealth=10000 >
243        <templates>
244            <Template link="station" />
245        </templates>
246    </Pawn>
247
248    <!-- New SpaceShip as destination of dock A-->
249    <SpaceShip
250            template            = "spaceshipassff"
251            team                = "0"
252            position            = "<?lua printC(cNewShip) ?>"
253            lookat              = "0, 0, 0"
254            health              = "400"
255            initialhealth       = "400"
256            maxhealth           = "1500"
257            shieldhealth        = "80"
258            initialshieldhealth = "80"
259            maxshieldhealth     = "120"
260            shieldabsorption    = "0.8"
261            reloadrate          = "1"
262            reloadwaittime      = "1"
263            name                = "newSpaceShip"
264            radarname           = "ScoutShip" >
265        <attached>
266            <DockingTarget name="newSpaceShip" />
267            <DistanceTriggerBeacon name="newSpaceShip" />
268        </attached>
269    </SpaceShip>
270
271    <!--ELEMENTS -->
272
273    <!-- Asteroids you have to fly through to get to the EnemyBase -->
274
275    <?lua
276        dofile("includes/asteroidField.lua")
277       asteroidField(cField1[1], cField1[2], cField1[3], 20, 30, 4500, 500, 0)
278    ?>
279
280    <!-- Other Asteroid-Fields -->
281
282    <?lua
283        dofile("includes/asteroidField.lua")
284       asteroidField(cField2[1], cField2[2], cField2[3], 20, 30, 4500, 500, 0)
285    ?>
286
287    <!-- Planets -->
288
289   <Planet
290        position="<?lua printC(cPlanet1) ?>"
291        scale="3000"
292        collisionType="dynamic"
293        linearDamping="0.8"
294        angularDamping="0"
295        mass="5000000"
296        pitch="0"
297        mesh="planets/muunilinst.mesh"
298        atmosphere="atmosphere1"
299        rotationaxis="1,0,0"
300        rotationrate="1.0"
301        atmospheresize="80.0f"
302        imagesize="1024.0f"
303        collisiondamage=2
304        enablecollisiondamage=true
305              visible=true
306              active=true
307      >
308      <attached>
309        <ForceField position="0,0,0" mode="sphere" diameter="6000" velocity="-500" />
310        </attached>
311          <collisionShapes>
312            <SphereCollisionShape radius="3000" position="0,0,0" />
313      </collisionShapes>
314    </Planet>
315
316    <?lua
317        dofile("includes/asteroidField.lua")
318        asteroidBelt(cPlanet1[1], cPlanet1[2], cPlanet1[3], 30, 20, 100, 20, 40, 3400, 3700, 400, 1)
319    ?>
320
321    <Planet
322        position="<?lua printC(cPlanet2) ?>"
323        scale="2000"
324        collisionType="dynamic"
325        linearDamping="0.8"
326        angularDamping="0"
327        mass="5000000"
328        pitch="0"
329        mesh="planets/ganymede.mesh"
330        atmosphere="atmosphere1"
331        rotationaxis="1,0,0"
332        rotationrate="1.0"
333        atmospheresize="80.0f"
334        imagesize="1024.0f"
335        collisiondamage=2
336        enablecollisiondamage=true
337              visible=true
338              active=true
339      >
340      <attached>
341        <ForceField position="0,0,0" mode="sphere" diameter="4000" velocity="-500" />
342        </attached>
343          <collisionShapes>
344            <SphereCollisionShape radius="2000" position="0,0,0" />
345      </collisionShapes>
346    </Planet>
347
348    <?lua
349        dofile("includes/asteroidField.lua")
350        asteroidBelt(cPlanet2[1], cPlanet2[2], cPlanet2[3], 30, 20, 100, 20, 40, 3400, 3700, 400, 1)
351    ?>
352
353    <!-- EnemyPlanet(s) -->
354
355    <Planet
356        position="<?lua printC(cEnemyBasePlanet) ?>"
357        scale="5000"
358        collisionType="dynamic"
359        linearDamping="0.8"
360        angularDamping="0"
361        mass="5000000"
362        pitch="0"
363        mesh="planets/jupiter.mesh"
364        atmosphere="atmosphere1"
365        rotationaxis="1,0,0"
366        rotationrate="1.0"
367        atmospheresize="80.0f"
368        imagesize="1024.0f"
369        collisiondamage=2
370        enablecollisiondamage=true
371              visible=true
372              active=true
373      >
374      <attached>
375        <ForceField position="0,0,0" mode="sphere" diameter="10000" velocity="-500" />
376        </attached>
377          <collisionShapes>
378            <SphereCollisionShape radius="5000" position="0,0,0" />
379      </collisionShapes>
380    </Planet>
381
382    <?lua
383      xi = 5
384      zi = 5
385      for k = 1, xi, 1
386      do
387    ?>
388    <?lua
389      for j = 1, zi, 1
390      do
391      x = -2500+k*100
392      z = -4400+j*100
393    ?>
394    <SpaceShip visible=true active=false name="Enemies" radarname="Attacker" position="-11000,<?lua print(z)?>,<?lua print(x)?>" lookat="0,0,0" team=1>
395        <templates>
396            <Template link="spaceshippirate" />
397        </templates>
398    </SpaceShip>
399    <?lua end ?>
400    <?lua end ?>
401
402   
403
404    </Scene>
405</Level>
Note: See TracBrowser for help on using the repository browser.