Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/presentation3/data/levels/presentation09b.oxw @ 7046

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