Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/kicklib2/data/levels/planets.oxw @ 8311

Last change on this file since 8311 was 8311, checked in by rgrieder, 13 years ago

svn:eol-style "native" for all text based files.
Also removed the executable property from planets.oxw.

  • Property svn:eol-style set to native
File size: 2.3 KB
Line 
1<?lua
2  include("HUDTemplates3.oxo")
3  include("stats.oxo")
4  include("templates/lodInformation.oxt")
5  include("templates/spaceshipSwallow.oxt")
6  include("templates/spaceshipPirate.oxt")
7?>
8
9
10
11<Level
12 name         = "Planet_Demo"
13 description  = "Demonstration of planets with high resolution."
14
15>
16  <templates>
17   <Template link=lodtemplate_default />
18  </templates>
19
20  <Scene
21   ambientlight = "0.5, 0.5, 0.5"
22   skybox       = "Orxonox/skypanoramagen1"
23  >
24   
25<WorldAmbientSound ambientSource="AlphaCentauri.ogg" looping="true" playOnLoad="true" />
26<Light type=directional position="-10000,-10000,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" />
27
28<?lua
29planetsize=40000
30?>
31
32<SpawnPoint position="<?lua print(math.sin(1.5) *(3)*planetsize) ?>,<?lua print(math.cos(1.5) *3*planetsize) ?>,<?lua print(500) ?>" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipswallow />
33
34
35<?lua
36max = 50
37
38for i = 1, max, 1
39do
40    x = math.sin(i/max*6)*(1.5)*planetsize
41    y = i*100
42    z = math.cos(i/max*6)*(1.5)*planetsize
43    ?>
44<?lua
45for k = 1, 25, 1
46do
47j = math.random()
48?>
49
50    <MovableEntity position="<?lua print(x + math.random() * 10000-2500) ?>,<?lua print(y + math.random() * 5000-2500) ?>,<?lua print(z + math.random() * 1000-500) ?>" <?lua if i == 5 then ?> collisionType=dynamic linearDamping=0.8 angularDamping=0 mass=<?lua print(j * 50) ?> <?lua end ?> scale=<?lua print(j * 5) ?> rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">
51      <attached>
52        <Model position="0,0,0" scale="<?lua print(j * 10) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" />
53      </attached>
54      <?lua if i == 5 then ?><collisionShapes>
55        <SphereCollisionShape radius="<?lua print(j * 70) ?>" />
56      </collisionShapes> <?lua end ?>
57    </MovableEntity>
58<?lua
59end
60?>
61<?lua end ?>
62    <Planet position="0,0,0" scale="<?lua print(planetsize) ?>" pitch=-90 mesh="jupiter.mesh" atmosphere="atmosphere1" rotationaxis="0,1,0" rotationrate="0.2" atmospheresize=300.0f imagesize=1024.0f />
63    <Planet position="<?lua print(5*planetsize) ?>,0,0" scale=10000 pitch=30 mesh="ganymede.mesh" atmosphere="atmosphere1" rotationaxis="1,0,1" rotationrate="1.5" atmospheresize=224.0f imagesize=1024.0f />
64  </Scene>
65</Level>
Note: See TracBrowser for help on using the repository browser.