Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/modularships/data/levels/spaceRace.oxw @ 9994

Last change on this file since 9994 was 9939, checked in by jo, 11 years ago

presentationHS13 branch merged into trunk

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