Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/archive/QuestGuide_HS16/data/levels/spaceRace.oxw @ 12373

Last change on this file since 12373 was 10624, checked in by landauf, 9 years ago

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