Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/presentation3/data/levels/presentationHS09.oxw @ 7036

Last change on this file since 7036 was 7036, checked in by scheusso, 14 years ago

some changes regarding lod:

  • added lodtemplate in different levels
  • trying to avoid sigabrt's because of models with too much lod levels
  • Property svn:eol-style set to native
File size: 14.4 KB
Line 
1<?lua
2  include("hudtemplates3.oxo")
3  include("stats.oxo")
4  include("templates/spaceship_assff.oxt")
5  include("templates/spaceship_H2.oxt")
6  include("templates/spaceship_pirate.oxt")
7  include("templates/pickup_representation_templates.oxt")
8  include("templates/lodinformation.oxt")
9?>
10
11<Level
12 name         = "Presentation09"
13 description  = "presentation level for Orxonox Convention X"
14 gametype     = TeamDeathmatch
15 hasPhysics = true
16>
17  <templates>
18    <Template link=lodtemplate_default />
19  </templates>
20  <Scene
21   ambientlight = "0.6, 0.4, 0.4"
22   skybox       = "Orxonox/skypanoramagen2"
23  >
24
25    <?lua
26      include("includes/pickups.oxi")
27    ?>
28
29    <Light type=directional position="0,0,0" direction="0.683, 0.289, 0.670" diffuse="0.8, 0.5, 0.5, 1.0" specular="0.8, 0.4, 0.4, 1.0" />
30
31    <SpawnPoint position="-3800, 2500, 1500" direction="-0.683, -0.289, -0.670"  spawnclass=SpaceShip pawndesign=spaceshipassff />
32
33    <SpaceShip position="-3900,3000,1000">
34      <templates>
35        <Template link=spaceshipHtwo/>
36      </templates>
37      <controller>
38        <WaypointPatrolController alertnessradius=100 team=0>
39          <waypoints>
40            <StaticEntity position="-3850,2800,1450" />
41          </waypoints>
42        </WaypointPatrolController>
43      </controller>
44    </SpaceShip>
45
46    <SpaceShip position="-4100,2600,1600">
47      <templates>
48        <Template link=spaceshipHtwo/>
49      </templates>
50      <controller>
51        <WaypointPatrolController alertnessradius=100 team=0>
52          <waypoints>
53            <StaticEntity position="-3850,2800,1450" />
54          </waypoints>
55        </WaypointPatrolController>
56      </controller>
57    </SpaceShip>
58
59    <SpaceShip position="-4000,2500,1500">
60      <templates>
61        <Template link=spaceshipHtwo/>
62      </templates>
63      <controller>
64        <WaypointPatrolController alertnessradius=100 team=0>
65          <waypoints>
66            <StaticEntity position="-3850,2800,1450" />
67          </waypoints>
68        </WaypointPatrolController>
69      </controller>
70    </SpaceShip>
71
72    <SpaceShip position="-4100,2700,1500">
73      <templates>
74        <Template link=spaceshipHtwo/>
75      </templates>
76      <controller>
77        <WaypointPatrolController alertnessradius=100 team=0 />
78      </controller>
79    </SpaceShip>
80
81    <SpaceShip position="-4150,2750,1550">
82      <templates>
83        <Template link=spaceshipHtwo/>
84      </templates>
85      <controller>
86        <WaypointPatrolController alertnessradius=100 team=0 />
87      </controller>
88    </SpaceShip>
89
90    <Billboard material="Test/Fog" position="-3800, 2500, 1500" alpha="0.1" color="1, 1, 1, 0.1" scale="0.5" />
91
92    <PickupSpawner position="-3800, 2500, 1500" respawnTime="60" triggerDistance="20" maxSpawnedItems="5">
93      <pickup>
94        <SpeedPickup template=smalljumppickup />
95      </pickup>
96    </PickupSpawner>
97
98    <!-- PickupRepresentation for the pickup below, since it is not a standard pickup provided by pickups.oxi -->
99    <PickupRepresentation
100      pickupName = "Medium Health Pack"
101      pickupDescription = "Once used adds a medium amout of health to the ship."
102      spawnerTemplate = "mediumhealthpickupRepresentation"
103      inventoryRepresentation = "MediumHealth"
104    >
105      <pickup>
106        <HealthPickup health=100 activationType="onUse" durationType="once" />
107      </pickup>
108    </PickupRepresentation>
109
110    <PickupSpawner position="-4150,2750,1550" respawnTime="60" triggerDistance="20" maxSpawnedItems="5">
111      <pickup>
112        <HealthPickup health=100 activationType=onUse durationType=once />
113      </pickup>
114    </PickupSpawner>
115
116    <PickupSpawner position="2300, 4300, 2400" respawnTime="5" triggerDistance="20">
117      <pickup>
118        <HealthPickup template=mediumhealthpickup />
119      </pickup>
120    </PickupSpawner>
121
122    <Billboard position="-2500, 2400, 1500" material="Examples/Flare" />
123    <EventDispatcher>
124      <targets>
125        <EventTarget target=pirates />
126      </targets>
127      <events>
128        <activity>
129          <DistanceTrigger position="-2500, 2400, 1500" distance=250 target="SpaceShip" stayactive=true />
130        </activity>
131      </events>
132    </EventDispatcher>
133
134    <?lua
135      for i = 1, 10, 1 do
136    ?>
137      <SpaceShip position="<?lua print(5000 + math.random() * 4000 - 2000) ?>,<?lua print(0 + math.random() * 2000 - 1000) ?>,<?lua print(math.random() * 2000 - 1000) ?>">
138        <templates>
139          <Template link=spaceshippirate />
140        </templates>
141        <controller>
142          <WaypointPatrolController name=pirates alertnessradius=1000 team=1 active=false>
143            <waypoints>
144              <StaticEntity position="3100, 2000, 1500" />
145            </waypoints>
146          </WaypointPatrolController>
147        </controller>
148      </SpaceShip>
149    <?lua end ?>
150
151    <?lua
152      for i = 1, 12, 1 do
153    ?>
154      <SpaceShip position="<?lua print(2800 + math.random() * 2000 - 1000) ?>,<?lua print(2500+ math.random() * 1000 - 500) ?>,<?lua print(2500 + math.random() * 1000 - 500) ?>" >
155        <templates>
156          <Template link=spaceshipassff />
157        </templates>
158        <controller>
159          <WaypointPatrolController alertnessradius=1000 team=0>
160            <waypoints>
161              <StaticEntity position="<?lua print(2800 + math.random() * 1000 - 500) ?>,<?lua print(2500 + math.random() * 1000 - 500) ?>,<?lua print(1500 + math.random() * 1000 - 500) ?>" />
162            </waypoints>
163          </WaypointPatrolController>
164        </controller>
165      </SpaceShip>
166    <?lua end ?>
167
168    <Billboard position="2300, 4400, 2500" material="Examples/Flare" />
169    <EventDispatcher>
170      <targets>
171        <EventTarget target=attacker />
172      </targets>
173      <events>
174        <activity>
175          <DistanceTrigger position="2300, 4400, 2500" distance=50 target="SpaceShip" stayactive=true />
176        </activity>
177      </events>
178    </EventDispatcher>
179
180    <?lua
181      for i = 1, 12, 1 do
182    ?>
183      <SpaceShip position="<?lua print(2500 + math.random() * 500 - 250) ?>,<?lua print(4800 + math.random() * 500 - 250) ?>,<?lua print(2500 + math.random() * 500 - 250) ?>" >
184        <templates>
185          <Template link=spaceshipassff />
186        </templates>
187        <controller>
188          <WaypointPatrolController name=attacker alertnessradius=<?lua print(math.random() * 2000) ?> team=0 active=false>
189            <waypoints>
190              <StaticEntity position="<?lua print(2800 + math.random() * 500 - 250) ?>,<?lua print(2500 + math.random() * 500 - 250) ?>,<?lua print(1500 + math.random() * 500 - 250) ?>" />
191              <StaticEntity position="<?lua print(5000 + math.random() * 500 - 250) ?>,<?lua print(0 + math.random() * 500 - 250) ?>,<?lua print(0 + math.random() * 500 - 250) ?>" />
192              <StaticEntity position="<?lua print(7500 + math.random() * 500 - 250) ?>,<?lua print(-2500 + math.random() * 500 - 250) ?>,<?lua print(-1500 + math.random() * 500 - 250) ?>" />
193            </waypoints>
194          </WaypointPatrolController>
195        </controller>
196      </SpaceShip>
197    <?lua end ?>
198
199    <StaticEntity position="2800, 2500, 2500">
200      <attached>
201        <CheckPoint />
202        <Model position="400, 0, 0" scale="40" mesh="DuBall2.mesh"/>
203        <Model position="-400, 0, 0" scale="40" mesh="DuBall1.mesh"/>
204      </attached>
205    </StaticEntity>
206
207<!--
208    <Destroyer position="6500, -2000, -1000" collisionType=dynamic linearDamping=0.8 angularDamping=0 mass=500>
209      <attached>
210        <CheckPoint />
211        <Model position="0,0,0" scale="5" mesh="Carrier.mesh"/>
212        <Backlight
213          mainstate=activity
214          active=false
215          scale=0.4
216          name=bltest
217          position=" 7.6, 0, 6"
218          colour="0.2, 0.65, 1.0, 1.0"
219          width=15
220          length=1500
221          lifetime=2
222          elements=50
223          trailmaterial="Trail/backlighttrail"
224          turnontime=1
225          turnofftime=1
226          material="Flares/ThrusterFlare1"
227        />
228      </attached>
229      <collisionShapes>
230        <BoxCollisionShape position="70,0,-25"      halfExtents="150, 50, 25" />
231        <BoxCollisionShape position="95,75,-16"     halfExtents="70, 10, 12" />
232        <BoxCollisionShape position="95,-75,-16"    halfExtents="70, 10, 12" />
233        <BoxCollisionShape position="77,47,30"      halfExtents="110, 2, 30" />
234        <BoxCollisionShape position="77,-47,30"     halfExtents="110, 2, 30" />
235        <BoxCollisionShape position="77,0,50"       halfExtents="110, 45, 6" />
236        <BoxCollisionShape position="167,0,70"      halfExtents="17, 20, 20" />
237      </collisionShapes>
238    </Destroyer>
239-->
240
241    <Destroyer
242      position          = "6500,-2000,-1000"
243      collisionType     = dynamic
244      mass              = 100000
245      angularDamping    = 0.9999999
246      health            = 1000
247      maxhealth         = 1000
248      initialhealth     = 1000
249    >
250      <controller>
251        <WaypointPatrolController team=1 />
252      </controller>
253      <attached>
254        <Model mesh="Carrier.mesh" scale="5" />
255        <Backlight
256          mainstate=activity
257          active=false
258          scale=0.4
259          name=bltest
260          position=" 7.6, 0, 6"
261          colour="0.2, 0.65, 1.0, 1.0"
262          width=15
263          length=1500
264          lifetime=2
265          elements=50
266          trailmaterial="Trail/backlighttrail"
267          turnontime=1
268          turnofftime=1
269          material="Flares/ThrusterFlare1"
270        />
271
272        <?lua
273          for i=0,8,1 do
274        ?>
275          <BlinkingBillboard
276            position="<?lua print(200-270/8*i)?> ,15,2"
277            material="Examples/Flare"
278            colour="1.0, 0.5, 0.3"
279            phase=<?lua print(-360/8*i)?>
280            amplitude=0.1
281            frequency=0.5
282            quadratic=1
283          />
284
285          <BlinkingBillboard
286            position="<?lua print(200-270/8*i)?>,-15,2"
287            material="Examples/Flare"
288            colour="1.0, 0.5, 0.3"
289            phase=<?lua print(-360/8*i)?>
290            amplitude=0.1
291            frequency=0.5
292            quadratic=1
293          />
294        <?lua end ?>
295
296        <Backlight
297          scale=1
298          position=" 169, 75, -15"
299          colour="1, 0.85, 0.5, 0.5"
300          width=40
301          length=1000
302          lifetime=5
303          elements=15
304          trailmaterial="Trail/backlighttrail"
305          material="Examples/Flare"
306        />
307        <Backlight
308          scale=1
309          position=" 169, -75, -15"
310          colour="1, 0.85, 0.5, 0.5"
311          width=40
312          length=1000
313          lifetime=5
314          elements=15
315          trailmaterial="Trail/backlighttrail"
316          material="Examples/Flare"
317        />
318      </attached>
319      <collisionShapes>
320        <BoxCollisionShape position="70,0,-25"      halfExtents="150, 50, 25" />
321        <BoxCollisionShape position="95,75,-16"     halfExtents="70, 10, 12" />
322        <BoxCollisionShape position="95,-75,-16"    halfExtents="70, 10, 12" />
323        <BoxCollisionShape position="77,47,30"      halfExtents="110, 2, 30" />
324        <BoxCollisionShape position="77,-47,30"     halfExtents="110, 2, 30" />
325        <BoxCollisionShape position="77,0,50"       halfExtents="110, 45, 6" />
326        <BoxCollisionShape position="167,0,70"      halfExtents="17, 20, 20" />
327      </collisionShapes>
328    </Destroyer>
329
330    <?lua
331      for i = 1, 10, 1 do
332    ?>
333      <SpaceShip position="<?lua print(6200 + math.random() * 2000 - 1000) ?>,<?lua print(-1500 + math.random() * 1000 - 500) ?>,<?lua print(-700 + math.random() * 1000 - 500) ?>" >
334        <templates>
335          <Template link=spaceshippirate />
336        </templates>
337        <controller>
338          <WaypointPatrolController alertnessradius=1000 team=1>
339            <waypoints>
340              <StaticEntity position="<?lua print(6000 + math.random() * 1000 - 500) ?>,<?lua print(-2000 + math.random() * 1000 - 500) ?>,<?lua print(-1000 + math.random() * 1000 - 500) ?>" />
341            </waypoints>
342          </WaypointPatrolController>
343        </controller>
344      </SpaceShip>
345    <?lua end ?>
346
347    <?lua
348      elements = {"asteroid_ice.mesh", "asteroid_UV.mesh", "ast1.mesh", "ast2.mesh", "ast3.mesh", "ast4.mesh", "ast5.mesh", "ast6.mesh"}
349
350      elements.length = function()
351        return table.getn(elements)
352      end
353
354      for i = 1, 100, 1 do
355        x = math.random() * 100  + (i) * 100
356        y = math.random() * 3000 - 1500
357        z = math.random() * 3000 - 1500 + (i-100) * 10
358        s = math.random() * 60 + 30
359        e = math.floor(math.random()*elements.length()+1)
360    ?>
361      <MovableEntity mass=90000 position="<?lua print(x) ?>,<?lua print(y) ?>,<?lua print(z) ?>" linearDamping=0.8 angularDamping=0.8 rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 100 - 15) ?>">
362        <attached>
363          <Model position="0,0,0" scale=<?lua print(s) ?> mesh="<?lua print(elements[e])?>" />
364        </attached>
365      </MovableEntity>
366    <?lua end ?>
367
368    <?lua
369      for i = 1, 100, 1 do
370        x = math.random() * 200 + i*200
371        y = math.random() * 3000 - 1500
372        z = math.random() * 3000 - 1500 + (i-100) * 10
373        s = math.random() * 60 + 30
374    ?>
375      <ParticleSpawner position="<?lua print(x) ?>,<?lua print(y) ?>,<?lua print(z) ?>" source="Orxonox/Steam" lifetime=3.0 loop=1 />
376      <!-- Billboard material="Test/Fog" position="<?lua print(x) ?>,<?lua print(y) ?>,<?lua print(z) ?>"  color="1, 1, 1, 0.01" scale="20" /-->
377    <?lua end ?>
378
379    <?lua
380      elements = {"BodyDebris1.mesh", "CockpitDebris.mesh", "LightningGun.mesh", "WingDebris1.mesh", "WingDebris2.mesh", "satellitedish.mesh", "Thruster.mesh"}
381      sizes = {4, 4, 4, 4, 4, 10, 20}
382     
383      elements.length = function()
384        return table.getn(elements)
385      end
386     
387      for i = 1, 150, 1 do
388        x = math.random() * 750 - 4500
389        y = math.random() * 1000 + 2000
390        z = math.random() * 500 + 1000
391        e = math.floor(math.random()*elements.length()+1)
392    ?>
393      <MovableEntity mass=90000 position="<?lua print(x) ?>,<?lua print(y) ?>,<?lua print(z) ?>" linearDamping=0.8 angularDamping=0.8 rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30- 15) ?>">
394        <attached>
395          <Model position="0,0,0" scale="<?lua print(sizes[e]) ?>" mesh="<?lua print( elements[e]) ?>" />
396        </attached>
397      </MovableEntity>
398    <?lua end ?>
399   
400<!--
401    <Planet position="1000,0,0" mass=900000 scale=1000 pitch=-90 mesh="iceplanet.mesh" atmosphere="atmosphere1" rotationaxis="1,1,0" rotationrate="1" atmospheresize=224.0f imagesize=1024.0f />
402-->
403
404  </Scene>
405</Level>
Note: See TracBrowser for help on using the repository browser.