Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: data/media/levels/presentation09b.oxw @ 5569

Last change on this file since 5569 was 5569, checked in by bknecht, 15 years ago

added depris pieces

File size: 2.3 KB
Line 
1<?lua
2  include("overlay/hudtemplates3.oxo")
3  include("overlay/stats.oxo")
4  include("levels/templates/spaceship_assff.oxt")
5  include("levels/templates/spaceship_H2.oxt")
6?>
7
8<Level
9 name         = "Presentation09"
10 description  = "presentation level for Orxonox Convention X"
11
12>
13  <Scene
14   ambientlight = "0.5, 0.5, 0.5"
15   skybox       = "Orxonox/skypanoramagen2"
16  >
17    <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" />
18
19    <SpawnPoint position="-4200, 2500, 1200" spawnclass=SpaceShip pawndesign=spaceshipassff />
20
21    <Model position="10500, 2000, 3000" scale="100" mesh="spacecruiser.mesh"/>
22<?lua
23for i = 1, 200, 1
24do
25x = math.random() * 100  + (i-50) * 100
26y = math.random() * 3000 - 1500
27z = math.random() * 3000 - 1500 + (i-100) * 10
28s = math.random() * 100 + 50
29?>
30   
31    <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) ?>">
32      <attached>
33        <Model position="0,0,0" scale=<?lua print(s) ?> mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" />
34      </attached>
35    </MovableEntity>
36<?lua
37end
38?>
39
40<?lua
41elements = {"BodyDebris1.mesh", "CockpitDebris.mesh", "LightningGun.mesh", "WingDebris1.mesh", "WingDebris2.mesh", "satellitedish.mesh", "Thruster.mesh"}
42sizes = {4, 4, 4, 4, 4, 10, 20}
43elements.length = function()
44    return table.getn(elements)
45end
46for i = 1, 150, 1
47do
48x = math.random() * 750 - 4500
49y = math.random() * 1000 + 2000
50z = math.random() * 500 + 1000
51e = math.floor(math.random()*elements.length()+1)
52?>
53   
54    <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) ?>">
55      <attached>
56        <Model position="0,0,0" scale="<?lua print(sizes[e]) ?>" mesh="<?lua print( elements[e]) ?>" />
57      </attached>
58    </MovableEntity>
59<?lua
60end
61?>
62   
63  </Scene>
64</Level>
Note: See TracBrowser for help on using the repository browser.