<Template name=spaceshipHtwo>
  <SpaceShip
   hudtemplate            = spaceshiphud
   camerapositiontemplate = spaceshipHtwocameras
   engine                 = spaceshipHtwoengine
   spawnparticlesource    = "Orxonox/fairytwirl"
   spawnparticleduration  = 3
   explosionchunks        = 6

   health            = 100
   maxhealth         = 200
   initialhealth     = 100

   primaryThrust     = 100;
   auxilaryThrust    = 30;
   rotationThrust    = 25;

   collisionType     = "dynamic"
   mass              = 100
   linearDamping     = 0.7
   angularDamping    = 0.9999999
  >

<?lua
  include("levels/includes/weaponsettings_H2.oxi")
?>

    <attached>
      <Model position="0,0,0" yaw=90 pitch=-90 roll=0 scale3D="3,0.833,0.833" mesh="h2_green.mesh" />
      <BlinkingBillboard position=" 11.7,4.0,8.5" material="Examples/Flare" colour="1.0, 0.5, 0.3" amplitude=0.1 frequency=0.5 quadratic=1 />
      <BlinkingBillboard position="-11.7,4.0,8.5" material="Examples/Flare" colour="0.5, 1.0, 0.3" amplitude=0.1 frequency=0.5 phase=180 quadratic=1 />
    </attached>
    <collisionShapes>
      <BoxCollisionShape position="0,0,0"      halfExtents="10, 3, 5" />
      <BoxCollisionShape position="13,-1.3,0"  halfExtents="3, 1, 2" />
      <BoxCollisionShape position="-13,-1.3,0" halfExtents="3, 1, 2" />
      <BoxCollisionShape position="0,0,7"      halfExtents="3, 2, 2" />
      <BoxCollisionShape position="0,0.1,-11"  halfExtents="2.2, 1.8, 6" />
      <BoxCollisionShape position="0,0.1,-19"  halfExtents="1.4, 1, 2" />
    </collisionShapes>

  </SpaceShip>
</Template>

<Template name=spaceshipHtwocameras defaults=0>
  <SpaceShip>
    <camerapositions>
      <CameraPosition position="0,10, 40" drag=true mouselook=true />
      <CameraPosition position="0,20, 80" drag=true mouselook=true />
      <CameraPosition position="0,30,120" drag=true mouselook=true />
    </camerapositions>
  </SpaceShip>
</Template>

<Template name=spaceshipHtwoengine baseclass=MultiStateEngine>
  <MultiStateEngine
   boostfactor    = 2

   speedfront     = 150
   speedback      =  50
   speedleftright =  50
   speedupdown    =  50

   accelerationfront     = 500
   accelerationbrake     = 500
   accelerationback      =  125
   accelerationleftright =  125
   accelerationupdown    =  125
  >
    <active>
      <FadingBillboard mainstate=activity active=false scale=0.05 position=" 0.0, 2.0, 12.0" colour="0.0, 0.65, 0.0, 0.5" material="Examples/FlareZwei_1" turnontime=0.5 turnofftime=0.5 />
      <FadingBillboard mainstate=activity active=false scale=0.05 position=" 3.8, 7.5, 11.0" colour="1.0, 1.00, 1.0, 1.0" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
      <FadingBillboard mainstate=activity active=false scale=0.05 position="-3.8, 7.5, 11.0" colour="1.0, 1.00, 1.0, 1.0" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
      <FadingBillboard mainstate=activity active=false scale=0.05 position=" 3.5, 0.0,-10.8" colour="1.0, 1.00, 1.0, 1.0" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
      <FadingBillboard mainstate=activity active=false scale=0.05 position="-3.5, 0.0,-10.8" colour="1.0, 1.00, 1.0, 1.0" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
    </active>
    <forward>
      <Backlight mainstate=activity active=false scale=0.4 name=bltest position=" 7.06, 1.66, 11.6" colour="0, 0.65, 0, 1.0" width=15 length=1500 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
      <Backlight mainstate=activity active=false scale=0.4 name=bltest position="-7.26, 1.66, 11.6" colour="0, 0.65, 0, 1.0" width=15 length=1500 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
    </forward>
    <boost>
      <Backlight mainstate=activity active=false scale=0.4 name=bltest position=" 7.06, 1.66, 11.6" colour="0.5, 0.85, 0.5, 0.7" width=40 length=1000 lifetime=1 elements=30 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Examples/Flare" />
      <Backlight mainstate=activity active=false scale=0.4 name=bltest position="-7.26, 1.66, 11.6" colour="0.5, 0.85, 0.5, 0.7" width=40 length=1000 lifetime=1 elements=30 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Examples/Flare" />
    </boost>
  </MultiStateEngine>
</Template>

