Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/presentation2/data/levels/presentationHS09b.oxw @ 6279

Last change on this file since 6279 was 6257, checked in by decapitb, 15 years ago

new level presentationHS09b with asteroid field fog and most importantly SOUND. couldn't get sound to work in the other level…same error every time:
"Sound: Error setting pitch: 40961"

File size: 2.9 KB
Line 
1<?lua
2  include("stats.oxo")
3  include("hudtemplates3.oxo")
4?>
5
6<?lua
7  include("templates/spaceship_assff.oxt")
8  include("templates/spaceship_pirate.oxt")
9?>
10
11<Level
12 name         = "Sample"
13 description  = "Just a few tests"
14>
15  <Scene
16    ambientlight = "0.8, 0.8, 0.8"
17    skybox       = "Orxonox/Starbox"
18  >
19
20   
21        <AmbientSound ambientSource="Earth.ogg" loop="true" play="true" />
22
23   <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" />
24   <?lua
25   elements = {"asteroid_ice.mesh", "asteroid_UV.mesh", "ast1.mesh", "ast2.mesh", "ast3.mesh", "ast4.mesh", "ast5.mesh", "ast6.mesh"}
26   elements.length = function()
27        return table.getn(elements)
28   end
29   for i = 1, 100, 1
30   do
31   x = math.random() * 200  + (i) * 200
32   y = math.random() * 3000 - 1500
33   z = math.random() * 3000 - 1500 + (i-100) * 10
34   s = math.random() * 60 + 30
35   e = math.floor(math.random()*elements.length()+1)
36   ?>
37   
38    <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) ?>">
39      <attached>
40        <Model position="0,0,0" scale=<?lua print(s) ?> mesh="<?lua print(elements[e])?>" />
41      </attached>
42    </MovableEntity>
43<?lua
44end
45?>
46
47<?lua
48for i = 1, 200, 1
49do
50x = math.random() * 100 + i*100
51y = math.random() * 3000 - 1500
52z = math.random() * 3000 - 1500 + (i-100) * 10
53s = math.random() * 60 + 30
54?>
55 <ParticleSpawner position="<?lua print(x) ?>,<?lua print(y) ?>,<?lua print(z) ?>" source="Orxonox/Steam" lifetime=3.0 loop=1 />
56
57<!--<Billboard material="Test/Fog" position="<?lua print(x) ?>,<?lua print(y) ?>,<?lua print(z) ?>"  color="1, 1, 1, 0.01" scale="20" />
58-->
59<?lua
60end
61?>
62
63<?lua
64elements = {"BodyDebris1.mesh", "CockpitDebris.mesh", "LightningGun.mesh", "WingDebris1.mesh", "WingDebris2.mesh", "satellitedish.mesh", "Thruster.mesh"}
65sizes = {4, 4, 4, 4, 4, 10, 20}
66elements.length = function()
67    return table.getn(elements)
68end
69for i = 1, 100, 1
70do
71x = math.random() * 750 - 4500
72y = math.random() * 1000 + 2000
73z = math.random() * 500 + 1000
74e = math.floor(math.random()*elements.length()+1)
75?>
76   
77    <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) ?>">
78      <attached>
79        <Model position="0,0,0" scale="<?lua print(sizes[e]) ?>" mesh="<?lua print( elements[e]) ?>" />
80      </attached>
81    </MovableEntity>
82        <?lua
83        end
84        ?>
85
86
87    <SpawnPoint position="0,0,100" spawnclass=SpaceShip pawndesign=spaceshipassff />
88  </Scene>
89</Level>
Note: See TracBrowser for help on using the repository browser.