Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/data/levels/spaceRace.oxw @ 9201

Last change on this file since 9201 was 9016, checked in by jo, 13 years ago

Merging presentation2011 branch to trunk. Please check for possible bugs.

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