Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/presentation3/data/levels/Fight in our Back.oxw @ 7058

Last change on this file since 7058 was 7058, checked in by stmathia, 14 years ago

empty_level:erased unnecessary code
Fight in our Back: added quests
The Time Machine:parts still not working

File size: 20.5 KB
Line 
1<?lua
2        include("stats.oxo")
3        include("hudtemplates3.oxo")
4        include("templates/lodinformation.oxt")
5        include("templates/spaceship_assff.oxt")
6        include("templates/spaceship_pirate.oxt")
7        include("templates/spaceship_Transporter.oxt")
8?>
9
10<!--*****************************************************************************************************************************************************************************************-->
11<!--Including Template for triggering on player-->
12
13<Template name=spaceshipassffplayer>
14  <SpaceShip
15   hudtemplate            = spaceshiphud
16   camerapositiontemplate = spaceshipassffcameras
17   engine                 = spaceshipassffengine
18   spawnparticlesource    = "Orxonox/fairytwirl"
19   spawnparticleduration  = 3
20   explosionchunks        = 6
21
22   health            = 100
23   maxhealth         = 200
24   initialhealth     = 100
25
26   primaryThrust     = 100;
27   auxilaryThrust    = 30;
28   rotationThrust    = 25;
29
30   collisionType     = "dynamic"
31   mass              = 100
32   linearDamping     = 0.7
33   angularDamping    = 0.9999999
34  >
35    <attached>
36      <Model position="0,0,0" yaw=90 pitch=-90 roll=0 scale=4 mesh="assff.mesh" />
37      <BlinkingBillboard position="17,-1.5,0" material="Examples/Flare" colour="1.0, 0.5, 0.3" amplitude=0.1 frequency=0.5 quadratic=1 />
38      <BlinkingBillboard position="-17,-1.5,0" material="Examples/Flare" colour="0.5, 1.0, 0.3" amplitude=0.1 frequency=0.5 phase=180 quadratic=1 />
39      <DistanceTriggerBeacon name="PlayerDistanceTrigger" /> <!--added DistanceTrigger-->
40    </attached>
41    <collisionShapes>
42      <BoxCollisionShape position="0,0,0"      halfExtents="10, 3, 5" />
43      <BoxCollisionShape position="13,-1.3,0"  halfExtents="3, 1, 2" />
44      <BoxCollisionShape position="-13,-1.3,0" halfExtents="3, 1, 2" />
45      <BoxCollisionShape position="0,0,7"      halfExtents="3, 2, 2" />
46      <BoxCollisionShape position="0,0.1,-11"  halfExtents="2.2, 1.8, 6" />
47      <BoxCollisionShape position="0,0.1,-19"  halfExtents="1.4, 1, 2" />
48    </collisionShapes>  include("templates/lodinformation.oxt")
49<?lua
50  include("includes/weaponsettings3.oxi")
51?>
52  </SpaceShip>
53</Template>
54
55<!--*****************************************************************************************************************************************************************************************-->
56<Level
57  name="Fight in our back"
58  description="Our fleet is far ahead of us. We need to get rid of all the enemies in its back, because we do not want our enemies to attack from everywhere. So let us clear this Sector!"
59  gametype=TeamDeathmatch
60>
61  <templates>
62    <Template link=lodtemplate_default />
63  </templates>
64
65        <!-- Ausgang: Szene ===> ambientlight/skybox -->
66        <Scene
67          ambientlight="0.8,0.8,0.8"
68          skybox="Orxonox/skypanoramagen1"
69        >
70               
71                <!--Light: noch zu aendern -->
72                <Light type=directional position="0,0,0" direction="0, 0, 0" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 1.0, 0.9" />
73
74
75<!--*****************************************************************************************************************************************************************************************-->
76<!--Quests-->
77        <GlobalQuest id="FightInOurBack.DiscoveryMission_">    <!--QUESTIDS MUST HAVE AT LEAST 32 CHARACTERS-->
78                <QuestDescription title="Discovery mission" description="Your team has to scout out this sector." failMessage="You failed!" completeMessage="You won. You have reached the end of this level." />
79                <subquests>
80                        <GlobalQuest id="FightInOurBack.FollowYourGroupLeader">
81                                <QuestDescription title="Follow your group leader" description="Your task is to follow the team leader and to destroy all the enemy spaceships on your way!" failMessage="You failed!" completeMessage="Good job!" />
82                        </GlobalQuest>
83                        <GlobalQuest id="FightInOurBack.TransportersAhead">
84                                <QuestDescription title="Transporters ahead" description="This is a lucky day for us. We have found supplies that the enemy is transporting in these Transporters. We have to destroy them." failMessage="You failed!" completeMessage="Good job!" />
85                        </GlobalQuest>
86                        <GlobalQuest id="FightInOurBack.TheySentUsAssistance">
87                                <QuestDescription title="They sent us assistance" description="The transporters will surely be heavily protected but our base sent us assistance. It should now be easier to destroy them." failMessage="You failed" completeMessage="Good job!" />
88                        </GlobalQuest>
89                </subquests>
90        </GlobalQuest>
91
92
93<!--Quests____END-->
94<!--*****************************************************************************************************************************************************************************************-->
95
96
97<!--Player's Spawnpoints______________________________________________________________________________________________________________________________________________________________________-->
98                <!--Spieler Spawnpoint ===> position/direction--> <!-- funktioniert noch nicht ab naechtem Mal wahrscheinlich-->
99                <SpawnPoint position="0,50,25" direction="2000,0,-1000" spawnclass=SpaceShip pawndesign=spaceshipassffplayer team=0 active="true" />
100<!--->                  <events>
101                                <activity>
102                                        <EventListener event="activateSecondSpawnpoint" />
103                                </activity>
104                        </events>
105                </SpawnPoint>
106
107                <SpawnPoint position="10000,0,3000" direction="2000,0,-1000" spawnclass=SpaceShip pawndesign=spaceshipassffplayer team=0 active="false" >
108                        <events>
109                                <activity>
110                                        <EventListener event="activateSecondSpawnpoint" />
111                                </activity>  include("templates/lodinformation.oxt")
112                        </events>
113                </SpawnPoint>
114               
115<!--Player's Spawnpoint_____END____________________________________________________________________________________________________________________________________________________-->
116
117<!--Launching Quests_______________________________________________________________________________________________________________________________________________________________-->
118                <QuestEffectBeacon position="0,50,25" times="1">
119                        <effects>
120                                <AddQuest questId="FightInOurBack.DiscoveryMission_"/>
121                                <AddQuest questId="FightInOurBack.FollowYourGroupLeader" />
122                        </effects>
123                        <events>
124                                <execute>
125                                        <EventListener event="FightInOurBack_MainStart_FollowStart"/>
126                                </execute>
127                        </events>
128                        <attached>
129                                <Billboard position="0,0,0" colour="1.0,1.0,1.0" material="Examples/Flare" />
130                                <DistanceTrigger name="FightInOurBack_MainStart_FollowStart" position="0,0,0" distance="50" target="DistanceTriggerBeacon" targetname="spaceshipassffplayer" invert=1 stayactive=1 activations=1 />
131                        </attached>
132                </QuestEffectBeacon>
133<!---->
134                <QuestEffectBeacon position="8000,0,3100" times=1 >
135                        <effects>
136                                <AddQuest questID="FightInOurBack.FollowYourGroupLeader" />
137                                <AddQuest questID="FightInOurBack.TheySentUsAssistance" />
138                                <CompleteQuest questID="FightInOurBack.FollowYourGroupLeader" />
139                        </effects>
140                        <events>
141                                <EventListener event="FightInOurBack_FollowEnd_DTranspStart_AssisStart" />
142                        </events>
143                        <attached>
144                                <Billboard position="0,0,0" colour="1,1,1" material="Examples/Flare" />
145                                <DistanceTrigger name="FightInOurBack_FollowEnd_DTranspStart_AssisStart" position="0,0,0" distance="1000" target="DistanceTriggerBeacon" targetname="PlayerDistanceTrigger" stayactive=1 activations=1 />
146                        </attached>
147                </QuestEffectBeacon>
148                       
149<!---->
150               
151<!--Launching Quests______END_______________________________________________________________________________________________________________________________________________________-->
152
153<!--Creating Transporters_________________________________________________________________________________________________________________________________________________________OK-->
154
155
156<?lua for i=0,0,1 do
157x=800
158health=2750
159?>
160                <!--Transporter 1-->
161        <EventTrigger name="activateTeam1No1" acitvations=1 stayactive="true">
162        <events>
163        <trigger>
164                <SpaceShip position="<?lua print(3800-i*x) ?>,0,3000" lookat="<?lua print(4800-i*x) ?>,0,4000" health=<?lua print(health) ?> maxhealth=<?lua print(health) ?> initialhealth=<?lua print(health) ?> >
165                        <templates>
166                                <Template link=spaceshipTransporter />
167                        </templates>
168                        <controller>
169                                <WaypointPatrolController alertnessradius=1000 team=1>
170                                        <waypoints>
171                                                <Model mesh="cube.mesh" scale=0 position="<?lua print(14800-i*x) ?>,0,3000"/>
172                                        </waypoints>
173                                </WaypointPatrolController>
174                        </controller>
175                </SpaceShip><!---->
176        </trigger>
177        </events>
178        </EventTrigger>
179<?lua end ?>
180
181
182<?lua for j=0,1,1 do
183health=1600
184x=800
185z=j*300
186?>
187                <!--Transporter 2,3-->
188        <EventTrigger name="activateTeam1No1" acitvations=1 stayactive="true">
189        <events>
190        <trigger>
191                <SpaceShip position="<?lua print(2600+x) ?>,0,<?lua print(3150-z) ?>" lookat="<?lua print(3500+x) ?>,0,<?lua print(4150-z) ?>" health=<?lua print(health) ?> maxhealth=<?lua print(health) ?> initialhealth=<?lua print(health) ?> >
192                        <templates>
193                                <Template link=spaceshipTransporter />
194                        </templates>
195                        <controller>
196                                <WaypointPatrolController alertnessradius=1000 team=1>
197                                        <waypoints>
198                                                <Model mesh="cube.mesh" scale=0 position="<?lua print(13500+x) ?>,0,<?lua print(3150-z) ?>"/>
199                                        </waypoints>
200                                </WaypointPatrolController>
201                        </controller>
202                </SpaceShip><!---->
203        </trigger>
204        </events>
205        </EventTrigger>
206<?lua end ?>
207
208
209<!--Creating Transporters______END___________________________________________________________________________________________________________________________________________________________-->
210
211<!--Creating player's team_________________________________________________________________________________________________________________________________________________________________OK-->
212                <!--Spaceships team 0 (player:team=0)-->
213                <SpaceShip position="50,0,0" lookat="2050,0,-1000" health="500" maxhealth="500" initialhealth="500" >
214                        <templates>
215                                <Template link=spaceshipassff />
216                        </templates>
217                        <controller>
218                                <WaypointPatrolController alertnessradius=2000 team=0 >
219                                        <waypoints>
220                                                <Model mesh="cube.mesh" scale=0 position="2050,0,-1000" />
221                                                <Model mesh="cube.mesh" scale=0 position="6050,0,0" />
222                                                <Model mesh="cube.mesh" scale=0 position="10050,0,3000" />
223                                                <Model mesh="cube.mesh" scale=0 position="3050,0,3000" />
224                                                <Model mesh="cube.mesh" scale=0 position="-4050,0,3000" />
225                                        </waypoints>
226                                </WaypointPatrolController>
227                        </controller>
228                </SpaceShip>
229                <!--Second Spaceship team 0 (player: team 0)-->
230                <SpaceShip position="0,0,100" lookat="2000,0,-950" health="400" maxhealth="400" initialhealth="400" >
231                        <templates>
232                                <Template link=spaceshipassff />
233                        </templates>
234                        <controller>
235                                <WaypointPatrolController alertnessradius=2000 team=0 >
236                                        <waypoints>
237                                                <Model mesh="cube.mesh" scale=0 position="2000,0,-900" />
238                                                <Model mesh="cube.mesh" scale=0 position="6000,0,0" />
239                                                <Model mesh="cube.mesh" scale=0 position="10000,0,3100" />
240                                                <Model mesh="cube.mesh" scale=0 position="3000,0,3100" />
241                                                <Model mesh="cube.mesh" scale=0 position="-4000,0,3100"/>
242                                        </waypoints>
243                                </WaypointPatrolController>
244                        </controller>
245                </SpaceShip>
246                <!--third Spaceship team 0 (player: team 0)-->
247                <SpaceShip position="0,0,-100" lookat="2000,0,-1050" health="400" maxhealth="400" initialhealth="400" >
248                        <templates>
249                                <Template link=spaceshipassff />
250                        </templates>
251                        <controller>
252                                <WaypointPatrolController alertnessradius=2000 team=0 >
253                                        <waypoints>
254                                                <Model mesh="cube.mesh" scale=0 position="2000,0,-1100" />
255                                                <Model mesh="cube.mesh" scale=0 position="6000,0,-100" />
256                                                <Model mesh="cube.mesh" scale=0 position="10000,0,2900" />
257                                                <Model mesh="cube.mesh" scale=0 position="3000,0,2900" />
258                                                <Model mesh="cube.mesh" scale=0 position="-4000,0,2900" />
259                                        </waypoints>
260                                </WaypointPatrolController>
261                        </controller>
262                </SpaceShip>
263<!--Creating player's team ______END _______________________________________________________________________________________________________________________________________________________-->
264
265
266<!--Asteroids (field)_____________________________________________________________________________________________________________________________________________________________________OK-->
267
268                <StaticEntity position="3000,0,-1000">
269                        <attached>
270                                <?lua for i=0,100,1 do
271                                x=math.random(250,4000)
272                                y=math.random(-500,500)
273                                z=math.random(1000,2000)
274                                scale=math.random(20,70)
275                                ?>
276                                <MovableEntity collisionType=kinematic linearDamping=0.8 angularDamping=0 mass="<?lua print(scale * 5) ?>" position="<?lua print(x) ?>,<?lua print(y) ?>,<?lua print(z) ?>" rotationaxis="<?lua print(math.random()) ?>,<?lua print(math.random()) ?>,<?lua print(math.random()) ?>" rotationrate="<?lua print(math.random()*15) ?>">
277                                        <attached>
278                                                <Model scale=<?lua print(scale) ?> mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false/>
279                                        </attached>
280                                        <collisionShapes>
281                                        <SphereCollisionShape radius="<?lua print(scale * 3) ?>" />
282                                        </collisionShapes>
283                                </MovableEntity>
284                                <?lua end ?>
285                        </attached>
286                </StaticEntity>
287
288<!--Asteroids (field)______END_______________________________________________________________________________________________________________________________________________________________-->
289
290<!--Asteroids (random)______END____________________________________________________________________________________________________________________________________________________________OK-->
291
292                <StaticEntity position="0,0,0">
293                        <attached>
294                                <?lua for i=0,150,1 do
295                                x=math.random(-8000,8000)
296                                y=math.random(-8000,8000)
297                                z=math.random(-8000,8000)
298                                ?>
299                                <MovableEntity collisionType=kinematic linearDamping=0.8 angularDamping=0 mass="<?lua print(scale * 5) ?>" position="<?lua print(x) ?>,<?lua print(y) ?>,<?lua print(z) ?>" rotationaxis="<?lua print(math.random()) ?>,<?lua print(math.random()) ?>,<?lua print(math.random()) ?>" rotationrate="<?lua print(math.random()*15) ?>" >
300                                        <attached>
301                                                <Model scale=<?lua print(math.random(20,70)) ?> mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false/>
302                                        </attached>
303                                        <collisionShapes>
304                                        <SphereCollisionShape radius="<?lua print(scale * 3) ?>" />
305                                        </collisionShapes>
306                                </MovableEntity>
307                                <?lua end ?>
308                        </attached>
309                </StaticEntity>
310
311<!--Asteroids (random)______END______________________________________________________________________________________________________________________________________________________________-->
312
313<!--Creating spaceships (player's team)____________________________________________________________________________________________________________________________________________________OK-->
314<!---->
315<!--Trigger to activate this Team (TEAM NO 1)-->
316        <DistanceTrigger name="activateTeam0No1" position="8000,0,3100" distance="1000" target="DistanceTriggerBeacon" targetname="PlayerDistanceTrigger" activations="1" stayactive="true" />
317
318<!--TEAM NO 1 (activationType : distance || killing a spaceship what belongs to TEAM 0 NO 0)-->
319<?lua for i=0,9,1 do
320x=math.random(-500,500)
321y=math.random(-300,300)
322z=math.random(-300,300)
323?>
324        <EventTrigger name="activateTeam0No1" activations=1 stayactive="true">
325                <events>
326                        <trigger>
327                                <SpaceShip position="<?lua print(x+4500) ?>,<?lua print(y) ?>,<?lua print(z+6000) ?>" lookat="<?lua print(4000+x) ?>,<?lua print(y) ?>,<?lua print(z+3000) ?>">
328                                        <templates>
329                                                <Template link=spaceshipassff />
330                                        </templates>
331                                        <controller>
332                                                <WaypointPatrolController alertnessradius=2000 team=0 active=false>
333                                                        <waypoints>
334                                                                <Model mesh="cube.mesh" scale=0 position="<?lua print(4500+x) ?>,<?lua print(y) ?>,<?lua print(z+3000) ?>" />
335                                                                <Model mesh="cube.mesh" scale=0 position="<?lua print(x-4000) ?>,<?lua print(y) ?>,<?lua print(z+3000) ?>" />
336                                                        </waypoints>
337                                                        <events>
338                                                                <activity>
339                                                                        <EventListener event="activateTeam0No1" />
340                                                                </activity>
341                                                        </events>
342                                                </WaypointPatrolController>
343                                        </controller>
344                                </SpaceShip>
345                        </trigger>
346                </events>
347        </EventTrigger>
348
349
350<?lua end ?>
351
352<!---->
353<!--Creating spaceships (player's team)_______END_____________________________________________________________________________________________________________________________________________-->
354
355<!--Creating spaceships (enemy)____________________________________________________________________________________________________________________________________________________________OK-->
356<!---->
357<!--TEAM 1 NO 1 (activationType : killing a Transporter || killing a spaceship what belongs to TEAM 1 NO 1)-->
358<?lua for i=0,11,1 do
359x=math.random(-500,500)
360y=math.random(-300,300)
361z=math.random(-300,300)
362?>
363        <EventTrigger name="activateTeam1No1" activations=1 stayactive="true" >
364                <events>
365                        <trigger>
366                                <SpaceShip position="<?lua print(x+3800) ?>,<?lua print(y+3000) ?>,<?lua print(z+3000) ?>" lookat="<?lua print(4000+x) ?>,<?lua print(y) ?>,<?lua print(z+3000) ?>">
367                                        <templates>
368                                                <Template link=spaceshippirate />
369                                        </templates>
370                                        <controller>
371                                                <WaypointPatrolController alertnessradius=5000 team=1 active=false>
372                                                        <waypoints>
373                                                                <Model mesh="cube.mesh" scale=0 position="<?lua print(4000+x) ?>,<?lua print(y) ?>,<?lua print(z+3000) ?>" />
374                                                        </waypoints>
375                                                        <events>
376                                                                <activity>
377                                                                        <EventListener event="activateTeam1No1" />
378                                                                </activity>
379                                                        </events>
380                                                </WaypointPatrolController>
381                                        </controller>
382                                </SpaceShip>
383                        </trigger>
384                </events>
385        </EventTrigger>
386
387<?lua end ?>
388<!---->
389<!--Creating spaceships (enemy)_______END____________________________________________________________________________________________________________________________________________________-->
390
391<!--Enemies on the way to the transporters___________________________________________________________________________________________________________________________________________________-->
392
393<?lua for i=0,1,1 do
394z=math.random(-300,300)
395?>
396<!--NO 1-->
397                <SpaceShip position="<?lua print(5900+i*100) ?>,0,-3000" lookat="2500,0,-1000">
398                        <templates>
399                                <Template link=spaceshippirate/>
400                        </templates>
401                        <controller>
402                                <WaypointPatrolController alertnessRadius=1500 team=1>
403                                        <waypoints>
404                                                <Model mesh="cube.mesh" scale=0 position="<?lua print(2500+100*i) ?>,0,-1000" />
405                                        </waypoints>
406                                </WaypointPatrolController>
407                        </controller>
408                </SpaceShip>
409
410<!--NO 4-->
411                <SpaceShip position="<?lua print(9000) ?>,13000,<?lua print(z*i+3000) ?>" lookat="1000,0,3000">
412                        <templates>
413                                <Template link=spaceshippirate/>
414                        </templates>
415                        <controller>
416                                <WaypointPatrolController alertnessRadius=1500 team=1>
417                                        <waypoints>
418                                                <Model mesh="cube.mesh" scale=0 position="<?lua print(10000) ?>,0,<?lua print(3000+z*i) ?>" />
419                                        </waypoints>
420                                </WaypointPatrolController>
421                        </controller>
422                </SpaceShip>
423<?lua end ?>
424
425
426<!--NO 3-->
427                <SpaceShip position="<?lua print(200+13000) ?>,0,10000" lookat="8000,0,1000">
428                        <templates>
429                                <Template link=spaceshippirate/>
430                        </templates>
431                        <controller>
432                                <WaypointPatrolController alertnessRadius=1500 team=1>
433                                        <waypoints>
434                                                <Model mesh="cube.mesh" scale=10 position="<?lua print(200+8000) ?>,0,1000" />
435                                        </waypoints>
436                                </WaypointPatrolController>
437                        </controller>
438                </SpaceShip>
439<?lua for i=0,1,1 do ?>         
440                <SpaceShip position="<?lua print(i*400+13000) ?>,100,10000" lookat="8000,0,1000">
441                        <templates>
442                                <Template link=spaceshippirate/>
443                        </templates>
444                        <controller>
445                                <WaypointPatrolController alertnessRadius=1500 team=1>
446                                        <waypoints>
447                                                <Model mesh="cube.mesh" scale=0 position="<?lua print(i*400+8000) ?>,0,1000" />
448                                        </waypoints>
449                                </WaypointPatrolController>
450                        </controller>
451                </SpaceShip>
452<?lua end ?>
453
454
455<!--NO 2-->
456<?lua for i=0,3,1 do ?>
457                <SpaceShip position="<?lua print(math.random(5500,6500)+2000) ?>,0,1000" lookat="2500,0,-1000">
458                        <templates>
459                                <Template link=spaceshippirate/>
460                        </templates>
461                        <controller>
462                                <WaypointPatrolController alertnessRadius=1500 team=1>
463                                        <waypoints>
464                                                <Model mesh="cube.mesh" scale=0 position="<?lua print(math.random(5750,6250)+2000) ?>,0,1250" />
465                                                <Model mesh="cube.mesh" scale=0 position="<?lua print(math.random(5750,6250)+2000) ?>,250,1000" />
466                                                <Model mesh="cube.mesh" scale=0 position="<?lua print(math.random(5750,6250)+2000) ?>,0,1000" />
467                                        </waypoints>
468                                </WaypointPatrolController>
469                        </controller>
470                </SpaceShip>
471<?lua end ?>
472
473<!--Creating spaceships (enemy)______END_____________________________________________________________________________________________________________________________________________________-->
474
475<DistanceTrigger name="activateSecondSpawnpoint" position="10000,0,3000" distance="1000" target="DistanceTriggerBeacon" targetname="PlayerDistanceTrigger" activations="1" stayactive="true" />
476
477        </Scene>
478</Level>
Note: See TracBrowser for help on using the repository browser.