Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/lastmanstanding2/data/levels/fightInOurBack.oxw @ 7745

Last change on this file since 7745 was 7679, checked in by dafrick, 14 years ago

Renaming levelfiles (and some other) according to our new naming conventions which is using camelCase, without '_' or spaces.

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