Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 11239 was 11239, checked in by bberabi, 8 years ago

sound and countdown

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