Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/sfxThilo/data/levels/spaceRace.oxw @ 9889

Last change on this file since 9889 was 9889, checked in by thiweber, 10 years ago

A few changes..

  • Property svn:eol-style set to native
File size: 20.9 KB
Line 
1<LevelInfo
2 name = "Old Space Race"
3 description = "Have a furious Race in Space: Reach the checkpoints as fast as possible."
4 tags = "gametype"
5 screenshot = "spacerace.png"
6/>
7
8<?lua
9  include("stats.oxo")
10  include("HUDTemplates3.oxo")
11  include("templates/lodInformation.oxt")
12?>
13
14<?lua
15  include("templates/spaceshipAssff.oxt")
16  include("templates/spaceshipPirate.oxt")
17?>
18
19<Level
20 gametype = "OldSpaceRace"
21>
22  <templates>
23    <Template link=lodtemplate_default />
24  </templates>
25  <?lua include("includes/notifications.oxi") ?>
26
27  <Scene
28    ambientlight = "0.8, 0.8, 0.8"
29    skybox       = "Orxonox/skyBoxMoreNebula"
30  >
31 
32  <WorldAmbientSound source="Ganymede.ogg" looping="true" playOnLoad="true" />
33 
34
35    <?lua math.randomseed(98) ?>
36
37    <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0"/>
38
39    <SimpleNotification message="Reach the last check point within 150 seconds!!" />
40
41    <!-- ------------------SpawnPoint----------------- -->
42    <SpawnPoint position="0,-2100,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff active="true" >
43      <events>
44        <activity>
45          <EventTrigger invert="true">
46            <events>
47                <trigger>
48                    <EventListener event="checkpoint2" />
49                </trigger>
50            </events>
51          </EventTrigger>
52        </activity>
53      </events>
54    </SpawnPoint>
55   
56    <!-- ------------------CheckPoints----------------- -->
57    <OldRaceCheckPoint name="checkpoint1" position="0,-2000,1000" direction="0,-1,1" collisionType="static" scale="1" distance="40" checkpointindex="0" islast="false">
58        <attached>
59            <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
60        </attached>
61        <collisionShapes>
62            <BoxCollisionShape position="0,0,55"      halfExtents="55, 10, 10" />
63            <BoxCollisionShape position="0,0,-55"     halfExtents="55, 10, 10" />
64            <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
65            <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
66        </collisionShapes>
67    </OldRaceCheckPoint>
68
69    <OldRaceCheckPoint name="checkpoint2" position="0,-900,2300" stayActive="true" collisionType="static" scale="1" distance="40" checkpointindex="1" islast="false">
70        <attached>
71            <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
72            <SpawnPoint position="0,0,0" lookat="0,1000,0" spawnclass=SpaceShip pawndesign=spaceshipassff active="false" >
73                <events>
74                <activity>
75                    <Trigger mode="xor" invert="true" >
76                        <EventTrigger>
77                            <events>
78                                <trigger>
79                                    <EventListener event="checkpoint2" />
80                                </trigger>
81                            </events>
82                        </EventTrigger>
83                        <EventTrigger invert="true">
84                            <events>
85                                <trigger>
86                                    <EventListener event="checkpoint3" />
87                                </trigger>
88                            </events>
89                        </EventTrigger>
90                    </Trigger>
91                </activity>
92                </events>
93            </SpawnPoint>
94        </attached>
95        <collisionShapes>
96            <BoxCollisionShape position="0,0,55"      halfExtents="55, 10, 10" />
97            <BoxCollisionShape position="0,0,-55"     halfExtents="55, 10, 10" />
98            <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
99            <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
100        </collisionShapes>
101    </OldRaceCheckPoint>
102
103    <OldRaceCheckPoint name="checkpoint3" position="0,700,2700" stayActive="true" direction="0,0,1" collisionType="static" scale="1" distance="40" checkpointindex="2" islast="false">
104        <attached>
105            <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
106            <SpawnPoint position="0,0,0" lookat="0,1000,0" spawnclass=SpaceShip pawndesign=spaceshipassff active="false" >
107                <events>
108                <activity>
109                    <Trigger mode="xor" invert="true" >
110                        <EventTrigger>
111                            <events>
112                                <trigger>
113                                    <EventListener event="checkpoint3" />
114                                </trigger>
115                            </events>
116                        </EventTrigger>
117                        <EventTrigger invert="true">
118                            <events>
119                                <trigger>
120                                    <EventListener event="checkpoint4" />
121                                </trigger>
122                            </events>
123                        </EventTrigger>
124                    </Trigger>
125                </activity>
126                </events>
127            </SpawnPoint>
128        </attached>
129        <collisionShapes>
130            <BoxCollisionShape position="0,0,55"      halfExtents="55, 10, 10" />
131            <BoxCollisionShape position="0,0,-55"     halfExtents="55, 10, 10" />
132            <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
133            <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
134        </collisionShapes>
135    </OldRaceCheckPoint>
136
137    <OldRaceCheckPoint name="checkpoint4" position="0,2100,2300" stayActive="true" direction="0,1,1" collisionType="static" scale="1" distance="40" checkpointindex="3" islast="false">
138        <attached>
139            <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
140            <DistanceTrigger name="trigger3" position="0,0,0" distance=40 stayActive="true" />
141            <SpawnPoint position="0,0,0" lookat="0,-1000,0" spawnclass=SpaceShip pawndesign=spaceshipassff active="false" >
142                <events>
143                <activity>
144                    <Trigger mode="xor" invert="true" >
145                        <EventTrigger>
146                            <events>
147                                <trigger>
148                                    <EventListener event="checkpoint4" />
149                                </trigger>
150                            </events>
151                        </EventTrigger>
152                        <EventTrigger invert="true">
153                            <events>
154                                <trigger>
155                                    <EventListener event="checkpoint5" />
156                                </trigger>
157                            </events>
158                        </EventTrigger>
159                    </Trigger>
160                </activity>
161                </events>
162            </SpawnPoint>
163        </attached>
164        <collisionShapes>
165            <BoxCollisionShape position="0,0,55"      halfExtents="55, 10, 10" />
166            <BoxCollisionShape position="0,0,-55"     halfExtents="55, 10, 10" />
167            <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
168            <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
169        </collisionShapes>
170    </OldRaceCheckPoint>
171
172    <OldRaceCheckPoint name="checkpoint5" position="0,2200,500" stayActive="true" direction="0,1,0" collisionType="static" scale="1" distance="40" checkpointindex="4" islast="false">
173        <attached>
174        <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
175        <DistanceTrigger name="trigger4" position="0,0,0" distance=40 stayActive="true" />
176        <SpawnPoint position="0,0,0" lookat="0,-1000,0" spawnclass=SpaceShip pawndesign=spaceshipassff active="false" >
177            <events>
178            <activity>
179                <Trigger mode="xor" invert="true" >
180                    <EventTrigger>
181                        <events>
182                            <trigger>
183                                <EventListener event="checkpoint5" />
184                            </trigger>
185                        </events>
186                    </EventTrigger>
187                    <EventTrigger invert="true">
188                        <events>
189                            <trigger>
190                                <EventListener event="checkpoint6" />
191                            </trigger>
192                        </events>
193                    </EventTrigger>
194                </Trigger>
195            </activity>
196            </events>
197        </SpawnPoint>
198        </attached>
199        <collisionShapes>
200            <BoxCollisionShape position="0,0,55"      halfExtents="55, 10, 10" />
201            <BoxCollisionShape position="0,0,-55"     halfExtents="55, 10, 10" />
202            <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
203            <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
204        </collisionShapes>
205    </OldRaceCheckPoint>
206
207    <OldRaceCheckPoint name="checkpoint6" position="0,1500,-800" stayActive="true" direction="0,1,-1" collisionType="static" scale="1" distance="40" checkpointindex="5" islast="false">
208        <attached>
209            <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
210            <DistanceTrigger name="trigger5" position="0,0,0" distance=40 stayActive="true" />
211            <SpawnPoint position="0,0,0" lookat="0,-1000,0" spawnclass=SpaceShip pawndesign=spaceshipassff active="false" >
212                <events>
213                <activity>
214                    <Trigger mode="xor" invert="true" >
215                        <EventTrigger>
216                            <events>
217                                <trigger>
218                                    <EventListener event="checkpoint6" />
219                                </trigger>
220                            </events>
221                        </EventTrigger>
222                        <EventTrigger invert="true">
223                            <events>
224                                <trigger>
225                                    <EventListener event="checkpoint7" />
226                                </trigger>
227                            </events>
228                        </EventTrigger>
229                    </Trigger>
230                </activity>
231                </events>
232            </SpawnPoint>
233        </attached>
234        <collisionShapes>
235            <BoxCollisionShape position="0,0,55"      halfExtents="55, 10, 10" />
236            <BoxCollisionShape position="0,0,-55"     halfExtents="55, 10, 10" />
237            <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
238            <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
239        </collisionShapes>
240    </OldRaceCheckPoint>
241
242    <OldRaceCheckPoint name="checkpoint7" position="0,200,-1900" stayActive="true" collisionType="static" scale="1" distance="40" checkpointindex="6" islast="false">
243        <attached>
244            <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
245            <DistanceTrigger name="trigger6" position="0,0,0" distance=40 stayActive="true" />
246            <SpawnPoint position="0,0,0" lookat="0,-1000,0" spawnclass=SpaceShip pawndesign=spaceshipassff active="false" >
247                <events>
248                <activity>
249                    <Trigger mode="xor" invert="true" >
250                        <EventTrigger>
251                            <events>
252                                <trigger>
253                                    <EventListener event="checkpoint7" />
254                                </trigger>
255                            </events>
256                        </EventTrigger>
257                        <EventTrigger invert="true">
258                            <events>
259                                <trigger>
260                                    <EventListener event="checkpoint8" />
261                                </trigger>
262                            </events>
263                        </EventTrigger>
264                    </Trigger>
265                </activity>
266                </events>
267            </SpawnPoint>
268        </attached>
269        <collisionShapes>
270            <BoxCollisionShape position="0,0,55"      halfExtents="55, 10, 10" />
271            <BoxCollisionShape position="0,0,-55"     halfExtents="55, 10, 10" />
272            <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
273            <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
274        </collisionShapes>
275    </OldRaceCheckPoint>
276
277    <OldRaceCheckPoint name="checkpoint8" position="0,-700,-1400" stayActive="true" direction="0,-1,-1" collisionType="static" scale="1" distance="40" checkpointindex="7" islast="false">
278        <attached>
279        <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
280        <DistanceTrigger name="trigger7" position="0,0,0" distance=40 stayActive="true" />
281        <SpawnPoint position="0,0,0" lookat="0,-1000,0" spawnclass=SpaceShip pawndesign=spaceshipassff active="false" >
282            <events>
283            <activity>
284                <Trigger mode="xor" invert="true" >
285                    <EventTrigger>
286                        <events>
287                            <trigger>
288                                <EventListener event="checkpoint8" />
289                            </trigger>
290                        </events>
291                    </EventTrigger>
292                    <EventTrigger invert="true">
293                        <events>
294                            <trigger>
295                                <EventListener event="checkpoint9" />
296                            </trigger>
297                        </events>
298                    </EventTrigger>
299                </Trigger>
300            </activity>
301            </events>
302        </SpawnPoint>
303        </attached>
304        <collisionShapes>
305            <BoxCollisionShape position="0,0,55"      halfExtents="55, 10, 10" />
306            <BoxCollisionShape position="0,0,-55"     halfExtents="55, 10, 10" />
307            <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
308            <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
309        </collisionShapes>
310    </OldRaceCheckPoint>
311
312    <OldRaceCheckPoint name="checkpoint9" position="0,-1300,-800" stayActive="true" collisionType="static" scale="1" distance="40" checkpointindex="8" islast="false">
313        <attached>
314            <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
315            <DistanceTrigger name="trigger8" position="0,0,0" distance=40 stayActive="true" />
316            <SpawnPoint position="0,0,0" lookat="0,-1000,0" spawnclass=SpaceShip pawndesign=spaceshipassff active="false" >
317                <events>
318                <activity>
319                    <EventTrigger>
320                        <events>
321                            <trigger>
322                                <EventListener event="checkpoint9" />
323                            </trigger>
324                        </events>
325                    </EventTrigger>
326                </activity>
327                </events>
328            </SpawnPoint>
329        </attached>
330        <collisionShapes>
331            <BoxCollisionShape position="0,0,55"      halfExtents="55, 10, 10" />
332            <BoxCollisionShape position="0,0,-55"     halfExtents="55, 10, 10" />
333            <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
334            <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
335        </collisionShapes>
336    </OldRaceCheckPoint>
337
338    <OldRaceCheckPoint name="checkpoint10" position="0,-2100,0" collisionType="static" scale="1" distance="40" checkpointindex="9" islast="true" timelimit="150">
339        <attached>
340        <   Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
341        </attached>
342        <collisionShapes>
343            <BoxCollisionShape position="0,0,55"      halfExtents="55, 10, 10" />
344            <BoxCollisionShape position="0,0,-55"     halfExtents="55, 10, 10" />
345            <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
346            <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
347        </collisionShapes>
348    </OldRaceCheckPoint>
349
350    <!-- ------------------Planet----------------- -->
351    <Planet position="0,0,0" scale=300 pitch=-90 mesh="iceplanet.mesh" atmosphere="atmosphere1" rotationaxis="8,1,0" rotationrate="1" atmospheresize=224.0f imagesize=1024.0f />
352    <StaticEntity position="0,0,0" collisionType=static>
353        <collisionShapes>
354            <SphereCollisionShape radius="399" />
355        </collisionShapes>
356    </StaticEntity>
357
358    <!-- ---------------asteroid ellipse----------------- -->
359    <?lua
360    max = 20
361    for i = 0, max, 1
362    do
363    y = math.sin(i/max*6)*2000
364    z = math.cos(i/max*6)*2500
365    x = 0
366    ?>
367    <?lua
368    for k = 1, 15, 1
369    do
370    j = math.random()
371    ?>
372
373    <MovableEntity
374      position = "<?lua print(x + math.random() * 500) ?>,<?lua print(y + math.random() * 500) ?>,<?lua print(z + math.random() * 1000) ?>"
375      collisionType = "dynamic"
376      linearDamping = "0.5"
377      angularDamping = "0.01"
378      collisiondamage = "0.01"
379      enablecollisiondamage = "true"
380      scale="<?lua print(j * 5) ?>" >
381      <attached>
382        <Model position="0,0,0" scale="<?lua print(j * 10) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh">
383      <?lua if k == 5 then ?><attached><!-- ---------asteroid fog----- -->
384            <ParticleEmitter position="0,0,0" source="Orxonox/Steam" />
385          </attached> <?lua end ?>
386        </Model>
387      </attached>
388      <collisionShapes>
389        <SphereCollisionShape radius="<?lua print(j * 80) ?>" />
390      </collisionShapes>
391    </MovableEntity>
392    <?lua
393    end
394    ?>
395    <?lua end ?>
396
397    <!-- ---------------ForceFields----------------- -->
398    <ForceField position="0,-700,2700" direction="0,1,0" diameter=500 velocity=2000 length=600 />
399        <MovableEntity position="0,-400,2700">
400            <attached>
401                <Billboard position="0,0,0" material="Flares/ringflare2" colour="0.5,0,0" scale=2/>
402                <?lua for i=0,15,1 do ?>
403                    <Billboard position="-200,<?lua print(i*40) ?>,0" material="Examples/Flare" colour="0.5,0,0" scale=1/>
404                    <Billboard position="200,<?lua print(i*40) ?>,0" material="Examples/Flare" colour="0.5,0,0" scale=1/>
405                <?lua end ?>
406                </attached>
407        </MovableEntity>
408
409     <ForceField position="0,2500,2000" direction="0,0,-1" diameter=250 velocity=2000 length=600 />
410        <MovableEntity position="0,2500,2000">
411            <attached>
412                <Billboard position="0,0,0" material="Flares/ringflare2" colour="0.5,0,0" scale=2/>
413                <?lua for i=0,15,1 do ?>
414                    <Billboard position="-100,0,-<?lua print(i*40) ?>" material="Examples/Flare" colour="0.5,0,0" scale=1/>
415                    <Billboard position="100,0,-<?lua print(i*40) ?>" material="Examples/Flare" colour="0.5,0,0" scale=1/>
416                <?lua end ?>
417                </attached>
418        </MovableEntity>
419
420    <ForceField position="0,1300,-800" direction="0,-1,-1" diameter=250 velocity=2000 length=800 />
421        <MovableEntity position="0,1300,-800">
422            <attached>
423                <Billboard position="0,0,0" material="Flares/ringflare2" colour="0.5,0,0" scale=2/>
424                <?lua for i=0,20,1 do ?>
425                    <Billboard position="-100,<?lua print(-i*40*0.7071) ?>,<?lua print(-i*40*0.7071) ?>" material="Examples/Flare" colour="0.5,0,0" scale=1/>
426                    <Billboard position="100,<?lua print(-i*40*0.7071) ?>,<?lua print(-i*40*0.7071) ?>" material="Examples/Flare" colour="0.5,0,0" scale=1/>
427                <?lua end ?>
428                </attached>
429        </MovableEntity>
430
431    <ForceField position="0,-1400,-700" direction="0,-1,1" diameter=250 velocity=2000 length=600 />
432        <MovableEntity position="0,-1400,-700">
433            <attached>
434                <Billboard position="0,0,0" material="Flares/ringflare2" colour="0.5,0,0" scale=2/>
435                <?lua for i=0,15,1 do ?>
436                    <Billboard position="-100,<?lua print(-i*40*0.7071) ?>,<?lua print(i*40*0.7071) ?>" material="Examples/Flare" colour="0.5,0,0" scale=1/>
437                    <Billboard position="100,<?lua print(-i*40*0.7071) ?>,<?lua print(i*40*0.7071) ?>" material="Examples/Flare" colour="0.5,0,0" scale=1/>
438                <?lua end ?>
439                </attached>
440        </MovableEntity>
441
442    <!-- ---------------SpaceShips----------------- -->
443    <SpaceShip position="0,2000,2000" lookat="0,0,0" team=1 >
444      <templates>
445        <Template link=spaceshipassff />
446      </templates>
447      <controller>
448         <WaypointPatrolController alertnessradius=1500 team=0 >
449            <waypoints>
450                <Model scale=0 position="0,2000,2000" />
451            </waypoints>
452         </WaypointPatrolController>
453      </controller>
454    </SpaceShip>
455
456    <SpaceShip position="0,2000,-2000" lookat="0,0,0" team=1 >
457      <templates>
458        <Template link=spaceshipassff />
459      </templates>
460      <controller>
461        <WaypointPatrolController alertnessradius=1500 team=0 >
462            <waypoints>
463                <Model scale=0 position="0,2000,-2000" />
464            </waypoints>
465        </WaypointPatrolController>
466      </controller>
467    </SpaceShip>
468
469  </Scene>
470</Level>
Note: See TracBrowser for help on using the repository browser.