Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 8703 was 8630, checked in by dafrick, 14 years ago

Cleanup.

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