Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/archive/map/data/levels/presentationHS09b.oxw @ 10850

Last change on this file since 10850 was 6417, checked in by rgrieder, 15 years ago

Merged presentation2 branch back to trunk.
Major new features:

  • Actual GUI with settings, etc.
  • Improved space ship steering (human interaction)
  • Rocket fire and more particle effects
  • Advanced sound framework
  • Property svn:eol-style set to native
File size: 9.0 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  include("templates/spaceship_Transporter.oxt")
12  include("templates/spaceship_HXY_SL.oxt")
13  include("templates/spaceship_Transporter_SL.oxt")
14?>
15
16<Level
17 name         = "Sample"
18 description  = "Just a few tests"
19 gametype     = TeamDeathmatch
20>
21  <Scene
22    ambientlight = "0.8, 0.8, 0.8"
23    skybox       = "Orxonox/Starbox"
24  >
25
26
27<AmbientSound ambientSource="Mars.ogg" looping="true" playOnLoad="true" />
28
29   <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" />
30<?lua
31   for i = 1, 50, 1
32   do
33   x = math.random() * 2000  + 4000
34   y = math.random() * 4000 - 2000
35   z = math.random() * 2000 - 1000
36   s = math.random() * 100
37   ?>
38
39    <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) ?>">
40      <attached>
41        <Model position="0,0,0" scale=<?lua print(s) ?> mesh="asteroid_UV.mesh" />
42      </attached>
43      <collisionShapes>
44        <SphereCollisionShape radius="<?lua print(s*0.9) ?>" />
45      </collisionShapes>
46    </MovableEntity>
47     <ParticleSpawner position="<?lua print(x) ?>,<?lua print(y) ?>,<?lua print(z) ?>" source="Orxonox/Steam" lifetime=3.0 loop=1 />
48<?lua
49end
50?>
51
52<?lua
53elements = {"BodyDebris1.mesh", "CockpitDebris.mesh", "LightningGun.mesh", "WingDebris1.mesh", "WingDebris2.mesh", "satellitedish.mesh", "Thruster.mesh"}
54sizes = {4, 4, 4, 4, 4, 10, 20}
55elements.length = function()
56    return table.getn(elements)
57end
58for i = 1, 100, 1
59do
60x = math.random() * 750 - 4500
61y = math.random() * 1000 + 2000
62z = math.random() * 500 + 1000
63e = math.floor(math.random()*elements.length()+1)
64?>
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
72end
73?>
74<?lua
75for i = 1,12, 1
76do
77?>
78    <SpaceShip position="<?lua print(math.random()*500 + 4500) ?>,<?lua print(-(math.random()*500 -250)) ?>,<?lua print(i*50 - 150) ?>" >
79      <templates>
80        <Template link=spaceshipHXYSL />
81      </templates>
82      <controller>
83        <WaypointPatrolController alertnessradius=4000 team=0 active=true>
84          <waypoints>
85            <StaticEntity position="5000,<?lua print(math.random()*50)?> ,<?lua print(i*50 -150) ?>" />
86          </waypoints>
87        </WaypointPatrolController>
88      </controller>
89    </SpaceShip>
90<?lua
91end
92?>
93<SpaceShip position="5000,100,100" >
94      <templates>
95        <Template link=spaceshipTransporterSL />
96      </templates>
97      <controller>
98        <WaypointPatrolController name=pirate  target=pirate alertnessradius=1000 team=0 active=false>
99          <waypoints>
100            <StaticEntity position="5000,100,1100" />
101          </waypoints>
102        </WaypointPatrolController>
103      </controller>
104</SpaceShip>
105    <Destroyer
106        position          = "-5000,100 ,100"
107        collisionType     = dynamic
108        mass              = 100000
109        angularDamping    = 0.9999999
110        health            = 1000
111        maxhealth         = 1000
112        initialhealth     = 1000
113    >
114        <controller>
115          <WaypointPatrolController team=1 />
116        </controller>
117        <attached>
118            <Model mesh="Carrier.mesh" scale="5" />
119            <Backlight
120                mainstate=activity
121                active=false
122                scale=0.4
123                name=bltest
124                position=" 7.6, 0, 6"
125                colour="0.2, 0.65, 1.0, 1.0"
126                width=15
127                length=1500
128                lifetime=2
129                elements=50
130                trailmaterial="Trail/backlighttrail"
131                turnontime=1
132                turnofftime=1
133                material="Flares/ThrusterFlare1"
134            />
135            <?lua for i=0,8,1 do ?>
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        </attached>
179        <collisionShapes>
180            <BoxCollisionShape position="70,0,-25"      halfExtents="150, 50, 25" />
181            <BoxCollisionShape position="95,75,-16"     halfExtents="70, 10, 12" />
182            <BoxCollisionShape position="95,-75,-16"    halfExtents="70, 10, 12" />
183            <BoxCollisionShape position="77,47,30"      halfExtents="110, 2, 30" />
184            <BoxCollisionShape position="77,-47,30"     halfExtents="110, 2, 30" />
185            <BoxCollisionShape position="77,0,50"       halfExtents="110, 45, 6" />
186            <BoxCollisionShape position="167,0,70"      halfExtents="17, 20, 20" />
187        </collisionShapes>
188    </Destroyer>
189
190   <?lua
191   for i = 1, 50, 1
192   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
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
209end
210?>
211<!--<EventDispatcher>
212      <targets>
213        <EventTarget target=attack />
214        <EventTarget target=wait />
215      </targets>
216      <events>
217        <activity>
218          <DistanceTrigger position="0, 0, 4500" distance=100 target="SpaceShip" stayactive=true />
219        </activity>
220      </events>
221</EventDispatcher>
222
223<EventDispatcher>
224      <targets>
225        <EventTarget target=wait />
226      </targets>
227      <events>
228        <activity>
229          <DistanceTrigger position="0, 0, 4500" distance=100 target="SpaceShip" stayactive=false />
230        </activity>
231      </events>
232</EventDispatcher>-->
233
234<?lua
235for i = 1,25, 1
236do
237?>
238<SpaceShip position="<?lua print(-(math.random()*500 + 4500)) ?>,<?lua print(-(math.random()*500 -250)) ?>,<?lua print(i*50 - 150) ?>" >
239      <templates>
240        <Template link=spaceshipghost />
241      </templates>
242      <controller>
243
244          <WaypointPatrolController name=attack alertnessradius=15000 team=1 active=false>
245          <events>
246           <activity>
247             <DistanceTrigger position="-5000, 100, 100" distance=2000 target="Camera" stayactive=true />
248           </activity>
249          </events>
250          </WaypointPatrolController>
251
252      </controller>
253    </SpaceShip>
254<?lua
255end
256?>
257
258
259
260    <AmbientSound ambientSource="Earth.ogg" looping="true" playOnLoad="false">
261      <events>
262        <activity>
263          <DistanceTrigger position="2000,0,0" distance=500 target="Camera" />
264        </activity>
265      </events>
266    </AmbientSound>
267
268    <SpawnPoint position="5000,0,2000" spawnclass=SpaceShip pawndesign=spaceshipassff  team=0/>
269  </Scene>
270</Level>
Note: See TracBrowser for help on using the repository browser.