Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/lastmanstanding2/data/levels/presentationPong.oxw @ 7752

Last change on this file since 7752 was 7680, checked in by dafrick, 14 years ago

Forgot to rename one level file.

  • Property svn:eol-style set to native
File size: 11.0 KB
Line 
1<?lua
2  include("HUDTemplates3.oxo")
3  include("stats.oxo")
4  include("pongHUD.oxo")
5  include("templates/lodInformation.oxt")
6?>
7
8<Template name=pongbatcameras defaults=0>
9  <PongBat>
10    <camerapositions>
11      <CameraPosition position="0,200,0" pitch=-90 absolute=true />
12      <CameraPosition position="0,50,160" drag=true mouselook=true />
13      <CameraPosition position="0,40,125" drag=true mouselook=true />
14      <CameraPosition position="0,30, 90" drag=true mouselook=true />
15    </camerapositions>
16  </PongBat>
17</Template>
18
19<Template name=pongbat>
20  <PongBat camerapositiontemplate=pongbatcameras>
21    <attached>
22      <Model position="0,0,3" mesh="cube.mesh" scale3D="14,2,2" />
23      <!--Model roll=180 mesh="pongbat.mesh" scale=0.045 /-->
24    </attached>
25  </PongBat>
26</Template>
27
28<Template name=pongball>
29  <PongBall>
30    <attached>
31      <Model mesh="sphere.mesh" scale=2 />
32      <!--Billboard scale=0.2 colour="1.0, 1.0, 0.5" material="Examples/Flare" /-->
33      <Backlight scale=0.2 colour="1.0, 1.0, 0.5" width=7 length=500 lifetime=0.3 elements=20 trailmaterial="Trail/backlighttrail" material="Examples/Flare" />
34      <Light type=point diffuse="1.0, 1.0, 0.5" specular="1.0, 1.0, 0.5" attenuation="1200, 1.0, 0.0035, 0.00005" />
35      <ParticleSpawner name=hiteffect position="0,0,0" source="Orxonox/sparks2" lifetime=0.01 autostart=0 mainstate=spawn />
36    </attached>
37    <eventlisteners>
38      <EventTarget target=hiteffect />
39    </eventlisteners>
40  </PongBall>
41</Template>
42
43
44<Level
45 name         = "Presentation"
46 description  = "A simple testlevel"
47 gametype     = Pong
48>
49  <templates>
50    <Template link=lodtemplate_default />
51  </templates>
52
53  <AmbientSound source="ambient/mainmenu.ogg" playOnLoad=true />
54
55  <Scene
56   ambientlight = "0.5, 0.5, 0.5"
57   skybox       = "Orxonox/skypanoramagen1"
58  >
59    <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" />
60
61    <?lua
62      for i = 1, 10, 1 do
63    ?>
64      <SpawnPoint position="<?lua print(math.random() * 1000 - 500) ?>,<?lua print(math.random() * 1000 - 500) ?>,<?lua print(math.random() * 1000 - 500) ?>" lookat="0,0,0" />
65    <?lua end ?>
66
67    <MovableEntity rotationrate=5 rotationaxis="0,0,1">
68      <attached>
69        <PongCenterpoint name=pongcenter dimension="200,120" balltemplate=pongball battemplate=pongbat ballspeed=200 ballaccfactor=1.0 batspeed=130 batlength=0.25>
70          <attached>
71            <Model position="0,0,60" mesh="cube.mesh" scale3D="105,1,1" />
72            <Model position="0,0,-60" mesh="cube.mesh" scale3D="105,1,1" />
73
74            <ParticleSpawner name=scoreeffect_right position="120,0, 45" source="Orxonox/sparks2" lifetime=0.1 autostart=0 />
75            <ParticleSpawner name=scoreeffect_right position="120,0, 30" source="Orxonox/BigExplosion1part2" lifetime=3.0 autostart=0 />
76            <ParticleSpawner name=scoreeffect_right position="120,0, 15" source="Orxonox/sparks2" lifetime=0.1 autostart=0 />
77            <ParticleSpawner name=scoreeffect_right position="120,0,  0" source="Orxonox/BigExplosion1part2" lifetime=0.1 autostart=0 />
78            <ParticleSpawner name=scoreeffect_right position="120,0,-15" source="Orxonox/sparks2" lifetime=0.1 autostart=0 />
79            <ParticleSpawner name=scoreeffect_right position="120,0,-30" source="Orxonox/BigExplosion1part2" lifetime=3.0 autostart=0 />
80            <ParticleSpawner name=scoreeffect_right position="120,0,-45" source="Orxonox/sparks2" lifetime=0.1 autostart=0 />
81
82            <ParticleSpawner name=scoreeffect_left position="-120,0, 45" source="Orxonox/sparks2" lifetime=0.1 autostart=0 />
83            <ParticleSpawner name=scoreeffect_left position="-120,0, 30" source="Orxonox/BigExplosion1part2" lifetime=3.0 autostart=0 />
84            <ParticleSpawner name=scoreeffect_left position="-120,0, 15" source="Orxonox/sparks2" lifetime=0.1 autostart=0 />
85            <ParticleSpawner name=scoreeffect_left position="-120,0,  0" source="Orxonox/BigExplosion1part2" lifetime=0.1 autostart=0 />
86            <ParticleSpawner name=scoreeffect_left position="-120,0,-15" source="Orxonox/sparks2" lifetime=0.1 autostart=0 />
87            <ParticleSpawner name=scoreeffect_left position="-120,0,-30" source="Orxonox/BigExplosion1part2" lifetime=3.0 autostart=0 />
88            <ParticleSpawner name=scoreeffect_left position="-120,0,-45" source="Orxonox/sparks2" lifetime=0.1 autostart=0 />
89
90            <WorldSound name="scoreSound" position="0,0,0" source="sounds/pong_score.wav" >
91              <events>
92                <play>
93                  <EventListener event=pongcenter />
94                </play>
95              </events>
96            </WorldSound>
97
98            <?lua
99              for i = 1, 15, 1 do
100            ?>
101              <ParticleSpawner name=scoreeffect_center position="<?lua print(math.random() * 200 - 100) ?>,0,<?lua print(math.random() * 120 - 60) ?>" source="Orxonox/sparks2" lifetime=0.02 autostart=0 startdelay=<?lua print(math.random() * 0.7) ?> />
102            <?lua end ?>
103
104          </attached>
105        </PongCenterpoint>
106      </attached>
107    </MovableEntity>
108
109    <EventDispatcher>
110      <targets>
111        <EventTarget target=scoreeffect_right />
112        <EventTarget target=scoreeffect_center />
113      </targets>
114      <events>
115        <spawn>
116          <EventFilter>
117            <names>
118              <EventName name=right />
119            </names>
120            <EventListener event=pongcenter />
121          </EventFilter>
122        </spawn>
123      </events>
124    </EventDispatcher>
125    <EventDispatcher>
126      <targets>
127        <EventTarget target=scoreeffect_left />
128        <EventTarget target=scoreeffect_center />
129      </targets>
130      <events>
131        <spawn>
132          <EventFilter>
133            <names>
134              <EventName name=left />
135            </names>
136            <EventListener event=pongcenter />
137          </EventFilter>
138        </spawn>
139      </events>
140    </EventDispatcher>
141
142    <?lua
143      dofile("includes/CuboidSpaceStation.lua")
144    ?>
145
146    <StaticEntity pitch=15>
147      <attached>
148        <MovableEntity rotationrate="-4.15786" rotationaxis="0,0,1">
149          <attached>
150            <StaticEntity position="-2500,0,0" yaw=90 pitch=90>
151              <attached>
152                <?lua
153                  createSpaceStationPar(0,2,1,2,1,4,1,50)
154                ?>
155              </attached>
156            </StaticEntity>
157          </attached>
158        </MovableEntity>
159      </attached>
160    </StaticEntity>
161
162    <StaticEntity position="0,1200,-200" yaw=50 pitch=60 roll=45>
163      <attached>
164        <Model scale=10 mesh="Carrier.mesh" />
165        <Model position="0,30,20" scale=10 mesh="pirate.mesh" roll="180" />
166        <Model position="-80,-30,20" scale=10 mesh="pirate.mesh" roll="180" />
167      </attached>
168    </StaticEntity>
169
170    <StaticEntity pitch=70>
171      <attached>
172        <MovableEntity rotationaxis="0,0,1" rotationrate=8.5974>
173          <attached>
174            <StaticEntity yaw=-90 pitch=0 roll=90 position="800,0,0">
175              <attached>
176                <Model position="0,0,0" scale=10 mesh="satellite.mesh" />
177                <MovableEntity position="-4,0,20" velocity="0,0,0" rotationaxis="0,0,1" rotationrate=50>
178                  <attached>
179                    <Model position="0,0,0" scale=10 mesh="satellitedish.mesh"/>
180                  </attached>
181                </MovableEntity>
182                <ParticleEmitter pitch=-135 roll=30 position="-14, 3.5,-2.5" source="Orxonox/thruster3" lifetime=2.0 loop=1 startdelay=3.0 />
183                <ParticleEmitter pitch=135 roll=30 position="-14, 3.5,-9" source="Orxonox/thruster3" lifetime=2.0 loop=1 startdelay=3.0 />
184                <ParticleEmitter pitch=-45 roll=30 position="-14,-3.5,-2.5" source="Orxonox/thruster3" lifetime=2.0 loop=1 startdelay=3.0 />
185                <ParticleEmitter pitch=45 roll=30 position="-14,-3.5,-9" source="Orxonox/thruster3" lifetime=2.0 loop=1 startdelay=3.0 />
186              </attached>
187            </StaticEntity>
188          </attached>
189        </MovableEntity>
190      </attached>
191    </StaticEntity>
192
193    <?lua
194      for i = 1, 10, 1 do
195    ?>
196      <MovableEntity position="<?lua print(math.random() * 600 - 300)?>, <?lua print(math.random() * 600 - 300) ?>, <?lua print(math.random() * 100 + 300) ?>" rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">
197        <attached>
198          <Model scale="<?lua print(math.random() * 10 + 5) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
199        </attached>
200      </MovableEntity>
201      <MovableEntity position="<?lua print(math.random() * 600 - 300)?>, <?lua print(math.random() * 600 - 300) ?>, <?lua print(math.random() * -100 - 300) ?>" rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">
202        <attached>
203          <Model scale="<?lua print(math.random() * 10 + 5) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
204        </attached>
205      </MovableEntity>
206
207      <MovableEntity position="<?lua print(math.random() * 600 - 300)?>, <?lua print(math.random() * 100 + 300) ?>, <?lua print(math.random() * 600 - 300) ?>" rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">
208        <attached>
209          <Model scale="<?lua print(math.random() * 10 + 5) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
210        </attached>
211      </MovableEntity>
212      <MovableEntity position="<?lua print(math.random() * 600 - 300)?>, <?lua print(math.random() * -100 - 300) ?>, <?lua print(math.random() * 600 - 300) ?>" rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">
213        <attached>
214          <Model scale="<?lua print(math.random() * 10 + 5) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
215        </attached>
216      </MovableEntity>
217
218      <MovableEntity position="<?lua print(math.random() * 100 + 300)?>, <?lua print(math.random() * 600 - 300) ?>, <?lua print(math.random() * 600 - 300) ?>" rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">
219        <attached>
220          <Model scale="<?lua print(math.random() * 10 + 5) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
221        </attached>
222      </MovableEntity>
223      <MovableEntity position="<?lua print(math.random() * -100 - 300)?>, <?lua print(math.random() * 600 - 300) ?>, <?lua print(math.random() * 600 - 300) ?>" rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">
224        <attached>
225          <Model scale="<?lua print(math.random() * 10 + 5) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
226        </attached>
227      </MovableEntity>
228    <?lua end ?>
229
230  </Scene>
231</Level>
Note: See TracBrowser for help on using the repository browser.