Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/archive/tutorialHS09/data/levels/presentation_pong.oxw @ 9630

Last change on this file since 9630 was 5695, checked in by rgrieder, 15 years ago

Merged resource2 branch back to trunk.

IMPORTANT NOTE:
Upon this merge you need to specifically call your data directory "data_extern" when checking it out (when you don't provide a name, it will be just called 'trunk').
The new CMake variable is EXTERNAL_DATA_DIRECTORY. DATA_DIRECTORY now points to the one the source part of the repository.
UPDATE YOUR DATA DIRECTORY AS WELL!!!

  • Property svn:eol-style set to native
File size: 8.6 KB
Line 
1<?lua
2  include("hudtemplates3.oxo")
3  include("stats.oxo")
4  include("ponghud.oxo")
5?>
6
7<Template name=pongbatcameras defaults=0>
8  <PongBat>
9    <camerapositions>
10      <CameraPosition position="0,200,0" pitch=-90 absolute=true />
11      <CameraPosition position="0,50,160" drag=true mouselook=true />
12      <CameraPosition position="0,40,125" drag=true mouselook=true />
13      <CameraPosition position="0,30, 90" drag=true mouselook=true />
14    </camerapositions>
15  </PongBat>
16</Template>
17
18<Template name=pongbat>
19  <PongBat camerapositiontemplate=pongbatcameras>
20    <attached>
21      <Model position="0,0,3" mesh="cube.mesh" scale3D="14,2,2" />
22      <!--Model roll=180 mesh="pongbat.mesh" scale=0.045 /-->
23    </attached>
24  </PongBat>
25</Template>
26
27<Template name=pongball>
28  <PongBall>
29    <attached>
30      <Model mesh="sphere.mesh" scale=2 />
31      <!--Billboard scale=0.2 colour="1.0, 1.0, 0.5" material="Examples/Flare" /-->
32      <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" />
33      <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" />
34    </attached>
35  </PongBall>
36</Template>
37
38
39<Level
40 name         = "Presentation"
41 description  = "A simple testlevel"
42 gametype     = Pong
43>
44  <Scene
45   ambientlight = "0.5, 0.5, 0.5"
46   skybox       = "Orxonox/skypanoramagen1"
47  >
48    <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" />
49
50<?lua
51for i = 1, 10, 1
52do ?>
53    <SpawnPoint position="<?lua print(math.random() * 1000 - 500) ?>,<?lua print(math.random() * 1000 - 500) ?>,<?lua print(math.random() * 1000 - 500) ?>" lookat="0,0,0" />
54<?lua
55end
56?>
57
58  <MovableEntity rotationrate=5 rotationaxis="0,0,1">
59    <attached>
60      <PongCenterpoint name=pongcenter dimension="200,120" balltemplate=pongball battemplate=pongbat ballspeed=200 batspeed=130 batlength=0.25>
61        <attached>
62          <Model position="0,0,60" mesh="cube.mesh" scale3D="105,1,1" />
63          <Model position="0,0,-60" mesh="cube.mesh" scale3D="105,1,1" />
64<!--
65          <ParticleSpawner name=scoreeffect_R position=" 100,0, 60" source="Orxonox/BigExplosion1part1" lifetime=3.0 autostart=0 />
66          <ParticleSpawner name=scoreeffect position="  50,0, 60" source="Orxonox/BigExplosion1part1" lifetime=3.0 autostart=0 />
67          <ParticleSpawner name=scoreeffect position="   0,0, 60" source="Orxonox/BigExplosion1part1" lifetime=3.0 autostart=0 />
68          <ParticleSpawner name=scoreeffect position=" -50,0, 60" source="Orxonox/BigExplosion1part1" lifetime=3.0 autostart=0 />
69          <ParticleSpawner name=scoreeffect_L position="-100,0, 60" source="Orxonox/BigExplosion1part1" lifetime=3.0 autostart=0 />
70          <ParticleSpawner name=scoreeffect_R position=" 100,0,-60" source="Orxonox/BigExplosion1part1" lifetime=3.0 autostart=0 />
71          <ParticleSpawner name=scoreeffect position="  50,0,-60" source="Orxonox/BigExplosion1part1" lifetime=3.0 autostart=0 />
72          <ParticleSpawner name=scoreeffect position="   0,0,-60" source="Orxonox/BigExplosion1part1" lifetime=3.0 autostart=0 />
73          <ParticleSpawner name=scoreeffect position=" -50,0,-60" source="Orxonox/BigExplosion1part1" lifetime=3.0 autostart=0 />
74          <ParticleSpawner name=scoreeffect_L position="-100,0,-60" source="Orxonox/BigExplosion1part1" lifetime=3.0 autostart=0 />
75-->
76        </attached>
77      </PongCenterpoint>
78    </attached>
79  </MovableEntity>
80
81  <EventDispatcher>
82    <targets>
83      <EventTarget name=scoreeffect />
84    </targets>
85    <events>
86      <spawn>
87        <EventListener event=pongcenter />
88      </spawn>
89    </events>
90  </EventDispatcher>
91
92  <?lua
93    dofile("includes/CuboidSpaceStation.lua")
94  ?>
95
96  <StaticEntity pitch=15>
97    <attached>
98      <MovableEntity rotationrate="-4.15786" rotationaxis="0,0,1">
99        <attached>
100          <StaticEntity position="-2500,0,0" yaw=90 pitch=90>
101            <attached>
102              <?lua
103                createSpaceStationPar(0,2,1,2,1,4,1,50)
104              ?>
105            </attached>
106          </StaticEntity>
107        </attached>
108      </MovableEntity>
109    </attached>
110  </StaticEntity>
111
112  <StaticEntity position="0,1200,-200" yaw=50 pitch=60 roll=45>
113    <attached>
114      <Model scale=10 mesh="Carrier.mesh" />
115      <Model position="0,30,20" scale=10 mesh="pirate.mesh" roll="180" />
116      <Model position="-80,-30,20" scale=10 mesh="pirate.mesh" roll="180" />
117    </attached>
118  </StaticEntity>
119
120  <StaticEntity pitch=70>
121    <attached>
122      <MovableEntity rotationaxis="0,0,1" rotationrate=8.5974>
123        <attached>
124          <StaticEntity yaw=-90 pitch=0 roll=90 position="800,0,0">
125            <attached>
126              <Model position="0,0,0" scale=10 mesh="satellite.mesh" />
127              <MovableEntity position="-4,0,20" velocity="0,0,0" rotationaxis="0,0,1" rotationrate=50>
128                <attached>
129                  <Model position="0,0,0" scale=10 mesh="satellitedish.mesh"/>
130                </attached>
131              </MovableEntity>
132              <ParticleEmitter pitch=-135 roll=30 position="-14, 3.5,-2.5" source="Orxonox/thruster3" lifetime=2.0 loop=1 startdelay=3.0 />
133              <ParticleEmitter pitch=135 roll=30 position="-14, 3.5,-9" source="Orxonox/thruster3" lifetime=2.0 loop=1 startdelay=3.0 />
134              <ParticleEmitter pitch=-45 roll=30 position="-14,-3.5,-2.5" source="Orxonox/thruster3" lifetime=2.0 loop=1 startdelay=3.0 />
135              <ParticleEmitter pitch=45 roll=30 position="-14,-3.5,-9" source="Orxonox/thruster3" lifetime=2.0 loop=1 startdelay=3.0 />
136            </attached>
137          </StaticEntity>
138        </attached>
139      </MovableEntity>
140    </attached>
141  </StaticEntity>
142
143<?lua
144for i = 1, 10, 1
145do ?>
146  <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) ?>">
147    <attached>
148      <Model scale="<?lua print(math.random() * 10 + 5) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
149    </attached>
150  </MovableEntity>
151  <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) ?>">
152    <attached>
153      <Model scale="<?lua print(math.random() * 10 + 5) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
154    </attached>
155  </MovableEntity>
156
157  <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) ?>">
158    <attached>
159      <Model scale="<?lua print(math.random() * 10 + 5) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
160    </attached>
161  </MovableEntity>
162  <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) ?>">
163    <attached>
164      <Model scale="<?lua print(math.random() * 10 + 5) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
165    </attached>
166  </MovableEntity>
167
168  <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) ?>">
169    <attached>
170      <Model scale="<?lua print(math.random() * 10 + 5) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
171    </attached>
172  </MovableEntity>
173  <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) ?>">
174    <attached>
175      <Model scale="<?lua print(math.random() * 10 + 5) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />
176    </attached>
177  </MovableEntity>
178<?lua
179end
180?>
181
182  </Scene>
183</Level>
Note: See TracBrowser for help on using the repository browser.