Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/keckslevelHS14/data/levels/Spacerace2.oxw @ 10181

Last change on this file since 10181 was 9939, checked in by jo, 11 years ago

presentationHS13 branch merged into trunk

  • Property svn:eol-style set to native
File size: 9.2 KB
Line 
1<LevelInfo
2 name = "Spacerace 2"
3 description = "New Spacerace with Multiple Paths."
4 tags = "gametype"
5 screenshot = "spacerace2.png"
6/>
7
8<?lua
9  include("stats.oxo")
10  include("HUDTemplates3.oxo")
11  include("templates/lodInformation.oxt")
12
13  include("templates/spaceshipAssff.oxt")
14
15?>
16
17
18<?lua
19  include("templates/spaceshipAssff2.oxt")
20  include("templates/spaceshipPirate.oxt")
21?>
22
23<Level
24 name         = "Spacerace2"
25 description  = "Just a few tests"
26gametype = SpaceRace
27>
28  <templates>
29    <Template link=lodtemplate_default />
30  </templates>
31  <?lua include("includes/notifications.oxi") ?>
32
33  <Scene
34    ambientlight = "0.8, 0.8, 0.8"
35    skybox       = "Orxonox/Starbox"
36  >
37
38    <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"/>
39
40
41    <SpaceRaceManager>
42        <checkpoints>
43            <RaceCheckPoint name="checkpoint1" position="0,-2000,1000" direction="0,-1,1" collisionType="static" scale="1" distance="40" checkpointindex="0" islast="false" nextcheckpoints="1,2,-1">
44                <attached>
45                    <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
46                </attached>
47                <collisionShapes>
48                    <BoxCollisionShape position="0,0,55"      halfExtents="55, 10, 10" />
49                    <BoxCollisionShape position="0,0,-55"     halfExtents="55, 10, 10" />
50                    <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
51                    <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
52                </collisionShapes>
53            </RaceCheckPoint>
54
55            <RaceCheckPoint name="checkpoint2" position="0,2100,2300" direction="0,-1,1" collisionType="static" scale="1" distance="40" checkpointindex="1" islast="false" nextcheckpoints="3,-1,-1">
56                <attached>
57                    <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
58                </attached>
59                <collisionShapes>
60                    <BoxCollisionShape position="0,0,55"      halfExtents="55, 10, 10" />
61                    <BoxCollisionShape position="0,0,-55"     halfExtents="55, 10, 10" />
62                    <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
63                    <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
64                </collisionShapes>
65            </RaceCheckPoint>
66
67            <RaceCheckPoint name="checkpoint3" position="0,700,2700" direction="0,-1,1" collisionType="static" scale="1" distance="40" checkpointindex="2" islast="false" nextcheckpoints="3,-1,-1">
68                <attached>
69                    <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
70                </attached>
71                <collisionShapes>
72                    <BoxCollisionShape position="0,0,55"      halfExtents="55, 10, 10" />
73                    <BoxCollisionShape position="0,0,-55"     halfExtents="55, 10, 10" />
74                    <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
75                    <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
76                </collisionShapes>
77            </RaceCheckPoint>
78
79            <RaceCheckPoint name="checkpoint4" position="0,-400,300" direction="0,-1,1" collisionType="static" scale="1" distance="40" checkpointindex="3" islast="true">
80                <attached>
81                    <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
82                </attached>
83                <collisionShapes>
84                    <BoxCollisionShape position="0,0,55"      halfExtents="55, 10, 10" />
85                    <BoxCollisionShape position="0,0,-55"     halfExtents="55, 10, 10" />
86                    <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
87                    <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
88                </collisionShapes>
89            </RaceCheckPoint>
90        </checkpoints>
91    </SpaceRaceManager>
92
93
94    <SpaceShip position="0,0,200" lookat="0,0,0">
95      <templates>
96        <Template link=spaceshipassff />
97      </templates>
98      <controller>
99        <WaypointPatrolController alertnessradius=0 team=10>
100          <waypoints>
101            <Model mesh="cube.mesh" scale=0 position="0,-2000,1000" />
102            <Model mesh="cube.mesh" scale=0 position="0,2100,2300" />
103            <Model mesh="cube.mesh" scale=0 position="0,-400,300" />
104          </waypoints>
105        </WaypointPatrolController>
106      </controller>
107    </SpaceShip>
108
109    <SpawnPoint team=0 position="-200,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff />
110       
111        <!-- SOUNDS & MUSIC -->
112    <WorldSound name="scoreSound" position="-200,0,0" source="sounds/ReadyGo.ogg" >
113      <events>
114        <play>
115          <EventListener event="start" />
116        </play>
117      </events>
118    </WorldSound>
119    <DistanceTrigger name="start" position="-200,0,0"  target="Pawn" distance=100 stayActive="true" delay=0.5 />
120   
121    <WorldAmbientSound source="Ganymede.ogg" looping="true" playOnLoad="true" />
122
123    <!-- ------------------Planet----------------- -->
124    <Planet position="0,0,0" scale=300 pitch=-90 mesh="iceplanet.mesh" atmosphere="atmosphere1" rotationaxis="8,1,0" rotationrate="1" atmospheresize=224.0f imagesize=1024.0f />
125    <StaticEntity position="0,0,0" collisionType=static>
126        <collisionShapes>
127            <SphereCollisionShape radius="399" />
128        </collisionShapes>
129    </StaticEntity>
130
131    <!-- ---------------asteroid ellipse----------------- -->
132    <?lua
133    max = 20
134    for i = 0, max, 1
135    do
136    y = math.sin(i/max*6)*2000
137    z = math.cos(i/max*6)*2500
138    x = 0
139    ?>
140    <?lua
141    for k = 1, 15, 1
142    do
143    j = math.random()
144    ?>
145
146    <MovableEntity
147      position = "<?lua print(x + math.random() * 500) ?>,<?lua print(y + math.random() * 500) ?>,<?lua print(z + math.random() * 1000) ?>"
148      collisionType = "dynamic"
149      linearDamping = "0.5"
150      angularDamping = "0.01"
151      collisiondamage = "0.01"
152      enablecollisiondamage = "true"
153      scale="<?lua print(j * 5) ?>" >
154      <attached>
155        <Model position="0,0,0" scale="<?lua print(j * 10) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh">
156      <?lua if k == 5 then ?><attached><!-- ---------asteroid fog----- -->
157            <ParticleEmitter position="0,0,0" source="Orxonox/Steam" />
158          </attached> <?lua end ?>
159        </Model>
160      </attached>
161      <collisionShapes>
162        <SphereCollisionShape radius="<?lua print(j * 80) ?>" />
163      </collisionShapes>
164    </MovableEntity>
165    <?lua
166    end
167    ?>
168    <?lua end ?>
169
170    <!-- ---------------ForceFields----------------- -->
171    <ForceField position="0,-700,2700" direction="0,1,0" diameter=500 velocity=2000 length=600 />
172        <MovableEntity position="0,-400,2700">
173            <attached>
174                <Billboard position="0,0,0" material="Flares/ringflare2" colour="0.5,0,0" scale=2/>
175                <?lua for i=0,15,1 do ?>
176                    <Billboard position="-200,<?lua print(i*40) ?>,0" material="Examples/Flare" colour="0.5,0,0" scale=1/>
177                    <Billboard position="200,<?lua print(i*40) ?>,0" material="Examples/Flare" colour="0.5,0,0" scale=1/>
178                <?lua end ?>
179                </attached>
180        </MovableEntity>
181
182     <ForceField position="0,2500,2000" direction="0,0,-1" diameter=250 velocity=2000 length=600 />
183        <MovableEntity position="0,2500,2000">
184            <attached>
185                <Billboard position="0,0,0" material="Flares/ringflare2" colour="0.5,0,0" scale=2/>
186                <?lua for i=0,15,1 do ?>
187                    <Billboard position="-100,0,-<?lua print(i*40) ?>" material="Examples/Flare" colour="0.5,0,0" scale=1/>
188                    <Billboard position="100,0,-<?lua print(i*40) ?>" material="Examples/Flare" colour="0.5,0,0" scale=1/>
189                <?lua end ?>
190                </attached>
191        </MovableEntity>
192
193    <ForceField position="0,1300,-800" direction="0,-1,-1" diameter=250 velocity=2000 length=800 />
194        <MovableEntity position="0,1300,-800">
195            <attached>
196                <Billboard position="0,0,0" material="Flares/ringflare2" colour="0.5,0,0" scale=2/>
197                <?lua for i=0,20,1 do ?>
198                    <Billboard position="-100,<?lua print(-i*40*0.7071) ?>,<?lua print(-i*40*0.7071) ?>" material="Examples/Flare" colour="0.5,0,0" scale=1/>
199                    <Billboard position="100,<?lua print(-i*40*0.7071) ?>,<?lua print(-i*40*0.7071) ?>" material="Examples/Flare" colour="0.5,0,0" scale=1/>
200                <?lua end ?>
201                </attached>
202        </MovableEntity>
203
204    <ForceField position="0,-1400,-700" direction="0,-1,1" diameter=250 velocity=2000 length=600 />
205        <MovableEntity position="0,-1400,-700">
206            <attached>
207                <Billboard position="0,0,0" material="Flares/ringflare2" colour="0.5,0,0" scale=2/>
208                <?lua for i=0,15,1 do ?>
209                    <Billboard position="-100,<?lua print(-i*40*0.7071) ?>,<?lua print(i*40*0.7071) ?>" material="Examples/Flare" colour="0.5,0,0" scale=1/>
210                    <Billboard position="100,<?lua print(-i*40*0.7071) ?>,<?lua print(i*40*0.7071) ?>" material="Examples/Flare" colour="0.5,0,0" scale=1/>
211                <?lua end ?>
212                </attached>
213        </MovableEntity>
214
215
216
217  </Scene>
218</Level>
219
Note: See TracBrowser for help on using the repository browser.