Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

added some "ghost ships" and a destroyer

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