Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/SpaceRace_HS16/data/levels/spaceRace.oxw @ 11260

Last change on this file since 11260 was 11260, checked in by meilel, 7 years ago

changed level file

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