Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/presentation2/data/levels/presentationHS09b.oxw @ 6358

Last change on this file since 6358 was 6358, checked in by decapitb, 14 years ago

a rocket near the ghost ships triggers an attack (obviously they feel threatened)

File size: 9.1 KB
RevLine 
[6257]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")
[6305]9  include("templates/spaceship_ghost.oxt")
10  include("templates/spaceship_HXY.oxt")
[6342]11  include("templates/spaceship_Transporter.oxt")
[6345]12  include("templates/spaceship_HXY_SL.oxt")
13  include("templates/spaceship_Transporter_SL.oxt")
[6257]14?>
15
16<Level
17 name         = "Sample"
18 description  = "Just a few tests"
[6345]19 gametype     = TeamDeathmatch
[6257]20>
21  <Scene
22    ambientlight = "0.8, 0.8, 0.8"
23    skybox       = "Orxonox/Starbox"
24  >
25
[6358]26
[6345]27<AmbientSound ambientSource="Mars.ogg" loop="true" play="true" />
[6257]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" />
[6347]30<?lua
[6358]31   for i = 1, 50, 1
[6257]32   do
[6345]33   x = math.random() * 2000  + 4000
34   y = math.random() * 4000 - 2000
35   z = math.random() * 2000 - 1000
36   s = math.random() * 100
[6257]37   ?>
[6358]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) ?>">
[6257]40      <attached>
[6347]41        <Model position="0,0,0" scale=<?lua print(s) ?> mesh="asteroid_UV.mesh" />
[6257]42      </attached>
[6305]43        <collisionShapes>
[6347]44                <SphereCollisionShape radius="<?lua print(s*0.9) ?>" />
[6305]45        </collisionShapes>
[6257]46    </MovableEntity>
[6347]47     <ParticleSpawner position="<?lua print(x) ?>,<?lua print(y) ?>,<?lua print(z) ?>" source="Orxonox/Steam" lifetime=3.0 loop=1 />
[6358]48<?lua
[6257]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
[6358]58for i = 1, 100, 1
[6257]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?>
[6358]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) ?>">
[6257]67      <attached>
68        <Model position="0,0,0" scale="<?lua print(sizes[e]) ?>" mesh="<?lua print( elements[e]) ?>" />
69      </attached>
70    </MovableEntity>
[6358]71        <?lua
[6257]72        end
73        ?>
[6305]74<?lua
[6358]75for i = 1,25, 1
[6305]76do
77?>
[6345]78    <SpaceShip position="5000,0,<?lua print(i*50 - 150) ?>" >
[6305]79      <templates>
[6345]80        <Template link=spaceshipHXYSL />
[6305]81      </templates>
82      <controller>
[6345]83        <WaypointPatrolController alertnessradius=1000 team=0 active=true>
[6305]84          <waypoints>
[6345]85            <StaticEntity position="5000,<?lua print(math.random()*50)?> ,<?lua print(i*50 -150) ?>" />
[6305]86          </waypoints>
87        </WaypointPatrolController>
88      </controller>
89    </SpaceShip>
[6358]90<?lua
[6305]91end
92?>
[6345]93<SpaceShip position="5000,100,100" >
[6342]94      <templates>
[6345]95        <Template link=spaceshipTransporterSL />
[6342]96      </templates>
97      <controller>
[6345]98        <WaypointPatrolController name=pirate  target=pirate alertnessradius=1000 team=0 active=false>
[6342]99          <waypoints>
[6345]100            <StaticEntity position="5000,100,1100" />
[6342]101          </waypoints>
102        </WaypointPatrolController>
103      </controller>
104</SpaceShip>
[6345]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
[6347]190   <?lua
[6358]191   for i = 1, 50, 1
[6347]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   ?>
[6358]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) ?>">
[6347]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 />
[6358]208<?lua
[6347]209end
210?>
[6358]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
[6345]234<?lua
[6358]235for i = 1,25, 1
[6345]236do
237?>
[6358]238<SpaceShip position="<?lua print(-(math.random()*500 + 4500)) ?>,<?lua print(-(math.random()*500 -250)) ?>,<?lua print(i*50 - 150) ?>" >
[6345]239      <templates>
[6347]240        <Template link=spaceshipghost />
[6345]241      </templates>
242      <controller>
[6358]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
[6345]252      </controller>
253    </SpaceShip>
[6358]254<?lua
[6345]255end
256?>
257
258
[6358]259
[6342]260<AmbientSound ambientSource="Earth.ogg" loop="true" play="false">
[6338]261       <events>
262          <activity>
263             <DistanceTrigger position="2000,0,0" distance=500 target="Camera" />
264          </activity>
265       </events>
266    </AmbientSound>
[6257]267
[6345]268    <SpawnPoint position="0,0,5000" spawnclass=SpaceShip pawndesign=spaceshipassff  team=0/>
[6257]269  </Scene>
270</Level>
Note: See TracBrowser for help on using the repository browser.