Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/presentation3/data/levels/presentationHS09b.oxw @ 7054

Last change on this file since 7054 was 7036, checked in by scheusso, 14 years ago

some changes regarding lod:

  • added lodtemplate in different levels
  • trying to avoid sigabrt's because of models with too much lod levels
  • Property svn:eol-style set to native
File size: 9.0 KB
Line 
1<?lua
2  include("stats.oxo")
3  include("hudtemplates3.oxo")
4  include("templates/lodinformation.oxt")
5?>
6
7<?lua
8  include("templates/spaceship_assff.oxt")
9  include("templates/spaceship_pirate.oxt")
10  include("templates/spaceship_ghost.oxt")
11  include("templates/spaceship_HXY.oxt")
12  include("templates/spaceship_Transporter.oxt")
13  include("templates/spaceship_HXY_SL.oxt")
14  include("templates/spaceship_Transporter_SL.oxt")
15?>
16
17<Level
18 name         = "Sample"
19 description  = "Just a few tests"
20 gametype     = TeamDeathmatch
21>
22  <templates>
23    <Template link=lodtemplate_default />
24  </templates>
25  <Scene
26    ambientlight = "0.8, 0.8, 0.8"
27    skybox       = "Orxonox/Starbox"
28  >
29
30    <AmbientSound ambientSource="Mars.ogg" looping="true" playOnLoad="true" />
31
32   <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" />
33   
34    <?lua
35      for i = 1, 50, 1 do
36        x = math.random() * 2000  + 4000
37        y = math.random() * 4000 - 2000
38        z = math.random() * 2000 - 1000
39        s = math.random() * 100
40    ?>
41      <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) ?>">
42        <attached>
43          <Model position="0,0,0" scale=<?lua print(s) ?> mesh="asteroid_UV.mesh" />
44        </attached>
45        <collisionShapes>
46          <SphereCollisionShape radius="<?lua print(s*0.9) ?>" />
47        </collisionShapes>
48      </MovableEntity>
49      <ParticleSpawner position="<?lua print(x) ?>,<?lua print(y) ?>,<?lua print(z) ?>" source="Orxonox/Steam" lifetime=3.0 loop=1 />
50    <?lua end ?>
51
52    <?lua
53      elements = {"BodyDebris1.mesh", "CockpitDebris.mesh", "LightningGun.mesh", "WingDebris1.mesh", "WingDebris2.mesh", "satellitedish.mesh", "Thruster.mesh"}
54      sizes = {4, 4, 4, 4, 4, 10, 20}
55     
56      elements.length = function()
57        return table.getn(elements)
58      end
59     
60      for i = 1, 100, 1 do
61        x = math.random() * 750 - 4500
62        y = math.random() * 1000 + 2000
63        z = math.random() * 500 + 1000
64        e = math.floor(math.random()*elements.length()+1)
65    ?>
66      <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) ?>">
67        <attached>
68          <Model position="0,0,0" scale="<?lua print(sizes[e]) ?>" mesh="<?lua print( elements[e]) ?>" />
69        </attached>
70      </MovableEntity>
71    <?lua end ?>
72
73    <?lua
74      for i = 1,12, 1 do
75    ?>
76      <SpaceShip position="<?lua print(math.random()*500 + 4500) ?>,<?lua print(-(math.random()*500 -250)) ?>,<?lua print(i*50 - 150) ?>" >
77        <templates>
78          <Template link=spaceshipHXYSL />
79        </templates>
80        <controller>
81          <WaypointPatrolController alertnessradius=4000 team=0 active=true>
82            <waypoints>
83              <StaticEntity position="5000,<?lua print(math.random()*50)?> ,<?lua print(i*50 -150) ?>" />
84            </waypoints>
85          </WaypointPatrolController>
86        </controller>
87      </SpaceShip>
88    <?lua end ?>
89
90    <SpaceShip position="5000,100,100" >
91      <templates>
92        <Template link=spaceshipTransporterSL />
93      </templates>
94      <controller>
95        <WaypointPatrolController name=pirate  target=pirate alertnessradius=1000 team=0 active=false>
96          <waypoints>
97            <StaticEntity position="5000,100,1100" />
98          </waypoints>
99        </WaypointPatrolController>
100      </controller>
101    </SpaceShip>
102
103    <Destroyer
104      position          = "-5000,100 ,100"
105      collisionType     = dynamic
106      mass              = 100000
107      angularDamping    = 0.9999999
108      health            = 1000
109      maxhealth         = 1000
110      initialhealth     = 1000
111    >
112      <controller>
113        <WaypointPatrolController team=1 />
114      </controller>
115      <attached>
116        <Model mesh="Carrier.mesh" scale="5" />
117        <Backlight
118          mainstate=activity
119          active=false
120          scale=0.4
121          name=bltest
122          position=" 7.6, 0, 6"
123          colour="0.2, 0.65, 1.0, 1.0"
124          width=15
125          length=1500
126          lifetime=2
127          elements=50
128          trailmaterial="Trail/backlighttrail"
129          turnontime=1
130          turnofftime=1
131          material="Flares/ThrusterFlare1"
132        />
133        <?lua
134          for i=0,8,1 do
135        ?>
136          <BlinkingBillboard
137            position="<?lua print(200-270/8*i)?> ,15,2"
138            material="Examples/Flare"
139            colour="1.0, 0.5, 0.3"
140            phase=<?lua print(-360/8*i)?>
141            amplitude=0.1
142            frequency=0.5
143            quadratic=1
144          />
145
146          <BlinkingBillboard
147            position="<?lua print(200-270/8*i)?>,-15,2"
148            material="Examples/Flare"
149            colour="1.0, 0.5, 0.3"
150            phase=<?lua print(-360/8*i)?>
151            amplitude=0.1
152            frequency=0.5
153            quadratic=1
154          />
155        <?lua end ?>
156
157        <Backlight
158          scale=1
159          position=" 169, 75, -15"
160          colour="1, 0.85, 0.5, 0.5"
161          width=40
162          length=1000
163          lifetime=5
164          elements=15
165          trailmaterial="Trail/backlighttrail"
166          material="Examples/Flare"
167        />
168        <Backlight
169          scale=1
170          position=" 169, -75, -15"
171          colour="1, 0.85, 0.5, 0.5"
172          width=40
173          length=1000
174          lifetime=5
175          elements=15
176          trailmaterial="Trail/backlighttrail"
177          material="Examples/Flare"
178        />
179      </attached>
180      <collisionShapes>
181        <BoxCollisionShape position="70,0,-25"      halfExtents="150, 50, 25" />
182        <BoxCollisionShape position="95,75,-16"     halfExtents="70, 10, 12" />
183        <BoxCollisionShape position="95,-75,-16"    halfExtents="70, 10, 12" />
184        <BoxCollisionShape position="77,47,30"      halfExtents="110, 2, 30" />
185        <BoxCollisionShape position="77,-47,30"     halfExtents="110, 2, 30" />
186        <BoxCollisionShape position="77,0,50"       halfExtents="110, 45, 6" />
187        <BoxCollisionShape position="167,0,70"      halfExtents="17, 20, 20" />
188      </collisionShapes>
189    </Destroyer>
190
191    <?lua
192      for i = 1, 50, 1 do
193        x = -(math.random() * 2000  + 4000)
194        y = math.random() * 4000 - 2000
195        z = math.random() * 2000 - 1000
196        s = math.random() * 100
197    ?>
198      <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) ?>">
199        <attached>
200          <Model position="0,0,0" scale=<?lua print(s) ?> mesh="asteroid_ice.mesh" />
201        </attached>
202        <collisionShapes>
203          <SphereCollisionShape radius="<?lua print(s*0.9)?>" />
204        </collisionShapes>
205      </MovableEntity>
206      <ParticleSpawner position="<?lua print(x) ?>,<?lua print(y) ?>,<?lua print(z) ?>" source="Orxonox/Steam" lifetime=3.0 loop=1 />
207    <?lua end ?>
208
209    <!-- EventDispatcher>
210      <targets>
211        <EventTarget target=attack />
212        <EventTarget target=wait />
213      </targets>
214      <events>
215        <activity>
216          <DistanceTrigger position="0, 0, 4500" distance=100 target="SpaceShip" stayactive=true />
217        </activity>
218      </events>
219    </EventDispatcher>
220
221    <EventDispatcher>
222      <targets>
223        <EventTarget target=wait />
224      </targets>
225      <events>
226        <activity>
227          <DistanceTrigger position="0, 0, 4500" distance=100 target="SpaceShip" stayactive=false />
228        </activity>
229      </events>
230    </EventDispatcher -->
231
232    <?lua
233      for i = 1,25, 1 do
234    ?>
235      <SpaceShip position="<?lua print(-(math.random()*500 + 4500)) ?>,<?lua print(-(math.random()*500 -250)) ?>,<?lua print(i*50 - 150) ?>" >
236        <templates>
237          <Template link=spaceshipghost />
238        </templates>
239        <controller>
240          <WaypointPatrolController name=attack alertnessradius=15000 team=1 active=false>
241            <events>
242              <activity>
243                <DistanceTrigger position="-5000, 100, 100" distance=2000 target="Camera" stayactive=true />
244              </activity>
245            </events>
246          </WaypointPatrolController>
247        </controller>
248      </SpaceShip>
249    <?lua end ?>
250
251    <AmbientSound ambientSource="Earth.ogg" looping="true" playOnLoad="false">
252      <events>
253        <activity>
254          <DistanceTrigger position="2000,0,0" distance=500 target="Camera" />
255        </activity>
256      </events>
257    </AmbientSound>
258
259    <SpawnPoint position="5000,0,2000" spawnclass=SpaceShip pawndesign=spaceshipassff  team=0 />
260   
261  </Scene>
262</Level>
Note: See TracBrowser for help on using the repository browser.