Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 8552 was 8552, checked in by msalomon, 13 years ago
File size: 14.6 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 team=0 position="0,-2100,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff active="true" >
45      <events>
46        <activity>
47          <EventListener event="trigger1" />
48        </activity>
49      </events>
50    </SpawnPoint>
51   
52    <!-- ------------------CheckPoints----------------- -->
53    <RaceCheckPoint name="checkpoint1" position="0,-2000,1000" direction="0,-1,1" collisionType="static" scale="1" distance="40" checkpointindex="0" islast="false">
54    <attached>
55      <Model mass="50" scale="50" mesh="checkPoint.mesh" />
56    </attached>
57    <collisionShapes>
58      <BoxCollisionShape position="0,0,55"      halfExtents="55, 10, 10" />
59      <BoxCollisionShape position="0,0,-55"     halfExtents="55, 10, 10" />
60      <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
61      <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
62    </collisionShapes>
63    </RaceCheckPoint>
64
65    <RaceCheckPoint name="checkpoint2" position="0,-900,2300" collisionType="static" scale="1" distance="40" checkpointindex="1" islast="false">
66    <attached>
67      <Model mass="50" scale="50" mesh="checkPoint.mesh" />
68      <DistanceTrigger name="trigger1" position="0,0,0" distance=40 stayActive="true" />
69      <SpawnPoint team=0 position="0,0,0" lookat="0,700,2700" spawnclass=SpaceShip pawndesign=spaceshipassff active="false" >
70        <events>
71          <activity>
72            <EventListener event="trigger1" />
73            <EventListener event="trigger2" />
74          </activity>
75        </events>
76      </SpawnPoint>
77    </attached>
78    <collisionShapes>
79      <BoxCollisionShape position="0,0,55"      halfExtents="55, 10, 10" />
80      <BoxCollisionShape position="0,0,-55"     halfExtents="55, 10, 10" />
81      <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
82      <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
83    </collisionShapes>
84    </RaceCheckPoint>
85
86    <RaceCheckPoint name="checkpoint3" position="0,700,2700" direction="0,0,1" collisionType="static" scale="1" distance="40" checkpointindex="2" islast="false">
87    <attached>
88      <Model mass="50" scale="50" mesh="checkPoint.mesh" />
89      <DistanceTrigger name="trigger2" position="0,0,0" distance=40 stayActive="true" />
90      <SpawnPoint team=0 position="0,0,0" lookat="0,2100,2300" spawnclass=SpaceShip pawndesign=spaceshipassff active="false" >
91        <events>
92          <activity>
93            <EventListener event="trigger2" />
94            <EventListener event="trigger3" />
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>
105    </RaceCheckPoint>
106
107    <RaceCheckPoint name="checkpoint4" position="0,2100,2300" direction="0,1,1" collisionType="static" scale="1" distance="40" checkpointindex="3" islast="false">
108   <attached>
109      <Model mass="50" scale="50" mesh="checkPoint.mesh" />
110      <DistanceTrigger name="trigger3" position="0,0,0" distance=40 stayActive="true" />
111      <SpawnPoint team=0 position="0,0,0" lookat="0,2200,500" spawnclass=SpaceShip pawndesign=spaceshipassff active="false" >
112        <events>
113          <activity>
114            <EventListener event="trigger3" />
115            <EventListener event="trigger4" />
116          </activity>
117        </events>
118      </SpawnPoint>
119    </attached>
120     <collisionShapes>
121      <BoxCollisionShape position="0,0,55"      halfExtents="55, 10, 10" />
122      <BoxCollisionShape position="0,0,-55"     halfExtents="55, 10, 10" />
123      <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
124      <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
125    </collisionShapes>
126    </RaceCheckPoint>
127
128    <RaceCheckPoint name="checkpoint5" position="0,2200,500" direction="0,1,0" collisionType="static" scale="1" distance="40" checkpointindex="4" islast="false">
129    <attached>
130      <Model mass="50" scale="50" mesh="checkPoint.mesh" />
131      <DistanceTrigger name="trigger4" position="0,0,0" distance=40 stayActive="true" />
132      <SpawnPoint team=0 position="0,0,0" lookat="0,1500,-800" spawnclass=SpaceShip pawndesign=spaceshipassff active="false" >
133        <events>
134          <activity>
135            <EventListener event="trigger4" />
136            <EventListener event="trigger5" />
137          </activity>
138        </events>
139      </SpawnPoint>
140    </attached>
141     <collisionShapes>
142      <BoxCollisionShape position="0,0,55"      halfExtents="55, 10, 10" />
143      <BoxCollisionShape position="0,0,-55"     halfExtents="55, 10, 10" />
144      <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
145      <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
146    </collisionShapes>
147    </RaceCheckPoint>
148
149    <RaceCheckPoint name="checkpoint6" position="0,1500,-800" direction="0,1,-1" collisionType="static" scale="1" distance="40" checkpointindex="5" islast="false">
150    <attached>
151      <Model mass="50" scale="50" mesh="checkPoint.mesh" />
152      <DistanceTrigger name="trigger5" position="0,0,0" distance=40 stayActive="true" />
153      <SpawnPoint team=0 position="0,0,0" lookat="0,200,-1900" spawnclass=SpaceShip pawndesign=spaceshipassff active="false" >
154        <events>
155          <activity>
156            <EventListener event="trigger5" />
157            <EventListener event="trigger6" />
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="checkpoint7" position="0,200,-1900" collisionType="static" scale="1" distance="40" checkpointindex="6" islast="false">
171    <attached>
172      <Model mass="50" scale="50" mesh="checkPoint.mesh" />
173      <DistanceTrigger name="trigger6" position="0,0,0" distance=40 stayActive="true" />
174      <SpawnPoint team=0 position="0,0,0" lookat="0,-700,-1400" spawnclass=SpaceShip pawndesign=spaceshipassff active="false" >
175        <events>
176          <activity>
177            <EventListener event="trigger6" />
178            <EventListener event="trigger7" />
179          </activity>
180        </events>
181      </SpawnPoint>
182    </attached>
183     <collisionShapes>
184      <BoxCollisionShape position="0,0,55"      halfExtents="55, 10, 10" />
185      <BoxCollisionShape position="0,0,-55"     halfExtents="55, 10, 10" />
186      <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
187      <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
188    </collisionShapes>
189    </RaceCheckPoint>
190
191    <RaceCheckPoint name="checkpoint8" position="0,-700,-1400" direction="0,-1,-1" collisionType="static" scale="1" distance="40" checkpointindex="7" islast="false">
192    <attached>
193      <Model mass="50" scale="50" mesh="checkPoint.mesh" />
194      <DistanceTrigger name="trigger7" position="0,0,0" distance=40 stayActive="true" />
195      <SpawnPoint team=0 position="0,0,0" lookat="0,-1300,-800" spawnclass=SpaceShip pawndesign=spaceshipassff active="false" >
196        <events>
197          <activity>
198            <EventListener event="trigger7" />
199            <EventListener event="trigger8" />
200          </activity>
201        </events>
202      </SpawnPoint>
203    </attached>
204     <collisionShapes>
205      <BoxCollisionShape position="0,0,55"      halfExtents="55, 10, 10" />
206      <BoxCollisionShape position="0,0,-55"     halfExtents="55, 10, 10" />
207      <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
208      <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
209    </collisionShapes>
210    </RaceCheckPoint>
211
212    <RaceCheckPoint name="checkpoint9" position="0,-1300,-800" collisionType="static" scale="1" distance="40" checkpointindex="8" islast="false">
213    <attached>
214      <Model mass="50" scale="50" mesh="checkPoint.mesh" />
215      <DistanceTrigger name="trigger8" position="0,0,0" distance=40 stayActive="true" />
216      <SpawnPoint team=0 position="0,0,0" lookat="0,-2400,0" spawnclass=SpaceShip pawndesign=spaceshipassff active="false" >
217        <events>
218          <activity>
219            <EventListener event="trigger8" />
220          </activity>
221        </events>
222      </SpawnPoint>
223    </attached>
224     <collisionShapes>
225      <BoxCollisionShape position="0,0,55"      halfExtents="55, 10, 10" />
226      <BoxCollisionShape position="0,0,-55"     halfExtents="55, 10, 10" />
227      <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
228      <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
229    </collisionShapes>
230    </RaceCheckPoint>
231
232    <RaceCheckPoint name="checkpoint10" position="0,-2100,0" collisionType="static" scale="1" distance="40" checkpointindex="9" islast="true" timelimit="150">
233    <attached>
234      <Model mass="50" scale="50" mesh="checkPoint.mesh" />
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    <!-- ------------------Planet----------------- -->
245    <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 />
246    <StaticEntity position="0,0,0" collisionType=static>
247        <collisionShapes>
248            <SphereCollisionShape radius="399" />
249        </collisionShapes>
250    </StaticEntity>
251
252    <!-- ---------------asteroid ellypse----------------- -->
253    <?lua
254    max = 20
255    for i = 0, max, 1
256    do
257        y = math.sin(i/max*6)*2000
258    z = math.cos(i/max*6)*2500
259    x = 0
260    ?>
261    <?lua
262    for k = 1, 15, 1
263    do
264    j = math.random()
265    ?>
266
267    <MovableEntity
268      position = "<?lua print(x + math.random() * 500) ?>,<?lua print(y + math.random() * 500) ?>,<?lua print(z + math.random() * 1000) ?>"
269      collisionType = "dynamic"
270      linearDamping = "0.5"
271      angularDamping = "0.01"
272      collisiondamage = "0.01"
273      enablecollisiondamage = "true"
274      scale="<?lua print(j * 5) ?>" >
275      <attached>
276        <Model position="0,0,0" scale="<?lua print(j * 10) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh">
277          <?lua if k == 5 then ?><attached><!-- ---------asteroid fog----- -->
278            <ParticleEmitter position="0,0,0" source="Orxonox/Steam" />
279          </attached> <?lua end ?>
280        </Model>
281      </attached>
282      <collisionShapes>
283        <SphereCollisionShape radius="<?lua print(j * 80) ?>" />
284      </collisionShapes>
285    </MovableEntity>
286    <?lua
287    end
288    ?>
289    <?lua end ?>
290
291    <!-- ---------------ForceFields----------------- -->
292    <ForceField position="0,-700,2700" direction="0,1,0" diameter=500 velocity=2000 length=600 />
293        <MovableEntity position="0,-400,2700">
294            <attached>
295                <Billboard position="0,0,0" material="Flares/ringflare2" colour="0.5,0,0" scale=2/>
296                <?lua for i=0,15,1 do ?>
297                    <Billboard position="-200,<?lua print(i*40) ?>,0" material="Examples/Flare" colour="0.5,0,0" scale=1/>
298                    <Billboard position="200,<?lua print(i*40) ?>,0" material="Examples/Flare" colour="0.5,0,0" scale=1/>
299                <?lua end ?>
300                </attached>
301        </MovableEntity>
302
303     <ForceField position="0,2500,2000" direction="0,0,-1" diameter=250 velocity=2000 length=600 />
304        <MovableEntity position="0,2500,2000">
305            <attached>
306                <Billboard position="0,0,0" material="Flares/ringflare2" colour="0.5,0,0" scale=2/>
307                <?lua for i=0,15,1 do ?>
308                    <Billboard position="-100,0,-<?lua print(i*40) ?>" material="Examples/Flare" colour="0.5,0,0" scale=1/>
309                    <Billboard position="100,0,-<?lua print(i*40) ?>" material="Examples/Flare" colour="0.5,0,0" scale=1/>
310                <?lua end ?>
311                </attached>
312        </MovableEntity>
313
314    <ForceField position="0,1300,-800" direction="0,-1,-1" diameter=250 velocity=2000 length=800 />
315        <MovableEntity position="0,1300,-800">
316            <attached>
317                <Billboard position="0,0,0" material="Flares/ringflare2" colour="0.5,0,0" scale=2/>
318                <?lua for i=0,20,1 do ?>
319                    <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/>
320                    <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/>
321                <?lua end ?>
322                </attached>
323        </MovableEntity>
324
325    <ForceField position="0,-1400,-700" direction="0,-1,1" diameter=250 velocity=2000 length=600 />
326        <MovableEntity position="0,-1400,-700">
327            <attached>
328                <Billboard position="0,0,0" material="Flares/ringflare2" colour="0.5,0,0" scale=2/>
329                <?lua for i=0,15,1 do ?>
330                    <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/>
331                    <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/>
332                <?lua end ?>
333                </attached>
334        </MovableEntity>
335
336    <!-- ---------------SpaceShips----------------- -->
337    <SpaceShip position="0,2000,2000" lookat="0,0,0" >
338      <templates>
339        <Template link=spaceshipassff />
340      </templates>
341      <controller>
342        <AIController />
343      </controller>
344    </SpaceShip>
345
346  </Scene>
347</Level>
Note: See TracBrowser for help on using the repository browser.