Index: code/branches/presentation3/data/levels/Level(Deathmatch).oxw
===================================================================
--- code/branches/presentation3/data/levels/Level(Deathmatch).oxw	(revision 6920)
+++ code/branches/presentation3/data/levels/Level(Deathmatch).oxw	(revision 6920)
@@ -0,0 +1,422 @@
+<?lua
+	include("stats.oxo")
+	include("hudtemplates3.oxo")
+	include("underattackhud.oxo")
+	include("templates/spaceship_assff.oxt")
+	include("templates/spaceship_pirate.oxt")
+	include("templates/spaceship_Transporter.oxt")
+?>
+
+<!--*****************************************************************************************************************************************************************************************-->
+<!--Including Template for triggering on player-->
+
+<Template name=spaceshipassffplayer>
+  <SpaceShip
+   hudtemplate            = spaceshiphud
+   camerapositiontemplate = spaceshipassffcameras
+   engine                 = spaceshipassffengine
+   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
+  >
+    <attached>
+      <Model position="0,0,0" yaw=90 pitch=-90 roll=0 scale=4 mesh="assff.mesh" />
+      <BlinkingBillboard position="17,-1.5,0" material="Examples/Flare" colour="1.0, 0.5, 0.3" amplitude=0.1 frequency=0.5 quadratic=1 />
+      <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 />
+      <DistanceTriggerBeacon name="PlayerDistanceTrigger" /> <!--added DistanceTrigger-->
+    </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>
+<?lua
+  include("includes/weaponsettings3.oxi")
+?>
+  </SpaceShip>
+</Template>
+
+<!--*****************************************************************************************************************************************************************************************-->
+<!-- Ausgang: Level ===> name/description -->
+<Level
+  name="Level"
+  description="Level zerstoeren von Transportern"
+  gametype=TeamDeathmatch
+>
+
+	<!-- Ausgang: Szene ===> ambientlight/skybox -->
+	<Scene
+	  ambientlight="0.8,0.8,0.8"
+	  skybox="Orxonox/skypanoramagen1"
+	>
+		
+		<!--Light: noch zu aendern -->
+		<Light type=directional position="0,0,0" direction="0, 0, 0" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 1.0, 0.9" />
+
+
+<!--*****************************************************************************************************************************************************************************************-->
+<!--Quests ==> id/title/description/failMessage/completeMessage-->
+	<GlobalQuest id="Levelname.nameofQuest1.testsasimplequesttoseehowitworks">    <!--QUESTIDS MUST HAVE AT LEAST 32 CHARACTERS-->
+		<QuestDescription title="ErkundungsFlug" description="Ein Erkundungsflug durch die Skybox!" failMessage="You failed!" completeMessage="You win!" />
+	</GlobalQuest>
+
+
+<!--QuestEnd-->
+<!--*****************************************************************************************************************************************************************************************-->
+
+		<!--Spieler Spawnpoint ===> position/direction-->
+		<SpawnPoint position="150,0,-50" direction="2000,0,-1000" spawnclass=SpaceShip pawndesign=spaceshipassffplayer team=0 active="true" > 
+			<events>
+				<activity>
+					<EventListener event="activateSecondSpawnpoint" />
+				</activity>
+			</events>
+		</SpawnPoint>
+
+		<SpawnPoint position="10000,0,3000" direction="2000,0,-1000" spawnclass=SpaceShip pawndesign=spaceshipassffplayer team=0 active="false" > 
+			<events>
+				<activity>
+					<EventListener event="activateSecondSpawnpoint" />
+				</activity>
+			</events>
+		</SpawnPoint>
+
+
+<!--Auslosen der 1 testQuest-->
+<!-- Funktioniert noch nicht (Fehler beim mehrfachen Ausfuehren)-->
+<!--		<QuestEffectBeacon position="1000,0,0" times="1">
+			<effects>
+				<AddQuest questId="Levelname.nameofQuest1.testsasimplequesttoseehowitworks"/>
+			</effects>
+			<events>
+				<execute>
+					<EventListener event="Levelnamequest1"/>
+				</execute>
+			</events>
+			<attached>
+				<Billboard position="0,0,0" colour="1.0,1.0,1.0" material="Examples/Flare"/>
+				<DistanceTrigger name="Levelnamequest1" position="0,0,0" distance="50" target="ControllableEntity"/>
+			</attached>
+		</QuestEffectBeacon><!---->
+
+<!--Erstellen der Transporter________nur noch zwei_________________________________________________________________________________________________________________________________________OK-->
+
+
+<?lua for i=0,0,1 do
+x=800
+health=1600
+?>
+		<!--Transporter 1 ++ FUNKTIONIERT-->
+	<EventTrigger name="activateTeam1No1" acitvations=1 stayactive="true">
+	<events>
+	<trigger>
+		<SpaceShip position="<?lua print(3800-i*x) ?>,0,3000" lookat="<?lua print(4800-i*x) ?>,0,4000" health=<?lua print(health) ?> maxhealth=<?lua print(health) ?> initialhealth=<?lua print(health) ?> >
+			<templates>
+	    			<Template link=spaceshipTransporter />
+	  		</templates>
+	  		<controller>
+				<WaypointPatrolController alertnessradius=1000 team=1>
+					<waypoints>
+						<Model mesh="cube.mesh" scale=0 position="<?lua print(14800-i*x) ?>,0,3000"/>
+					</waypoints>
+				</WaypointPatrolController>
+	  		</controller>
+		</SpaceShip><!---->
+	</trigger>
+	</events>
+	</EventTrigger>
+<?lua end ?>
+
+
+<?lua for j=0,1,1 do 
+health=1600
+x=800
+z=j*300
+?>
+		<!--Transporter 2,3 ++ FUNKTIONIERT-->
+	<EventTrigger name="activateTeam1No1" acitvations=1 stayactive="true">
+	<events>
+	<trigger>
+		<SpaceShip position="<?lua print(2600+x) ?>,0,<?lua print(3150-z) ?>" lookat="<?lua print(3500+x) ?>,0,<?lua print(4150-z) ?>" health=<?lua print(health) ?> maxhealth=<?lua print(health) ?> initialhealth=<?lua print(health) ?> >
+			<templates>
+	    			<Template link=spaceshipTransporter />
+	  		</templates>
+	  		<controller>
+				<WaypointPatrolController alertnessradius=1000 team=1>
+					<waypoints>
+						<Model mesh="cube.mesh" scale=0 position="<?lua print(13500+x) ?>,0,<?lua print(3150-z) ?>"/>
+					</waypoints>
+				</WaypointPatrolController>
+	  		</controller>
+		</SpaceShip><!---->
+	</trigger>
+	</events>
+	</EventTrigger>
+<?lua end ?>
+
+
+<!--Erstellen der Transporter______ENDE______________________________________________________________________________________________________________________________________________________-->
+
+<!--Erstellen der Schiffe des ErkundungsTrupps_____________________________________________________________________________________________________________________________________________OK-->
+		<!--Spaceships team 0 (player:team=0)FUNKTIONIERT-->
+		<SpaceShip position="50,0,0" lookat="2050,0,-1000" health="500" maxhealth="500" initialhealth="500" >
+	  		<templates>
+	   			<Template link=spaceshipassff />
+	 		</templates>
+	  		<controller>
+				<WaypointPatrolController alertnessradius=2000 team=0 >
+					<waypoints>
+						<Model mesh="cube.mesh" scale=0 position="2050,0,-1000" />
+						<Model mesh="cube.mesh" scale=0 position="6050,0,0" />
+            					<Model mesh="cube.mesh" scale=0 position="10050,0,3000" />
+            					<Model mesh="cube.mesh" scale=0 position="3050,0,3000" />
+						<Model mesh="cube.mesh" scale=0 position="-4050,0,3000" />
+					</waypoints>
+				</WaypointPatrolController>
+	  		</controller>
+		</SpaceShip>
+		<!--Second Spaceship team 0 (player: team 0)FUNKTIONIERT-->
+		<SpaceShip position="0,0,100" lookat="2000,0,-950" health="400" maxhealth="400" initialhealth="400" >
+	  		<templates>
+	   			<Template link=spaceshipassff />
+	 		</templates>
+	  		<controller>
+				<WaypointPatrolController alertnessradius=2000 team=0 >
+					<waypoints>
+						<Model mesh="cube.mesh" scale=0 position="2000,0,-900" />
+						<Model mesh="cube.mesh" scale=0 position="6000,0,0" />
+            					<Model mesh="cube.mesh" scale=0 position="10000,0,3100" />
+            					<Model mesh="cube.mesh" scale=0 position="3000,0,3100" />
+						<Model mesh="cube.mesh" scale=0 position="-4000,0,3100"/>
+					</waypoints>
+				</WaypointPatrolController>
+	  		</controller>
+		</SpaceShip>
+		<!--third Spaceship team 0 (player: team 0)FUNKTIONIERT-->
+		<SpaceShip position="0,0,-100" lookat="2000,0,-1050" health="400" maxhealth="400" initialhealth="400" >
+	  		<templates>
+	   			<Template link=spaceshipassff />
+	 		</templates>
+	  		<controller>
+				<WaypointPatrolController alertnessradius=2000 team=0 >
+					<waypoints>
+						<Model mesh="cube.mesh" scale=0 position="2000,0,-1100" />
+						<Model mesh="cube.mesh" scale=0 position="6000,0,-100" />
+            					<Model mesh="cube.mesh" scale=0 position="10000,0,2900" />
+            					<Model mesh="cube.mesh" scale=0 position="3000,0,2900" />
+						<Model mesh="cube.mesh" scale=0 position="-4000,0,2900" />
+					</waypoints>
+				</WaypointPatrolController>
+	  		</controller>
+		</SpaceShip>
+<!--Erstellen der Schiffe des ErkundungsTrupps ______ENDE ___________________________________________________________________________________________________________________________________-->
+
+
+<!--Erstellen des Asteroidenfeldes___FUNKTIONIERT_________________________________________________________________________________________________________________________________________OK--> 
+
+		<StaticEntity position="3000,0,-1000">
+			<attached>
+				<?lua for i=0,100,1 do 
+				x=math.random(250,4000)
+				y=math.random(-500,500)
+				z=math.random(1000,2000)
+				scale=math.random(20,70)
+				?>
+				<MovableEntity collisionType=kinematic linearDamping=0.8 angularDamping=0 mass="<?lua print(scale * 5) ?>" position="<?lua print(x) ?>,<?lua print(y) ?>,<?lua print(z) ?>" rotationaxis="<?lua print(math.random()) ?>,<?lua print(math.random()) ?>,<?lua print(math.random()) ?>" rotationrate="<?lua print(math.random()*15) ?>">
+					<attached>
+						<Model scale=<?lua print(scale) ?> mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false/>
+					</attached>
+					<collisionShapes>
+        				<SphereCollisionShape radius="<?lua print(scale * 3) ?>" />
+      					</collisionShapes> 
+				</MovableEntity>
+				<?lua end ?>
+			</attached>
+		</StaticEntity>
+
+<!--Erstellen des Ateroidenfeldes______ENDE__________________________________________________________________________________________________________________________________________________-->
+
+<!--Erstellen von Asteroiden die zufaellig plaziert sind___________________________________________________________________________________________________________________________________OK-->
+
+		<StaticEntity position="0,0,0">
+			<attached>
+				<?lua for i=0,150,1 do 
+				x=math.random(-8000,8000)
+				y=math.random(-8000,8000)
+				z=math.random(-8000,8000)
+				?>
+				<MovableEntity collisionType=kinematic linearDamping=0.8 angularDamping=0 mass="<?lua print(scale * 5) ?>" position="<?lua print(x) ?>,<?lua print(y) ?>,<?lua print(z) ?>" rotationaxis="<?lua print(math.random()) ?>,<?lua print(math.random()) ?>,<?lua print(math.random()) ?>" rotationrate="<?lua print(math.random()*15) ?>" >
+					<attached>
+						<Model scale=<?lua print(math.random(20,70)) ?> mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false/>
+					</attached>
+					<collisionShapes>
+       					<SphereCollisionShape radius="<?lua print(scale * 3) ?>" />
+ 					</collisionShapes> 
+				</MovableEntity>
+				<?lua end ?>
+			</attached>
+		</StaticEntity>
+
+<!--Erstellen von Asteroiden die zufaellig plaziert sind______ENDE___________________________________________________________________________________________________________________________-->
+
+<!--Erstellen der Hilfsschiffe_____________________________________________________________________________________________________________________________________________________________OK-->
+<!---->
+		<!--Trigger to activate this Team (TEAM NO 1)-->
+	<DistanceTrigger name="activateTeam0No1" position="8000,0,3100" distance="1000" target="DistanceTriggerBeacon" targetname="PlayerDistanceTrigger" activations="1" stayactive="true" />
+
+<!--TEAM NO 1 (activationType : distance || killing a spaceship what belongs to TEAM 0 NO 0)-->
+<?lua for i=0,9,1 do
+x=math.random(-500,500)
+y=math.random(-300,300)
+z=math.random(-300,300)
+?>
+	<EventTrigger name="activateTeam0No1" activations=1 stayactive="true">
+		<events>
+			<trigger>
+				<SpaceShip position="<?lua print(x+4500) ?>,<?lua print(y) ?>,<?lua print(z+6000) ?>" lookat="<?lua print(4000+x) ?>,<?lua print(y) ?>,<?lua print(z+3000) ?>">
+					<templates>
+						<Template link=spaceshipassff />
+					</templates>
+					<controller>
+						<WaypointPatrolController alertnessradius=2000 team=0 active=false>
+							<waypoints>
+								<Model mesh="cube.mesh" scale=0 position="<?lua print(4500+x) ?>,<?lua print(y) ?>,<?lua print(z+3000) ?>" />
+								<Model mesh="cube.mesh" scale=0 position="<?lua print(x-4000) ?>,<?lua print(y) ?>,<?lua print(z+3000) ?>" />
+							</waypoints>
+							<events>
+								<activity>
+									<EventListener event="activateTeam0No1" />
+								</activity>
+							</events>
+						</WaypointPatrolController>
+					</controller>
+				</SpaceShip>
+			</trigger>
+		</events>
+	</EventTrigger>
+
+
+<?lua end ?>
+
+<!---->
+<!--Erstellen der Hilfsschiffe______ENDE_____________________________________________________________________________________________________________________________________________________-->
+
+<!--Erstellen von Feinden die den Transportern zu Hilfe eilen_______________________________________________________________________________________________________________________________OK-->
+<!---->
+<!--TEAM 1 NO 1 (activationType : killing a Transporter || killing a spaceship what belongs to TEAM 1 NO 1)-->
+<?lua for i=0,11,1 do
+x=math.random(-500,500)
+y=math.random(-300,300)
+z=math.random(-300,300)
+?>
+	<EventTrigger name="activateTeam1No1" activations=1 stayactive="true" >
+		<events>
+			<trigger>
+				<SpaceShip position="<?lua print(x-4000) ?>,<?lua print(y) ?>,<?lua print(z+3000) ?>" lookat="<?lua print(4000+x) ?>,<?lua print(y) ?>,<?lua print(z+3000) ?>">
+					<templates>
+						<Template link=spaceshippirate />
+					</templates>
+					<controller>
+						<WaypointPatrolController alertnessradius=5000 team=1 active=false>
+							<waypoints>
+								<Model mesh="cube.mesh" scale=0 position="<?lua print(4000+x) ?>,<?lua print(y) ?>,<?lua print(z+3000) ?>" />
+							</waypoints>
+							<events>
+								<activity>
+									<EventListener event="activateTeam1No1" />
+								</activity>
+							</events>
+						</WaypointPatrolController>
+					</controller>
+				</SpaceShip>
+			</trigger>
+		</events>
+	</EventTrigger>
+
+<?lua end ?>
+<!---->
+<!--Erstellen von Feinden die dem Transporter zu Hilfe eilen_________________________________________________________________________________________________________________________________-->
+
+<!--Erstellen von Feinden auf dem Weg zu den Transportern___________________________________________________________________________________(noch besser machen [mehr Feinde/ Koordinierung])-->
+<?lua for i=0,1,1 do 
+z=math.random(-300,300)
+?>
+		<SpaceShip position="<?lua print(5900+i*100) ?>,0,-3000" lookat="2500,0,-1000">
+			<templates>
+				<Template link=spaceshippirate/>
+			</templates>
+			<controller>
+				<WaypointPatrolController alertnessRadius=1500 team=1>
+					<waypoints>
+						<Model mesh="cube.mesh" scale=0 position="<?lua print(2500+100*i) ?>,0,-1000" />
+					</waypoints>
+				</WaypointPatrolController>
+			</controller>
+		</SpaceShip>
+
+
+		<SpaceShip position="<?lua print(9000) ?>,13000,<?lua print(z*i+3000) ?>" lookat="1000,0,3000">
+			<templates>
+				<Template link=spaceshippirate/>
+			</templates>
+			<controller>
+				<WaypointPatrolController alertnessRadius=1500 team=1>
+					<waypoints>
+						<Model mesh="cube.mesh" scale=0 position="<?lua print(10000) ?>,0,<?lua print(3000+z*i) ?>" />
+					</waypoints>
+				</WaypointPatrolController>
+			</controller>
+		</SpaceShip>
+
+<?lua end ?>
+
+<?lua for i=0,3,1 do ?>
+		<SpaceShip position="<?lua print(math.random(5500,6500)+2000) ?>,0,1000" lookat="2500,0,-1000">
+			<templates>
+				<Template link=spaceshippirate/>
+			</templates>
+			<controller>
+				<WaypointPatrolController alertnessRadius=1500 team=1>
+					<waypoints>
+						<Model mesh="cube.mesh" scale=0 position="<?lua print(math.random(5750,6250)+2000) ?>,0,1250" />
+						<Model mesh="cube.mesh" scale=0 position="<?lua print(math.random(5750,6250)+2000) ?>,250,1000" />
+						<Model mesh="cube.mesh" scale=0 position="<?lua print(math.random(5750,6250)+2000) ?>,0,1000" />
+					</waypoints>
+				</WaypointPatrolController>
+			</controller>
+		</SpaceShip>
+<?lua end ?>
+<!--Erstellen von Feinden auf dem Weg zu den Transportern______ENDE__________________________________________________________________________________________________________________________-->
+
+<DistanceTrigger name="activateSecondSpawnpoint" position="10000,0,3000" distance="1000" target="DistanceTriggerBeacon" targetname="PlayerDistanceTrigger" activations="1" stayactive="true" />
+
+	</Scene>
+</Level>
+
+
+
+
+
+
+
+
+
+
+
+
Index: code/branches/presentation3/data/levels/Level(UnderAttack).oxw
===================================================================
--- code/branches/presentation3/data/levels/Level(UnderAttack).oxw	(revision 6920)
+++ code/branches/presentation3/data/levels/Level(UnderAttack).oxw	(revision 6920)
@@ -0,0 +1,118 @@
+<?lua
+	include("stats.oxo")
+	include("hudtemplates3.oxo")
+	include("underattackhud.oxo")
+	include("templates/spaceship_assff.oxt")
+	include("templates/spaceship_pirate.oxt")
+	include("templates/spaceship_destroyer.oxt")
+?>
+
+<!-- Ausgang: Level ===> name/description -->
+<Level
+  name="Level"
+  description="Level zerstoeren von Transportern"
+  gametype=UnderAttack
+>
+
+	<!-- Ausgang: Szene ===> ambientlight/skybox -->
+	<Scene
+	  ambientlight="0.8,0.8,0.8"
+	  skybox="Orxonox/skypanoramagen1"
+	>
+		
+		<!--Light: noch zu aendern -->
+		<Light type=directional position="0,0,0" direction="0, 0, 0" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 1.0, 0.9" />
+
+<!--******************************************************************************************************************************************************************************************-->
+<!--Quests ==> id/title/description/failMessage/completeMessage-->
+	<GlobalQuest id="Levelname.nameofQuest1.testsasimplequesttoseehowitworks">    <!--QUESTIDS MUST HAVE AT LEAST 32 CHARACTERS-->
+		<QuestDescription title="ErkundungsFlug" description="Ein Erkundungsflug durch die Skybox!" failMessage="You failed!" completeMessage="You win!" />
+	</GlobalQuest>
+
+
+<!--QuestEnd-->
+<!--******************************************************************************************************************************************************************************************-->
+
+		<!--Spieler Spawnpoint ===> position/direction-->
+		<SpawnPoint position="-100,50,0" direction="1000,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff team=0 />
+
+
+		<!--Auslosen der 1 testQuest-->
+<!-- Funktioniert noch nicht Fehler mit einem Argument in Quest-->
+		<QuestEffectBeacon position="1000,0,0" times="1">
+			<effects>
+				<AddQuest questId="Levelname.nameofQuest1.testsasimplequesttoseehowitworks"/>
+			</effects>
+			<events>
+				<execute>
+					<EventListener event="Levelnamequest1"/>
+				</execute>
+			</events>
+			<attached>
+				<Billboard position="0,0,0" colour="1.0,1.0,1.0" material="Examples/Flare"/>
+				<DistanceTrigger name="Levelnamequest1" position="0,0,0" distance="50" target="ControllableEntity"/>
+			</attached>
+		</QuestEffectBeacon>
+
+		<!--Destroyer 1 ++ Benutzen des spaceship_destroyer template (Fehler mit dem Ziel ==> muss nur den letzten transporter zerstoeren) ==> health/maxHealth/initialHealth-->
+		<Destroyer
+			position="3000,0,3000"
+			velocity="-25,0,0"
+			template=spaceshipDestroyer
+			health=1000
+			maxHealth = 1000
+			initialHealth = 1000
+		>
+		</Destroyer>
+
+<!--Erstellen der Schiffe des ErkundungsTrupps__________________________________________________________________-->
+		<!--Spaceships team 0 (player:team=0)-->
+		<SpaceShip position="75,0,0" lookat="1000,0,0" >
+	  		<templates>
+	   			<Template link=spaceshipassff />
+	 		</templates>
+	  		<controller>
+				<WaypointPatrolController alertnessradius=1000 team=0>
+					<waypoints>
+						<Model mesh="cube.mesh" scale=0 position="3025,0,0" />
+            					<Model mesh="cube.mesh" scale=0 position="4025,0,1000" />
+            					<Model mesh="cube.mesh" scale=0 position="3025,0,3000" />
+					</waypoints>
+				</WaypointPatrolController>
+	  		</controller>
+		</SpaceShip>
+		<!--Second Spaceship team 0 (player: team 0)-->
+		<SpaceShip position="0,0,75" lookat="1000,0,75" >
+	  		<templates>
+	   			<Template link=spaceshipassff />
+	 		</templates>
+	  		<controller>
+				<WaypointPatrolController alertnessradius=1000 team=0>
+					<waypoints>
+						<Model mesh="cube.mesh" scale=0 position="3000,0,25" />
+            					<Model mesh="cube.mesh" scale=0 position="4000,0,1025" />
+            					<Model mesh="cube.mesh" scale=0 position="3000,0,3025" />
+					</waypoints>
+				</WaypointPatrolController>
+	  		</controller>
+		</SpaceShip>
+		<!--third Spaceship team 0 (player: team 0)-->
+		<SpaceShip position="0,0,-75" lookat="1000,0,-75" >
+	  		<templates>
+	   			<Template link=spaceshipassff />
+	 		</templates>
+	  		<controller>
+				<WaypointPatrolController alertnessradius=1000 team=0>
+					<waypoints>
+						<Model mesh="cube.mesh" scale=0 position="3000,0,-25" />
+            					<Model mesh="cube.mesh" scale=0 position="4000,0,975" />
+            					<Model mesh="cube.mesh" scale=0 position="3000,0,2975" />
+					</waypoints>
+				</WaypointPatrolController>
+	  		</controller>
+		</SpaceShip>
+<!--Erstellen der Schiffe des ErkundungsTrupps ______ENDE ______________________________________________-->
+
+
+	</Scene>
+</Level>
Index: code/branches/presentation3/data/levels/mylevel.oxw
===================================================================
--- code/branches/presentation3/data/levels/mylevel.oxw	(revision 6920)
+++ code/branches/presentation3/data/levels/mylevel.oxw	(revision 6920)
@@ -0,0 +1,142 @@
+<?lua
+	include("stats.oxo")
+	include("hudtemplates3.oxo")
+	include("underattackhud.oxo")
+	include("templates/spaceship_assff.oxt")
+	include("templates/spaceship_pirate.oxt")
+	include("templates/spaceship_Transporter.oxt")
+?>
+
+<Template name=spaceshipassffplayer>
+  <SpaceShip
+   hudtemplate            = spaceshiphud
+   camerapositiontemplate = spaceshipassffcameras
+   engine                 = spaceshipassffengine
+   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
+  >
+    <attached>
+      <Model position="0,0,0" yaw=90 pitch=-90 roll=0 scale=4 mesh="assff.mesh" />
+      <BlinkingBillboard position="17,-1.5,0" material="Examples/Flare" colour="1.0, 0.5, 0.3" amplitude=0.1 frequency=0.5 quadratic=1 />
+      <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 />
+      <DistanceTriggerBeacon name="test" />
+    </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>
+<?lua
+  include("includes/weaponsettings3.oxi")
+?>
+  </SpaceShip>
+</Template>
+
+<!-- Ausgang: Level ===> name/description -->
+<Level
+  name="Level"
+  description="Level zerstoeren von Transportern"
+  gametype=TeamDeathmatch
+>
+
+	<!-- Ausgang: Szene ===> ambientlight/skybox -->
+	<Scene
+	  ambientlight="0.8,0.8,0.8"
+	  skybox="Orxonox/skypanoramagen1"
+	>
+
+		<!--Light: noch zu aendern -->
+		<Light type=directional position="0,0,0" direction="1000, 0, 0" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 1.0, 0.9" />
+
+
+		<SpawnPoint position="0,0,0" direction="1000,0,0" spawnclass=SpaceShip pawndesign=spaceshipassffplayer team=0/>
+
+<!--
+		<EventTrigger name="testdestroy" activations=1 stayactive="true">
+			<events>
+				<trigger>
+					<SpaceShip position="2000,0,3000" lookat="0,0,0" team=1>
+						<templates>
+							<Template link=spaceshippirate/>
+						</templates>
+						<controller>
+							<AIController activity="false"/>
+						</controller>
+					</SpaceShip>
+				</trigger>
+			</events>
+		</EventTrigger>
+-->
+
+					<SpaceShip position="1000,0,200" lookat="0,0,0">
+						<templates>
+							<Template link=spaceshipassff/>
+						</templates>
+						<controller>
+							<AIController active="false"/>
+						</controller>
+					</SpaceShip>
+
+<DistanceTrigger name="triggername" position="1000,0,0" distance="500" target="DistanceTriggerBeacon" targetname="test" activations=1 stayactive="true" />
+
+		<SpaceShip position="1000,0,0" lookat="2000,0,0" >
+			<templates>
+				<Template link=spaceshipassff />
+			</templates>
+			<controller>
+				<WaypointPatrolController alertnessradius=5000 team=0 active="false" >
+					<waypoints>
+						<Model mesh="cube.mesh" scale=0 position="2000,0,0" />
+					</waypoints>
+					<events>
+						<activity>
+							<EventListener event="triggername" />
+						</activity>
+					</events>
+				</WaypointPatrolController>
+			</controller>
+		</SpaceShip>
+	</Scene>
+</Level>
+
+
+
+<!-- ZUM ERSTELLEN DER DESTROYTRIGGER
+<EventTrigger name="triggername" activations=1 stayactive=true >
+	<events>
+		<trigger>
+			<Spaceship />
+		</trigger>
+	</events>
+</EventTrigger>
+
+<Spaceship>
+	<controller>
+		<SomeController activity="false">
+			<events>
+				<activity>
+					<EventListener event="triggername" />
+				</activity>
+			</events>
+		</SomeController>
+	</controller>
+</Spacehip>
+
+-->
Index: code/branches/presentation3/src/orxonox/gametypes/TeamDeathmatch.cc
===================================================================
--- code/branches/presentation3/src/orxonox/gametypes/TeamDeathmatch.cc	(revision 6912)
+++ code/branches/presentation3/src/orxonox/gametypes/TeamDeathmatch.cc	(revision 6920)
@@ -137,4 +137,6 @@
         }
 
+        SpawnPoint* fallbackSpawnPoint = NULL;
+
         if (teamSpawnPoints.size() > 0)
         {
@@ -144,8 +146,35 @@
             {
                 if (index == randomspawn)
+                {
+                    fallbackSpawnPoint = (*it);
+                    break;
+                }
+
+                ++index;
+            }
+
+            for (std::set<SpawnPoint*>::const_iterator it = teamSpawnPoints.begin(); it != teamSpawnPoints.end(); )
+            {
+                if (!(*it)->isActive())
+                {
+                    COUT(1) << "MUP" << std::endl;
+                    teamSpawnPoints.erase(it++);
+                    continue;
+                }
+
+                ++it;
+            }
+
+            randomspawn = static_cast<unsigned int>(rnd(static_cast<float>(teamSpawnPoints.size())));
+            index = 0;
+            for (std::set<SpawnPoint*>::const_iterator it = teamSpawnPoints.begin(); it != teamSpawnPoints.end(); ++it)
+            {
+                if (index == randomspawn)
                     return (*it);
 
                 ++index;
             }
+
+            return fallbackSpawnPoint;
         }
 
