Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 9133 was 9133, checked in by mentzerf, 12 years ago

Fixed oxw file:

  • Camera is now focus on 0,0,0 and locked on a crate.mesh, not on the playfield.mesh. This allows us to insert the playfield.mesh after the player has pressed the mouse button. Later the crate can me made invisible

+ Playfield.mesh is inserted as StaticEntity

  • Commented out the waypoints for now
  • TowerDefense is not using SpawnPoint any more, as it is not needed
File size: 3.1 KB
Line 
1<!-- TODO: Update the level's image-->
2<LevelInfo
3 name = "Tower Defense"
4 description = "Defend your Spacestation from incoming waves."
5 tags = "gametype"
6 screenshot = "emptylevel.png"
7/>
8
9<?lua
10  include("stats.oxo")
11  include("HUDTemplates3.oxo")
12  include("templates/lodInformation.oxt")
13?>
14
15<?lua
16  include("templates/spaceshipAssff.oxt")
17  include("templates/spaceshipPirate.oxt")
18?>
19
20<!--  Hallo erstmal.
21Ich habe das Grundgerüst des Levels mal zum Laufen gebracht.
22Bei mir hat es das Playfield_ME.mesh allerdings nicht angezeigt; deswegen habe ich mit dem crate.mesh als testobjekt gearbeitet.
23Das Level macht genau das was ihr vermutlich erreichen wolltet. Wahrscheinlich wird die Funktionalität der "statischen Kamera" aber
24bloß in einer abgewandelten Art umgesetzt: In Pong und Tetris sind die Kameras nicht an das Spielfeld, sondern an ein ControllableEntity,
25das vom Spieler gesteuert wird gekoppelt.
26-->
27
28<!-- Specify the position of the camera -->
29<Template name=playfieldcameras defaults=0>
30  <Pawn>
31    <camerapositions>
32      <CameraPosition position="0,0,20" absolute=true />
33    </camerapositions>
34  </Pawn>
35</Template>
36
37<!-- Loads the playfield mesh -->
38<!-- TODO: why don't you add Playfield_ME.mesh to the data repository ? : /orxonox/data_extern/models -->
39
40<Template name=playfield>
41  <Pawn camerapositiontemplate=playfieldcameras>
42    <attached>
43      <Model position="0,0,0" orientation="1,1,1,1" mesh="crate.mesh" scale3D="1,1,1" /> <!-- the camera is attached to this -->
44    </attached>
45  </Pawn>
46</Template>
47
48
49
50
51
52<Level gametype = "TowerDefense">
53  <templates>
54    <Template link=lodtemplate_default />
55  </templates>
56  <?lua include("includes/notifications.oxi") ?>
57
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    <!--SpawnPoint team=0 position="-200,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff /-->
66   
67        <!-- Spawns the camera, attached to a crate -->
68    <SpawnPoint team=0 position="0,0,0" lookat="0,0,0" spawnclass=Pawn pawndesign=playfield />
69   
70        <!--SpawnPoint team=1 position="0,0,30" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff  /-->
71       
72       
73       
74         <!--SpaceShip position="-10,0,20" lookat="0,0,0">
75      <templates>
76        <Template link=spaceshipassff />
77      </templates>
78      <controller>
79        <WaypointController accuracy=3>
80          <waypoints>
81            <Model mesh="cube.mesh" scale=1 position="110,90,20" />
82            <Model mesh="cube.mesh" scale=2 position="290,90,20" />
83            <Model mesh="cube.mesh" scale=3 position="290,-90,20" />
84            <Model mesh="cube.mesh" scale=4 position="110,-90,20" />
85          </waypoints>
86        </WaypointController>
87      </controller>
88    </SpaceShip-->
89   
90
91    <StaticEntity position="0,0,0" direction="1,0,0" collistionType=static mass=100000>
92        <attached>
93            <Model position="0,0,0" orientation="1,1,1,1" mesh="Playfield_ME.mesh" scale3D="1,1,1" />
94        </attached>
95    </StaticEntity>
96
97  </Scene>
98</Level>
99
Note: See TracBrowser for help on using the repository browser.