Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/data/levels/presentation09b.oxw @ 7293

Last change on this file since 7293 was 7163, checked in by dafrick, 14 years ago

Merged presentation3 branch into trunk.

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