Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/ois_update/data/levels/presentationHS09b.oxw @ 7771

Last change on this file since 7771 was 7163, checked in by dafrick, 14 years ago

Merged presentation3 branch into trunk.

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