Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/consolecommands/data/levels/presentationHS09b.oxw @ 6554

Last change on this file since 6554 was 6305, checked in by decapitb, 15 years ago

added some enemies and stuff

File size: 3.7 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  include("templates/spaceship_ghost.oxt")
10  include("templates/spaceship_HXY.oxt")
11?>
12
13<Level
14 name         = "Sample"
15 description  = "Just a few tests"
16>
17  <Scene
18    ambientlight = "0.8, 0.8, 0.8"
19    skybox       = "Orxonox/Starbox"
20  >
21
22   
23        <AmbientSound ambientSource="Mars.ogg" loop="true" play="true" />
24
25   <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" />
26   <?lua
27   elements = {"asteroid_UV.mesh"
28--, "asteroid_ice.mesh"
29--, "ast1.mesh", "ast2.mesh", "ast3.mesh", "ast4.mesh", "ast5.mesh", "ast6.mesh"
30}
31   elements.length = function()
32        return table.getn(elements)
33   end
34   for i = 1, 100, 1
35   do
36   x = math.random() * 200  + (i) * 200
37   y = math.random() * 3000 - 1500
38   z = math.random() * 3000 - 1500 + (i-100) * 10
39   s = math.random() * 100 + 50
40   e = math.floor(math.random()*elements.length()+1)
41   ?>
42   
43    <MovableEntity collisiontype=dynamic mass=<?lua print(s*10)?> position="<?lua print(x) ?>,<?lua print(y) ?>,<?lua print(z) ?>" linearDamping=0.01 angularDamping=0 rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 100 - 15) ?>">
44      <attached>
45        <Model position="0,0,0" scale=<?lua print(s) ?> mesh="<?lua print(elements[e])?>" />
46      </attached>
47        <collisionShapes>
48                <SphereCollisionShape radius="<?lua if e==0 then print(s*0.9) end if e==1 then print(s*0.3) end if e==2 or e==3 or e==4 or e==5 or e==6 or e==7 then print(s*2) end ?>" />
49        </collisionShapes>
50    </MovableEntity>
51<?lua
52end
53?>
54
55<?lua
56for i = 1, 200, 1
57do
58x = math.random() * 100 + i*100
59y = math.random() * 3000 - 1500
60z = math.random() * 3000 - 1500 + (i-100) * 10
61s = math.rando
62?>
63
64 <ParticleSpawner position="<?lua print(x) ?>,<?lua print(y) ?>,<?lua print(z) ?>" source="Orxonox/Steam" lifetime=3.0 loop=1 />
65<!--
66<Billboard material="Test/Fog" position="<?lua print(x) ?>,<?lua print(y) ?>,<?lua print(z) ?>"  color="1, 1, 1, 0.01" scale="20" />
67-->
68<?lua
69end
70?>
71
72<?lua
73elements = {"BodyDebris1.mesh", "CockpitDebris.mesh", "LightningGun.mesh", "WingDebris1.mesh", "WingDebris2.mesh", "satellitedish.mesh", "Thruster.mesh"}
74sizes = {4, 4, 4, 4, 4, 10, 20}
75elements.length = function()
76    return table.getn(elements)
77end
78for i = 1, 100, 1
79do
80x = math.random() * 750 - 4500
81y = math.random() * 1000 + 2000
82z = math.random() * 500 + 1000
83e = math.floor(math.random()*elements.length()+1)
84?>
85   
86    <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) ?>">
87      <attached>
88        <Model position="0,0,0" scale="<?lua print(sizes[e]) ?>" mesh="<?lua print( elements[e]) ?>" />
89      </attached>
90    </MovableEntity>
91        <?lua
92        end
93        ?>
94<?lua
95for i = 1,5, 1
96do
97?>
98    <SpaceShip position="2000,0,0" >
99      <templates>
100        <Template link=spaceshipHXY />
101      </templates>
102      <controller>
103        <WaypointPatrolController name=ghost target=pirate alertnessradius=1000 team=0 active=false>
104          <waypoints>
105            <StaticEntity position="0,0,0" />
106          </waypoints>
107        </WaypointPatrolController>
108      </controller>
109    </SpaceShip>
110<?lua
111end
112?>
113
114    <SpawnPoint position="0,0,100" spawnclass=SpaceShip pawndesign=spaceshipHXY  />
115  </Scene>
116</Level>
Note: See TracBrowser for help on using the repository browser.