Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/spacerace/data/levels/spaceRace.oxw @ 8589

Last change on this file since 8589 was 8573, checked in by dafrick, 14 years ago

Fixing Space Race.

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