Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 7567 was 7463, checked in by dafrick, 14 years ago

Fixing "bug", that caused crash in dedicated mode.
Script object can now specify whether the code that is executed by it needs graphics to work.

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