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