Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/data/levels/Fight in our Back.oxw @ 7329

Last change on this file since 7329 was 7163, checked in by dafrick, 14 years ago

Merged presentation3 branch into trunk.

  • Property svn:eol-style set to native
File size: 20.4 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="activateFirstSpawnpoint" />
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>
121            </events>
122        </SpawnPoint>
123   
124<!--Player's Spawnpoint END-->
125
126<!--Launching Quests -->
127        <QuestEffectBeacon position="0,50,25" times="1">
128            <effects>
129                <AddQuest questId="FightInOurBack.DiscoveryMission_" />
130                <AddQuest questId="FightInOurBack.FollowYourGroupLeader" />
131            </effects>
132            <events>
133                <execute>
134                    <EventListener event="FightInOurBack_MainStart_FollowStart"/>
135                </execute>
136            </events>
137            <attached>
138                <DistanceTrigger name="FightInOurBack_MainStart_FollowStart" position="0,0,0" distance="50" target="DistanceTriggerBeacon" targetname="PlayerDistanceTrigger" />
139                <!--<Billboard position="0,0,0" colour="1.0,1.0,1.0" material="Examples/Flare" />-->
140            </attached>
141        </QuestEffectBeacon>
142
143        <QuestEffectBeacon position="8000,0,3100" times=1 >
144            <effects>
145                <AddQuest questID="FightInOurBack.TransportersAhead" />
146                <AddQuest questID="FightInOurBack.TheySentUsAssistance" />
147                <CompleteQuest questID="FightInOurBack.FollowYourGroupLeader" />
148            </effects>
149            <events>
150                <execute>
151                    <EventListener event="FightInOurBack_FollowEnd_DTranspStart_AssisStart" />
152                </execute>
153            </events>
154            <attached>
155                <!--<Billboard position="0,0,0" colour="1,1,1" material="Examples/Flare" />-->
156                <DistanceTrigger name="FightInOurBack_FollowEnd_DTranspStart_AssisStart" position="0,0,0" distance="1000" target="DistanceTriggerBeacon" targetname="PlayerDistanceTrigger" stayactive=1 activations=1 />
157            </attached>
158        </QuestEffectBeacon>
159   
160<!---->
161   
162<!--Launching Quests END -->
163
164<!--Creating Transporters OK-->
165
166
167<?lua for i=0,0,1 do
168x=800
169health=2750
170?>
171    <!--Transporter 1-->
172    <EventTrigger name="activateTeam1No1" acitvations=1 stayactive="true">
173    <events>
174    <trigger>
175        <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) ?> >
176            <templates>
177                   <Template link=spaceshipTransporter />
178             </templates>
179             <controller>
180                <WaypointPatrolController alertnessradius=1000 team=1>
181                    <waypoints>
182                        <Model mesh="cube.mesh" scale=0 position="<?lua print(14800-i*x) ?>,0,3000"/>
183                    </waypoints>
184                </WaypointPatrolController>
185             </controller>
186        </SpaceShip><!---->
187    </trigger>
188    </events>
189    </EventTrigger>
190<?lua end ?>
191
192
193<?lua for j=0,1,1 do
194health=1600
195x=800
196z=j*300
197?>
198    <!--Transporter 2,3-->
199    <EventTrigger name="activateTeam1No1" acitvations=1 stayactive="true">
200    <events>
201    <trigger>
202        <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) ?> >
203            <templates>
204                   <Template link=spaceshipTransporter />
205             </templates>
206             <controller>
207                <WaypointPatrolController alertnessradius=1000 team=1>
208                    <waypoints>
209                        <Model mesh="cube.mesh" scale=0 position="<?lua print(13500+x) ?>,0,<?lua print(3150-z) ?>"/>
210                    </waypoints>
211                </WaypointPatrolController>
212             </controller>
213        </SpaceShip><!---->
214    </trigger>
215    </events>
216    </EventTrigger>
217<?lua end ?>
218
219
220<!--Creating Transporters END _-->
221
222<!--Creating player's team OK-->
223        <!--Spaceships team 0 (player:team=0)-->
224        <SpaceShip position="50,0,0" lookat="2050,0,-1000" health="500" maxhealth="500" initialhealth="500" >
225             <templates>
226                  <Template link=spaceshipassff />
227            </templates>
228             <controller>
229                <WaypointPatrolController alertnessradius=2000 team=0 >
230                    <waypoints>
231                        <Model mesh="cube.mesh" scale=0 position="2050,0,-1000" />
232                        <Model mesh="cube.mesh" scale=0 position="6050,0,0" />
233                        <Model mesh="cube.mesh" scale=0 position="10050,0,3000" />
234                        <Model mesh="cube.mesh" scale=0 position="3050,0,3000" />
235                        <Model mesh="cube.mesh" scale=0 position="-4050,0,3000" />
236                    </waypoints>
237                </WaypointPatrolController>
238             </controller>
239        </SpaceShip>
240        <!--Second Spaceship team 0 (player: team 0)-->
241        <SpaceShip position="0,0,100" lookat="2000,0,-950" health="400" maxhealth="400" initialhealth="400" >
242             <templates>
243                  <Template link=spaceshipassff />
244            </templates>
245             <controller>
246                <WaypointPatrolController alertnessradius=2000 team=0 >
247                    <waypoints>
248                        <Model mesh="cube.mesh" scale=0 position="2000,0,-900" />
249                        <Model mesh="cube.mesh" scale=0 position="6000,0,0" />
250                        <Model mesh="cube.mesh" scale=0 position="10000,0,3100" />
251                        <Model mesh="cube.mesh" scale=0 position="3000,0,3100" />
252                        <Model mesh="cube.mesh" scale=0 position="-4000,0,3100"/>
253                    </waypoints>
254                </WaypointPatrolController>
255             </controller>
256        </SpaceShip>
257        <!--third Spaceship team 0 (player: team 0)-->
258        <SpaceShip position="0,0,-100" lookat="2000,0,-1050" health="400" maxhealth="400" initialhealth="400" >
259             <templates>
260                  <Template link=spaceshipassff />
261            </templates>
262             <controller>
263                <WaypointPatrolController alertnessradius=2000 team=0 >
264                    <waypoints>
265                        <Model mesh="cube.mesh" scale=0 position="2000,0,-1100" />
266                        <Model mesh="cube.mesh" scale=0 position="6000,0,-100" />
267                        <Model mesh="cube.mesh" scale=0 position="10000,0,2900" />
268                        <Model mesh="cube.mesh" scale=0 position="3000,0,2900" />
269                        <Model mesh="cube.mesh" scale=0 position="-4000,0,2900" />
270                    </waypoints>
271                </WaypointPatrolController>
272             </controller>
273        </SpaceShip>
274<!--Creating player's team END  -->
275
276
277<!--Asteroids (field OK -->
278
279<?lua for i=0,100,1 do
280x=math.random(250,4000)
281y=math.random(-500,500)
282z=math.random(1000,2000)
283scale=math.random(20,70)
284?>
285<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) ?>">
286    <attached>
287        <Model scale=<?lua print(scale) ?> mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false/>
288    </attached>
289    <collisionShapes>
290        <SphereCollisionShape radius="<?lua print(scale * 3) ?>" />
291    </collisionShapes>
292</MovableEntity>
293<?lua end ?>
294
295<!--Asteroids (field) END -->
296
297<!--Asteroids (random) END OK-->
298
299<?lua for i=0,150,1 do
300x=math.random(-8000,8000)
301y=math.random(-8000,8000)
302z=math.random(-8000,8000)
303?>
304<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) ?>" >
305    <attached>
306        <Model scale=<?lua print(math.random(20,70)) ?> mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false/>
307    </attached>
308    <collisionShapes>
309            <SphereCollisionShape radius="<?lua print(scale * 3) ?>" />
310        </collisionShapes>
311</MovableEntity>
312<?lua end ?>
313
314<!--Asteroids (random) END -->
315
316<!--Creating spaceships (player's team) OK-->
317<!---->
318<!--Trigger to activate this Team (TEAM NO 1)-->
319    <DistanceTrigger name="activateTeam0No1" position="8000,0,3100" distance="1000" target="DistanceTriggerBeacon" targetname="PlayerDistanceTrigger" activations="1" stayactive="true" />
320
321<!--TEAM NO 1 (activationType : distance || killing a spaceship what belongs to TEAM 0 NO 0)-->
322<?lua for i=0,9,1 do
323x=math.random(-500,500)
324y=math.random(-300,300)
325z=math.random(-300,300)
326?>
327    <EventTrigger name="activateTeam0No1" activations=1 stayactive="true">
328        <events>
329            <trigger>
330                <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) ?>">
331                    <templates>
332                        <Template link=spaceshipassff />
333                    </templates>
334                    <controller>
335                        <WaypointPatrolController alertnessradius=2000 team=0 active=false>
336                            <waypoints>
337                                <Model mesh="cube.mesh" scale=0 position="<?lua print(4500+x) ?>,<?lua print(y) ?>,<?lua print(z+3000) ?>" />
338                                <Model mesh="cube.mesh" scale=0 position="<?lua print(x-4000) ?>,<?lua print(y) ?>,<?lua print(z+3000) ?>" />
339                            </waypoints>
340                            <events>
341                                <activity>
342                                    <EventListener event="activateTeam0No1" />
343                                </activity>
344                            </events>
345                        </WaypointPatrolController>
346                    </controller>
347                </SpaceShip>
348            </trigger>
349        </events>
350    </EventTrigger>
351
352
353<?lua end ?>
354
355<!---->
356<!--Creating spaceships (player's team) END -->
357
358<!--Creating spaceships (enemy) OK-->
359<!---->
360<!--TEAM 1 NO 1 (activationType : killing a Transporter || killing a spaceship what belongs to TEAM 1 NO 1)-->
361<?lua for i=0,11,1 do
362x=math.random(-500,500)
363y=math.random(-300,300)
364z=math.random(-300,300)
365?>
366    <EventTrigger name="activateTeam1No1" activations=1 stayactive="true" >
367        <events>
368            <trigger>
369                <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) ?>">
370                    <templates>
371                        <Template link=spaceshippirate />
372                    </templates>
373                    <controller>
374                        <WaypointPatrolController alertnessradius=5000 team=1 active=false>
375                            <waypoints>
376                                <Model mesh="cube.mesh" scale=0 position="<?lua print(4000+x) ?>,<?lua print(y) ?>,<?lua print(z+3000) ?>" />
377                            </waypoints>
378                            <events>
379                                <activity>
380                                    <EventListener event="activateTeam1No1" />
381                                </activity>
382                            </events>
383                        </WaypointPatrolController>
384                    </controller>
385                </SpaceShip>
386            </trigger>
387        </events>
388    </EventTrigger>
389
390<?lua end ?>
391<!---->
392<!--Creating spaceships (enemy) END -->
393
394<!--Enemies on the way to the transporters -->
395
396<?lua for i=0,1,1 do
397z=math.random(-300,300)
398?>
399<!--NO 1-->
400        <SpaceShip position="<?lua print(5900+i*100) ?>,0,-3000" lookat="2500,0,-1000">
401            <templates>
402                <Template link=spaceshippirate/>
403            </templates>
404            <controller>
405                <WaypointPatrolController alertnessRadius=1500 team=1>
406                    <waypoints>
407                        <Model mesh="cube.mesh" scale=0 position="<?lua print(2500+100*i) ?>,0,-1000" />
408                    </waypoints>
409                </WaypointPatrolController>
410            </controller>
411        </SpaceShip>
412
413<!--NO 4-->
414        <SpaceShip position="<?lua print(9000) ?>,13000,<?lua print(z*i+3000) ?>" lookat="1000,0,3000">
415            <templates>
416                <Template link=spaceshippirate/>
417            </templates>
418            <controller>
419                <WaypointPatrolController alertnessRadius=1500 team=1>
420                    <waypoints>
421                        <Model mesh="cube.mesh" scale=0 position="<?lua print(10000) ?>,0,<?lua print(3000+z*i) ?>" />
422                    </waypoints>
423                </WaypointPatrolController>
424            </controller>
425        </SpaceShip>
426<?lua end ?>
427
428
429<!--NO 3-->
430        <SpaceShip position="<?lua print(200+13000) ?>,0,10000" lookat="8000,0,1000">
431            <templates>
432                <Template link=spaceshippirate/>
433            </templates>
434            <controller>
435                <WaypointPatrolController alertnessRadius=1500 team=1>
436                    <waypoints>
437                        <Model mesh="cube.mesh" scale=0 position="<?lua print(200+8000) ?>,0,1000" />
438                    </waypoints>
439                </WaypointPatrolController>
440            </controller>
441        </SpaceShip>
442<?lua for i=0,1,1 do ?>   
443        <SpaceShip position="<?lua print(i*400+13000) ?>,100,10000" lookat="8000,0,1000">
444            <templates>
445                <Template link=spaceshippirate/>
446            </templates>
447            <controller>
448                <WaypointPatrolController alertnessRadius=1500 team=1>
449                    <waypoints>
450                        <Model mesh="cube.mesh" scale=0 position="<?lua print(i*400+8000) ?>,0,1000" />
451                    </waypoints>
452                </WaypointPatrolController>
453            </controller>
454        </SpaceShip>
455<?lua end ?>
456
457
458<!--NO 2-->
459<?lua for i=0,3,1 do ?>
460        <SpaceShip position="<?lua print(math.random(5500,6500)+2000) ?>,0,1000" lookat="2500,0,-1000">
461            <templates>
462                <Template link=spaceshippirate/>
463            </templates>
464            <controller>
465                <WaypointPatrolController alertnessRadius=1500 team=1>
466                    <waypoints>
467                        <Model mesh="cube.mesh" scale=0 position="<?lua print(math.random(5750,6250)+2000) ?>,0,1250" />
468                        <Model mesh="cube.mesh" scale=0 position="<?lua print(math.random(5750,6250)+2000) ?>,250,1000" />
469                        <Model mesh="cube.mesh" scale=0 position="<?lua print(math.random(5750,6250)+2000) ?>,0,1000" />
470                    </waypoints>
471                </WaypointPatrolController>
472            </controller>
473        </SpaceShip>
474<?lua end ?>
475
476<!--Creating spaceships (enemy) END -->
477
478<Trigger invert=true name="activateFirstSpawnpoint">
479    <DistanceTrigger name="activateSecondSpawnpoint" position="10000,0,3000" distance="1000" target="DistanceTriggerBeacon" targetname="PlayerDistanceTrigger" activations="1" stayactive="true" />
480</Trigger>
481
482    </Scene>
483</Level>
Note: See TracBrowser for help on using the repository browser.