Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/presentation/data/levels/spaceRace.oxw @ 8679

Last change on this file since 8679 was 8679, checked in by dafrick, 13 years ago

Finalizing presentation level.

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