Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

Fight in our Back: removed superfluous billboards
The Time Machine: the time machine (freeze opponents) is still not completely working as wished.

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