Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 15, 2015, 2:20:34 PM (9 years ago)
Author:
fvultier
Message:

Removed unuses classes and templates. The enemies move now along a path defined in the XML level file and no more along a static hard coded path.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/towerdefenseFabien/data/levels/towerDefense.oxw

    r10258 r10586  
    1515  include("towerdefenseHUD.oxo")
    1616  include("templates/lodInformation.oxt")
    17 ?>
    18 
    19 <?lua
     17  include("includes/weaponSettingsTurret.oxi")
    2018  include("templates/spaceshipAssff.oxt")
    21   include("templates/spaceshipPirate.oxt")
    22   include("templates/tower.oxt")
    23   include("templates/enemytowerdefense.oxt")
    2419  include("templates/standardTurret.oxt")
    2520?>
    2621
    27 <!-- Specify the position of the camera -->
    28 <Template name=centerpointmarkcamera defaults=0>
    29   <Pawn team=1>
     22<Template name=selectercameras defaults=0>
     23  <TowerDefenseSelecter>
    3024    <camerapositions>
    31       <CameraPosition position="0,0,1500"/>
     25      <CameraPosition position="0,0,1300" lookat="0,0,0" absolute=true drag=true mouselook=true/>
    3226    </camerapositions>
    33   </Pawn>
    34 </Template>
    35 
    36 <!-- Loads a mesh to mark the center-->
    37 <Template name=centerpointmark>
    38   <Pawn team=1 camerapositiontemplate=centerpointmarkcamera>
     27  </TowerDefenseSelecter>
     28</Template>
     29
     30<Template name=selectertemplate>
     31  <TowerDefenseSelecter team=0 camerapositiontemplate=selectercameras>
    3932    <attached>
    40       <Model position="0,0,0" mesh="cylinder.mesh" scale3D="1,1,1" /> <!-- the camera is attached to this -->
     33      <Model position="0,0,0" pitch=90 mesh="TD_Selection.mesh" scale=25/>
    4134    </attached>
    42   </Pawn>
    43 </Template>
    44 
    45 
    46 <!-- Template for a tower   EDIT: new towertemplate is included with "templates/tower" -->
    47 <!--Template name=towertemplate>
    48   <Tower>
     35  </TowerDefenseSelecter>
     36</Template>
     37
     38<Template name=tower1template>
     39  <TowerDefenseTower
     40  explosionchunks=6
     41  reloadrate=10
     42  reloadwaittime=5
     43  collisionType="none"
     44  pitch="0"
     45  yaw="0"
     46  roll="0"
     47  maxPitch=360
     48  maxYaw=360
     49  maxAttackRadius=1000
     50  minAttackRadius=0
     51  team=0
     52  >
     53    <controller>
     54       <TurretController team = 0/>
     55    </controller>
     56    <weaponslots>
     57      <WeaponSlot position="0,0,0" />
     58    </weaponslots>
     59    <weaponsets>
     60      <WeaponSet firemode=0 />
     61    </weaponsets>
     62    <weapons>
     63      <WeaponPack>
     64        <links>
     65          <DefaultWeaponmodeLink firemode=0 weaponmode=0 />
     66        </links>
     67        <Weapon>
     68          <HsW01 mode=0 munitionpershot=0 muzzleoffset="0,0,-30" damage=2 shielddamage=1 material="Flares/point_lensflare" delay=0/>
     69        </Weapon>
     70      </WeaponPack>
     71    </weapons>
     72  </TowerDefenseTower>
     73</Template>
     74
     75<Template name=tower2template>
     76  <TowerDefenseTower
     77  explosionchunks=6
     78  reloadrate=10
     79  reloadwaittime=5
     80  collisionType="none"
     81  pitch="0"
     82  yaw="0"
     83  roll="0"
     84  maxPitch=360
     85  maxYaw=360
     86  maxAttackRadius=1000
     87  minAttackRadius=0
     88  team=0
     89  >
     90    <controller>
     91       <TurretController team = 0/>
     92    </controller>
     93    <weaponslots>
     94      <WeaponSlot position="0,0,0" />
     95    </weaponslots>
     96    <weaponsets>
     97      <WeaponSet firemode=0 />
     98    </weaponsets>
     99    <weapons>
     100      <WeaponPack>
     101        <links>
     102          <DefaultWeaponmodeLink firemode=0 weaponmode=0 />
     103        </links>
     104        <Weapon>         
     105          <LightningGun mode=0 munitionpershot=0 muzzleoffset="0,0,-30" damage=2 shielddamage=4 />
     106        </Weapon>
     107      </WeaponPack>
     108    </weapons>
    49109    <attached>
    50       <Model position="0,0,0" scale=0.25 mesh="Tower_ME.mesh" />
     110      <Backlight position="0,-100,0" scale=2.0 colour="0.4, 0.0, 1.0" width=10 length=500 lifetime=0.3 elements=20 trailmaterial="Trail/backlighttrail" material="Examples/Flare" loop=1 />
     111    </attached>   
     112  </TowerDefenseTower>
     113</Template>
     114
     115<Template name=tower3template>
     116  <TowerDefenseTower
     117  explosionchunks=6
     118  reloadrate=10
     119  reloadwaittime=5
     120  collisionType="none"
     121  pitch="0"
     122  yaw="0"
     123  roll="0"
     124  maxPitch=360
     125  maxYaw=360
     126  maxAttackRadius=1000
     127  minAttackRadius=0
     128  team=0
     129  >
     130    <controller>
     131       <TurretController team = 0/>
     132    </controller>
     133    <weaponslots>
     134      <WeaponSlot position="0,0,0" />
     135    </weaponslots>
     136    <weaponsets>
     137      <WeaponSet firemode=0 />
     138    </weaponsets>
     139    <weapons>
     140      <WeaponPack>
     141        <links>
     142          <DefaultWeaponmodeLink firemode=0 weaponmode=0 />
     143        </links>
     144        <Weapon>
     145          <EnergyDrink mode=0 munitionpershot=0 muzzleoffset="0,0,-30" damage=2 shielddamage=4 />
     146        </Weapon>
     147      </WeaponPack>
     148    </weapons>
     149  </TowerDefenseTower>
     150</Template>
     151
     152<Template name=tower4template>
     153  <TowerDefenseTower
     154  explosionchunks=6
     155  reloadrate=10
     156  reloadwaittime=5
     157  collisionType="none"
     158  pitch="0"
     159  yaw="0"
     160  roll="0"
     161  maxPitch=360
     162  maxYaw=360
     163  maxAttackRadius=1000
     164  minAttackRadius=0
     165  team=0
     166  >
     167    <controller>
     168       <TurretController team = 0/>
     169    </controller>
     170    <weaponslots>
     171      <WeaponSlot position="0,0,0" />
     172    </weaponslots>
     173    <weaponsets>
     174      <WeaponSet firemode=0 />
     175    </weaponsets>
     176    <weapons>
     177      <WeaponPack>
     178        <links>
     179          <DefaultWeaponmodeLink firemode=0 weaponmode=0 />
     180        </links>
     181        <Weapon>
     182          <FusionFire mode=0 munitionpershot=0 muzzleoffset="0,0,-30" damage=2 shielddamage=4 /> 
     183        </Weapon>
     184      </WeaponPack>
     185    </weapons>
     186      <attached>
     187      <ParticleSpawner position="0,-100,0" source="Orxonox/sparks" lifetime=3.0 autostart=1 loop=1 />
    51188    </attached>
    52   </Tower>
    53 </Template-->
    54 
    55 
    56 
    57 
     189  </TowerDefenseTower>
     190</Template>
     191
     192<Template name=tower5template>
     193  <TowerDefenseTower
     194  explosionchunks=6
     195  reloadrate=10
     196  reloadwaittime=5
     197  collisionType="none"
     198  pitch="0"
     199  yaw="0"
     200  roll="0"
     201  maxPitch=360
     202  maxYaw=360
     203  maxAttackRadius=1000
     204  minAttackRadius=0
     205  team=0
     206  >
     207    <controller>
     208       <TurretController team = 0/>
     209    </controller>
     210    <weaponslots>
     211      <WeaponSlot position="0,0,0" />
     212    </weaponslots>
     213    <weaponsets>
     214      <WeaponSet firemode=0 />
     215    </weaponsets>
     216    <weapons>
     217      <WeaponPack>
     218        <links>
     219          <DefaultWeaponmodeLink firemode=0 weaponmode=0 />
     220        </links>
     221        <Weapon>
     222          <LaserFire mode=0 munitionpershot=0 muzzleoffset="0,0,-30" damage=2 shielddamage=4 /> 
     223        </Weapon>
     224      </WeaponPack>
     225    </weapons>
     226  </TowerDefenseTower>
     227</Template>
     228
     229<Template name=enemytowerdefense1>
     230  <TowerDefenseEnemy
     231   hudtemplate            = spaceshiphud
     232   camerapositiontemplate = spaceshipassffcameras
     233   spawnparticlesource    = "Orxonox/fairytwirl"
     234   spawnparticleduration  = 3
     235   explosionchunks        = 6
     236
     237   health            = 1
     238   maxhealth         = 2
     239   initialhealth     = 1
     240
     241   shieldhealth        = 30
     242   initialshieldhealth = 30
     243   maxshieldhealth     = 50
     244   shieldabsorption    = 0.8
     245   reloadrate          = 1
     246   reloadwaittime      = 1
     247
     248   primaryThrust     = 100
     249   auxilaryThrust    = 30
     250   rotationThrust    = 50
     251
     252   lift = 1;
     253   stallSpeed = 220;
     254
     255   boostPower            = 15
     256   boostPowerRate        = 1
     257   boostRate             = 5
     258   boostCooldownDuration = 10
     259
     260   shakeFrequency = 15
     261   shakeAmplitude = 9
     262
     263   collisionType     = "dynamic"
     264   mass              = 100
     265   linearDamping     = 0.7
     266   angularDamping    = 0.9999999
     267
     268   explosionSound = "sounds/Explosion2.ogg"   
     269  >
     270
     271    <engines>
     272      <MultiStateEngine position=" 7.6, 0, 6" template=spaceshipassffengine />
     273      <MultiStateEngine position="-7.6, 0, 0" template=spaceshipassffengine />
     274    </engines>
     275    <attached>
     276      <Model position="0,0,0" yaw=90 pitch=90 roll=0 scale=4 mesh="assff.mesh" />
     277      <BlinkingBillboard position="17,-1.5,0" material="Examples/Flare" colour="1.0, 0.5, 0.3" amplitude=0.1 frequency=0.5 quadratic=1 />
     278      <BlinkingBillboard position="-17,-1.5,0" material="Examples/Flare" colour="0.5, 1.0, 0.3" amplitude=0.1 frequency=0.5 phase=180 quadratic=1 />
     279    </attached>
     280    <collisionShapes>
     281      <BoxCollisionShape position="0,0,0"      halfExtents="10, 3, 5" />
     282      <BoxCollisionShape position="13,-1.3,0"  halfExtents="3, 1, 2" />
     283      <BoxCollisionShape position="-13,-1.3,0" halfExtents="3, 1, 2" />
     284      <BoxCollisionShape position="0,0,7"      halfExtents="3, 2, 2" />
     285      <BoxCollisionShape position="0,0.1,-11"  halfExtents="2.2, 1.8, 6" />
     286      <BoxCollisionShape position="0,0.1,-19"  halfExtents="1.4, 1, 2" />
     287    </collisionShapes>
     288    <controller>
     289      <WaypointController accuracy=60>
     290      </WaypointController>
     291    </controller>
     292  </TowerDefenseEnemy>
     293</Template>
     294
     295<Template name=enemytowerdefense2>
     296  <TowerDefenseEnemy
     297   hudtemplate            = spaceshiphud
     298   camerapositiontemplate = spaceshipassffcameras
     299   spawnparticlesource    = "Orxonox/fairytwirl"
     300   spawnparticleduration  = 3
     301   explosionchunks        = 6
     302
     303   health            = 100
     304   maxhealth         = 200
     305   initialhealth     = 100
     306
     307   shieldhealth        = 30
     308   initialshieldhealth = 30
     309   maxshieldhealth     = 50
     310   shieldabsorption    = 0.8
     311   reloadrate          = 1
     312   reloadwaittime      = 1
     313
     314   primaryThrust     = 100
     315   auxilaryThrust    = 30
     316   rotationThrust    = 50
     317
     318   lift = 1;
     319   stallSpeed = 220;
     320
     321   boostPower            = 15
     322   boostPowerRate        = 1
     323   boostRate             = 5
     324   boostCooldownDuration = 10
     325
     326   shakeFrequency = 15
     327   shakeAmplitude = 9
     328
     329   collisionType     = "dynamic"
     330   mass              = 100
     331   linearDamping     = 0.7
     332   angularDamping    = 0.9999999
     333
     334   explosionSound = "sounds/Explosion2.ogg"
     335  >
     336
     337    <engines>
     338      <Engine position=" 0, 0, 0"
     339        boostfactor    = 2
     340        speedfront     = 150
     341        speedback      =  50
     342        speedleftright =  50
     343        speedupdown    =  50         
     344        accelerationfront     = 500
     345        accelerationbrake     = 500
     346        accelerationback      =  125
     347        accelerationleftright =  125
     348        accelerationupdown    =  125
     349      />
     350    </engines>
     351    <attached>
     352      <Model position="0,0,0" yaw=0 pitch=0 roll=0 scale=2.5 mesh="JumpEnemy3.mesh" />
     353    </attached>
     354    <collisionShapes>
     355      <BoxCollisionShape position="0,0,0"      halfExtents="10, 3, 5" />
     356      <BoxCollisionShape position="13,-1.3,0"  halfExtents="3, 1, 2" />
     357      <BoxCollisionShape position="-13,-1.3,0" halfExtents="3, 1, 2" />
     358      <BoxCollisionShape position="0,0,7"      halfExtents="3, 2, 2" />
     359      <BoxCollisionShape position="0,0.1,-11"  halfExtents="2.2, 1.8, 6" />
     360      <BoxCollisionShape position="0,0.1,-19"  halfExtents="1.4, 1, 2" />
     361    </collisionShapes>
     362    <controller>
     363      <WaypointController accuracy=60>
     364      </WaypointController>
     365    </controller>   
     366  </TowerDefenseEnemy>
     367</Template>
     368
     369<Template name=enemytowerdefense3>
     370  <TowerDefenseEnemy
     371   hudtemplate            = spaceshiphud
     372   camerapositiontemplate = spaceshipassffcameras
     373   spawnparticlesource    = "Orxonox/fairytwirl"
     374   spawnparticleduration  = 3
     375   explosionchunks        = 6
     376
     377   health            = 100
     378   maxhealth         = 200
     379   initialhealth     = 100
     380   
     381   shieldhealth        = 30
     382   initialshieldhealth = 30
     383   maxshieldhealth     = 50
     384   shieldabsorption    = 0.8
     385   reloadrate          = 1
     386   reloadwaittime      = 1
     387
     388   primaryThrust     = 100
     389   auxilaryThrust    = 30
     390   rotationThrust    = 50
     391
     392   lift = 1;
     393   stallSpeed = 220;
     394
     395   boostPower            = 15
     396   boostPowerRate        = 1
     397   boostRate             = 5
     398   boostCooldownDuration = 10
     399
     400   shakeFrequency = 15
     401   shakeAmplitude = 9
     402
     403   collisionType     = "dynamic"
     404   mass              = 100
     405   linearDamping     = 0.7
     406   angularDamping    = 0.9999999
     407
     408   explosionSound = "sounds/Explosion2.ogg"
     409  >
     410
     411    <engines>
     412      <Engine position=" 0, 0, 0"
     413        boostfactor    = 2
     414        speedfront     = 150
     415        speedback      =  50
     416        speedleftright =  50
     417        speedupdown    =  50         
     418        accelerationfront     = 500
     419        accelerationbrake     = 500
     420        accelerationback      =  125
     421        accelerationleftright =  125
     422        accelerationupdown    =  125
     423      />
     424    </engines>
     425    <attached>
     426      <Model position="0,0,0" yaw=0 pitch=0 roll=0 scale=2.5 mesh="JumpEnemy4.mesh" />
     427    </attached>
     428    <collisionShapes>
     429      <BoxCollisionShape position="0,0,0"      halfExtents="10, 3, 5" />
     430      <BoxCollisionShape position="13,-1.3,0"  halfExtents="3, 1, 2" />
     431      <BoxCollisionShape position="-13,-1.3,0" halfExtents="3, 1, 2" />
     432      <BoxCollisionShape position="0,0,7"      halfExtents="3, 2, 2" />
     433      <BoxCollisionShape position="0,0.1,-11"  halfExtents="2.2, 1.8, 6" />
     434      <BoxCollisionShape position="0,0.1,-19"  halfExtents="1.4, 1, 2" />
     435    </collisionShapes>
     436    <controller>
     437      <WaypointController accuracy=60>
     438      </WaypointController>
     439    </controller>   
     440  </TowerDefenseEnemy>
     441</Template>
    58442
    59443<Level gametype = "TowerDefense">
     
    71455    <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"/>
    72456
    73     <!-- Spawns the camera, attached to a crate -->
    74     <SpawnPoint team=1 position="0,0,0" spawnclass=Pawn pawndesign=centerpointmark />
    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 
    82 
    83     <!--invisible entity to attach towers to, since playfield is static and towers are dynamic-->
    84     <StaticEntity team =1 position=0,0,0>
    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 />
    90             <!--Model position="0,0,0" mesh="crate.mesh" scale3D="3,3,3" /--> <!-- Only temporary needed to help align the collisionshape -->
    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" /-->
    96         </attached>
    97         <collisionShapes> <!-- The collisionshape forbids other worldentities that have a collisionShape to fly through it.
    98 
    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. -->
    103            <BoxCollisionShape position="0,0,0" halfExtents="400,400,100" />
    104         </collisionShapes>
    105     </StaticEntity>
    106 
    107 
    108 
     457    <SpawnPoint team=0 position="0,0,0"/>
     458
     459    <Model position="0,0,-1000" pitch=90 lodLevel=1 mesh="TD_S1.mesh" scale=25/>
     460    <Model position="0,0,-1000" pitch=90 lodLevel=1 mesh="TD_S2.mesh" scale=25/>
     461    <Model position="0,0,-1000" pitch=90 lodLevel=1 mesh="TD_S3.mesh" scale=25/>
     462    <Model position="0,0,-1000" pitch=90 lodLevel=1 mesh="TD_S4.mesh" scale=25/>
     463    <Model position="0,0,-1000" pitch=90 lodLevel=1 mesh="TD_S5.mesh" scale=25/>
     464    <Model position="0,0,-1000" pitch=90 lodLevel=1 mesh="TD_T1.mesh" scale=25/>
     465    <Model position="0,0,-1000" pitch=90 lodLevel=1 mesh="TD_T2.mesh" scale=25/>
     466    <Model position="0,0,-1000" pitch=90 lodLevel=1 mesh="TD_T3.mesh" scale=25/>
     467    <Model position="0,0,-1000" pitch=90 lodLevel=1 mesh="TD_T4.mesh" scale=25/>
     468    <Model position="0,0,-1000" pitch=90 lodLevel=1 mesh="TD_T5.mesh" scale=25/>
     469    <Model position="0,0,-1000" pitch=90 lodLevel=1 mesh="TD_F1.mesh" scale=25/>
    109470
    110471    <!-- PlayField -->
    111472    <TowerDefenseCenterpoint
    112473    name=towerdefensecenter
     474    selecterTemplate=selectertemplate
     475    tower1Template=tower1template
     476    tower2Template=tower2template
     477    tower3Template=tower3template
     478    tower4Template=tower4template
     479    tower5Template=tower5template
     480    tower1Cost=100
     481    tower2Cost=100
     482    tower3Cost=100
     483    tower4Cost=100
     484    tower5Cost=100
     485    fields="F1F1F1R1I1I1I1I1O1F1F1F1F1F1F1F1
     486            F1F1F1I2F1F1F1F1F1F1F1F1F1F1F1F1
     487            F1F1F1I2F1F1F1F1F1F1F1F1F1F1F1F1
     488            F1F1F1I2F1F1F1F1F1F1F1F1F1F1F1F1
     489            F1F1F1I2F1F1F1F1F1F1F1F1F1F1F1F1
     490            F1F1F1I2F1F1F1F1F1F1F1F1F1F1F1F1
     491            F1F1F1R2I3I3I3I3L3F1F1F1F1F1F1F1
     492            F1F1F1F1F1F1F1F1I2F1F1F1F1F1F1F1
     493            F1F1F1F1F1F1F1F1I2F1F1F1F1F1F1F1
     494            X1I1I1I1R0F1F1F1I2F1F1F1F1F1F1F1
     495            F1F1F1F1I0F1F1F1I2F1F1F1F1F1F1F1
     496            F1F1F1F1I0F1F1F1I2F1F1F1F1F1F1F1
     497            F1F1F1F1L1I1I1I1L2F1F1F1F1F1F1F1
     498            F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1
     499            F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1
     500            F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1"
    113501    width=16
    114502    height=16
    115503    tileScale=100
    116     towerTemplate=tower
    117504    position="0,0,0"
    118505    direction="0,0,0"
    119506    collisionType=dynamic
    120507    mass=100000
    121     team=1
    122     />
     508    >
     509      <camerapositions>
     510        <CameraPosition position="0,0,1400" lookat="0,0,0" absolute=true />
     511      </camerapositions>   
     512    </TowerDefenseCenterpoint>
    123513
    124514  </Scene>
Note: See TracChangeset for help on using the changeset viewer.