Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/newlevel2012/data/levels/towerDefense.oxw @ 9167

Last change on this file since 9167 was 9167, checked in by weigeltm, 12 years ago

small refactor (ridiculously small (really))

File size: 4.2 KB
Line 
1<!-- TODO: Update the level's image-->
2
3<!-- See TowerDefenseReadme.txt for Information on this file -->
4
5<LevelInfo
6 name = "Tower Defense"
7 description = "Defend your Spacestation from incoming waves."
8 tags = "gametype"
9 screenshot = "emptylevel.png"
10/>
11
12<?lua
13  include("stats.oxo")
14  include("HUDTemplates3.oxo")
15  include("templates/lodInformation.oxt")
16?>
17
18<?lua
19  include("templates/spaceshipAssff.oxt")
20  include("templates/spaceshipPirate.oxt")
21  include("templates/tower.oxt")
22?>
23
24<!-- Specify the position of the camera -->
25<Template name=centerpointmarkcamera defaults=0>
26  <Pawn>
27    <camerapositions>
28      <CameraPosition position="0,0,2000"/>
29    </camerapositions>
30  </Pawn>
31</Template>
32
33<!-- Loads a mesh to mark the center-->
34<Template name=centerpointmark>
35  <Pawn camerapositiontemplate=centerpointmarkcamera>
36    <attached>
37      <Model position="0,0,0" mesh="cylinder.mesh" scale3D="1,1,1" /> <!-- the camera is attached to this -->
38    </attached>
39  </Pawn>
40</Template>
41
42
43<!-- Template for a tower       EDIT: new towertemplate is included with "templates/tower" -->
44<!--Template name=towertemplate>
45  <Tower>
46    <attached>
47      <Model position="0,0,0" scale=0.25 mesh="Tower_ME.mesh" />
48    </attached>
49  </Tower>
50</Template-->
51
52<Level gametype = "TowerDefense">
53  <templates>
54    <Template link=lodtemplate_default />
55  </templates>
56 
57  <?lua include("includes/notifications.oxi") ?>
58
59  <Scene
60    ambientlight = "0.8, 0.8, 0.8"
61    skybox       = "Orxonox/Starbox"
62  >
63 
64        <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"/>
65   
66        <!-- Spawns the camera, attached to a crate -->
67        <SpawnPoint team=0 position="0,0,0" spawnclass=Pawn pawndesign=centerpointmark />
68        <!--TeamSpawnPoint team=1 position="-7,7,4" direction="-1,0,0" roll=90 yaw=0 spawnclass=SpaceShip pawndesign=spaceshipassff /-->
69       
70        <!--SpawnPoint team=1 position="0,0,10" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff  /-->
71        <!--SpawnPoint team=0 position="0,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff /-->
72       
73        <SpaceShip position="-700,-500, 100" lookat="0,0,0" scale=10>
74      <templates>
75        <Template link=spaceshipassff />
76      </templates>
77      <controller>
78        <WaypointController accuracy=40>
79          <waypoints>
80                          <!-- 1,3 10,3 10,11, 13,11 -->
81            <Model mesh="cube.mesh" scale=1 position="-700,-500, 100" />
82            <Model mesh="cube.mesh" scale=1 position=" 200,-500, 100" />
83            <Model mesh="cube.mesh" scale=1 position=" 200, 300, 100" />
84            <Model mesh="cube.mesh" scale=1 position=" 500, 300, 100" />
85          </waypoints>
86        </WaypointController>
87      </controller>
88    </SpaceShip>
89   
90        <!-- PlayField -->
91        <TowerDefenseCenterpoint
92        name=towerdefensecenter
93        width=16
94        height=16
95        tileScale=100
96        towerTemplate=tower
97        position="0,0,0"
98        direction="0,0,0"
99        collistionType=static
100        mass=100000>
101                 
102                 <attached>
103                        <Model position="-50,-50,0" mesh="Playfield_ME.mesh" scale=80 />
104            <!--Model position="0,0,0" mesh="crate.mesh" scale3D="3,3,3" /--> <!-- Only temporary needed to help align the collisionshape -->
105                        <!-- This was used to mark the playfield, let's let it be here for now -->
106                        <!--Model position="-8,8,0" mesh="crate.mesh" scale3D="0.3,0.3,0.3" /-->
107                        <!--Model position="-8,-8,0" mesh="crate.mesh" scale3D="0.3,0.3,0.3" /-->
108                        <!--Model position="8,-8,0" mesh="crate.mesh" scale3D="0.3,0.3,0.3" /-->
109                        <!--Model position="8,8,0" mesh="crate.mesh" scale3D="0.3,0.3,0.3" /-->
110        </attached>
111        <collisionShapes> <!-- The collisionshape forbids other worldentities that have a collisionShape to fly through it.
112       
113                               TODO: Find correct size for the collisionshape; since a collisionShape is invisible
114                               I added the crate wich currently has the same dimensions as the collisionshape.
115                               You have to adjust the crate's scale3D as well as the collisionshape's halfExtens to
116                               find the proper shape. -->
117           <BoxCollisionShape position="0,0,0" halfExtents="15,15,15" />
118        </collisionShapes>
119    </TowerDefenseCenterpoint>
120
121  </Scene>
122</Level>
123
Note: See TracBrowser for help on using the repository browser.