Index: code/branches/levelMichael/data/levels/Spacefight.oxw
===================================================================
--- code/branches/levelMichael/data/levels/Spacefight.oxw	(revision 9826)
+++ code/branches/levelMichael/data/levels/Spacefight.oxw	(revision 9843)
@@ -83,5 +83,5 @@
 
 
-	<SpawnPoint team=0 position="-10000, -22000, 25000" lookat="18000,5000,21000" spawnclass=SpaceShip pawndesign=spaceshipswallow delay=0.1><!-- pawndesign=spaceshipcollateraldamage -->
+	<SpawnPoint team=0 position="13500, 2500, 10500" lookat="18000,5000,18000" spawnclass=SpaceShip pawndesign=spaceshipswallow delay=0.1><!-- pawndesign=spaceshipcollateraldamage -->
 	  <events>
             <activity>
@@ -91,8 +91,4 @@
         </SpawnPoint>
 
-<!-- ZUM TESTEN ("-12000, -22000, 25000") 13500, 2500, 11000--
-	<DistanceTrigger name=spawntrigger2 position="-10000, -22000, 25000" target="SpaceShip" distance=10 stayActive="true" delay=0 />
-	<DistanceTrigger name="flying1" position="-10000, -22000, 25000" target="SpaceShip" distance=10 stayActive="true" delay=0 />
--->
 	<!-- Distance-Spawn-Trigger -->
 	<DistanceTrigger name=spawntrigger2 position="0, 0, 0" target="SpaceShip" distance=10 stayActive="true" delay=0 />
@@ -239,5 +235,5 @@
 	</QuestEffectBeacon>
 
-	<SimpleNotification message="The blinking light shows you the way!"  broadcast="true">
+	<SimpleNotification message="Well done!"  broadcast="true">
 		<events>
 			<trigger>
@@ -247,6 +243,14 @@
 	</SimpleNotification>
 
-
-	<BlinkingBillboard position="13500, 2500, 10500" color="1.0, 1.0, 0.05" frequency=0.6 amplitude=10 material="Examples/Flare" >
+	<SimpleNotification message="The blinking light shows you the way!"  broadcast="true" >
+		<events>
+			<trigger>
+				<EventListener event="flying1" />
+			</trigger>
+		</events>
+	</SimpleNotification>
+
+
+	<BlinkingBillboard position="11000, 1000, 7000" color="1.0, 1.0, 0.05" frequency=0.5 amplitude=10 material="Examples/Flare" >
           <events>
             <visibility>
@@ -303,6 +307,6 @@
 		</events>
 	</QuestEffectBeacon>
-<!--
-	<SimpleNotification message="Well done! Catch the spion!"  broadcast="true">
+
+	<SimpleNotification message="Well done! Catch the scout!"  broadcast="true">
 		<events>
 			<trigger>
@@ -311,7 +315,15 @@
 		</events>
 	</SimpleNotification>
--->
+
+	<SimpleNotification message="before he reachs the light!"  broadcast="true" delay=5.0 >
+		<events>
+			<trigger>
+				<EventListener event="flying2" />
+			</trigger>
+		</events>
+	</SimpleNotification>
+
 	<!-- ESCAPE -->
-	<SimpleNotification message="A spion is startet to the mainship!"  broadcast="true">
+	<SimpleNotification message="A scout is startet to the mainship!"  broadcast="true">
 		<events>
 			<trigger>
@@ -332,25 +344,4 @@
 	</QuestEffectBeacon>
 
-	<BlinkingBillboard position="13500, 2500, 10500" color="1.0, 1.0, 0.05" frequency=0.6 amplitude=10 material="Examples/Flare" >
-          <events>
-            <visibility>
-              <EventTrigger>
-		<EventTrigger invert=true>
-		  <events>
-		    <trigger>
-		      <EventListener event="flying2" />
-		    </trigger>
-		  </events>
-		</EventTrigger>
-                <events>
-                  <trigger>
-                    <EventListener event="flying1" />
-                  </trigger>
-                </events>
-	      </EventTrigger>
-            </visibility>
-          </events>
-	</BlinkingBillboard>
-	
 	<!-- ESCAPE ENDING -->
 	<!-- Spion escaped -->
@@ -452,15 +443,16 @@
 		</EventTrigger>
 	</DistanceTrigger>
-	<SimpleNotification message="flying1"  broadcast="true">
-		<events>
-			<trigger>
-				<EventListener event="flying1" />
-			</trigger>
-		</events>
-	</SimpleNotification>	
 
 	<!-- Trigger to activate the upgrade1-Quest -->
-	<DistanceTrigger name="droneTrigger" position="13500, 2500, 10500" target="SpaceShip" distance=2000 stayActive="true" delay=0.1 />
-	<SimpleNotification message="Search the drone!?"  broadcast="true">
+	<DistanceTrigger name="droneTrigger" position="11000, 1000, 7000" target="SpaceShip" distance=2000 stayActive="true" delay=0.1 />
+	<SimpleNotification message="Upgrade?"  broadcast="true">
+		<events>
+			<trigger>
+				<EventListener event="droneTrigger" />
+			</trigger>
+		</events>
+	</SimpleNotification>
+
+	<SimpleNotification message="Search the drone!"  broadcast="true" delay=5.0 >
 		<events>
 			<trigger>
@@ -491,12 +483,4 @@
 		</EventTrigger>
 	</DistanceTrigger>
-
-	<SimpleNotification message="flying2"  broadcast="true">
-		<events>
-			<trigger>
-				<EventListener event="flying2" />
-			</trigger>
-		</events>
-	</SimpleNotification>
 	
 	<!-- Helper-Trigger for the Escape-Quest -->
@@ -510,13 +494,4 @@
 		</EventTrigger>
 	</DistanceTrigger>
-	<SimpleNotification message="escape10"  broadcast="true">
-		<events>
-			<trigger>
-				<EventListener event="escape10" />
-			</trigger>
-		</events>
-	</SimpleNotification>	
-
-
 
 	<!-- DistanceTrigger for spion -->
@@ -526,4 +501,14 @@
 			<trigger>
 				<EventListener event="spionTrigger" />
+			</trigger>
+		</events>
+	</SimpleNotification>	
+
+	<!-- Helper-Trigger for Captain Hood -->
+	<DistanceTrigger name="reached" position="10000, 2000, 17000" target="SpaceShip" distance=1000 stayActive="true" delay=0.1 />
+	<SimpleNotification message="Follow Captain Hood!"  broadcast="true">
+		<events>
+			<trigger>
+				<EventListener event="reached" />
 			</trigger>
 		</events>
@@ -550,14 +535,44 @@
 		</EventTrigger>
 	</DistanceTrigger>
-	<SimpleNotification message="Spion destroyed!"  broadcast="true">
-		<events>
-			<trigger>
-				<EventListener event="destroyed" />
+
+	<SimpleNotification message="Scout destroyed!"  broadcast="true">
+		<events>
+			<trigger>
+				<EventListener event="spion5" />
 			</trigger>
 		</events>
 	</SimpleNotification>
 
-	<BlinkingBillboard position="0,-10000,42000" frequency=0.5 color="1.0,1.0,1.0" amplitude=10 material="Examples/Flare" />
-	
+	<EventTrigger name="spion5delay1" activations="1" stayactive="true" delay=5.0 >
+	  <events>
+	    <trigger>
+	      <EventListener event="spion5" />
+	    </trigger>
+	  </events>
+	</EventTrigger>
+
+	<SimpleNotification message="Your friend, Captain Hood, is near by you!"  broadcast="true">
+		<events>
+			<trigger>
+				<EventListener event="spion5delay1" />
+			</trigger>
+		</events>
+	</SimpleNotification>
+
+	<EventTrigger name="spion5delay2" activations="1" stayactive="true" delay=5.0 >
+	  <events>
+	    <trigger>
+	      <EventListener event="spion5delay1" />
+	    </trigger>
+	  </events>
+	</EventTrigger>
+
+	<SimpleNotification message="He'll show you the way to the mainship!"  broadcast="true">
+		<events>
+			<trigger>
+				<EventListener event="spion5delay2" />
+			</trigger>
+		</events>
+	</SimpleNotification>
 
 	<!-- Rescue the commander -->
@@ -640,12 +655,4 @@
 	  </events>
 	</EventTrigger>	
-
-	<SimpleNotification message="spion5"  broadcast="true">
-		<events>
-			<trigger>
-				<EventListener event="spion5" />
-			</trigger>
-		</events>
-	</SimpleNotification>
 
 <!-- For last fight -->
@@ -908,5 +915,5 @@
 
 <!-- Escape-Ship (Spion) -->
-<SpaceShip position="17000,4000,19000" lookat="-12000, -22000, 25000" name="spion" visible="true" radarname="Spion" >
+<SpaceShip position="17000,4000,19000" lookat="-12000, -22000, 25000" name="spion" visible="true" radarname="Scout" >
   <events>
     <visibility>
@@ -920,5 +927,5 @@
     <WaypointController team=1>
       <waypoints>
-        <Model mesh="cube.mesh" scale=0 position="15000,4000,19000" /> <!-- "-7000,-10000,42000" -->
+        <Model mesh="cube.mesh" scale=100 position="-7000,-10000,42000" /> <!-- "-7000,-10000,42000" -->
         <Model mesh="cube.mesh" scale=0 position="-12000, -22000, 25000" />
       </waypoints>
@@ -938,16 +945,15 @@
 
 <!-- Mainship - Pirates -->
-
 <SpaceShip position="-12000, -22000, 26000" lookat="-12000, -21300, 25700" name="lastGuard" visible="true" radarname="Pirate" >
   <events>
     <visibility>
-      <EventListener event=spawntrigger2 /> <!-- "guard2trigger4" -->
-    </visibility>
-  </events>
-  <templates>
-    <Template link=spaceshippirate />
-  </templates>
-  <controller>
-    <WaypointController team=1>
+      <EventListener event="guard2trigger4" /> <!-- "guard2trigger4" -->
+    </visibility>
+  </events>
+  <templates>
+    <Template link=spaceshippirate />
+  </templates>
+  <controller>
+    <WaypointPatrolController alertnessradius=2000 team=1 active=false>
       <waypoints>
         <Model mesh="cube.mesh" scale=0 position="-12000, -21300, 25700" />
@@ -962,8 +968,8 @@
       <events>
 	<activity>
-	  <EventListener event=spawntrigger2 /> <!-- "guard2trigger4" -->
+	  <EventListener event="guard2trigger4" /> <!-- "guard2trigger4" -->
 	</activity>
       </events>
-    </WaypointController>
+    </WaypointPatrolController>
   </controller>
 </SpaceShip>
@@ -972,12 +978,12 @@
   <events>
     <visibility>
-      <EventListener event=spawntrigger2 /> <!-- "guard2trigger4" -->
-    </visibility>
-  </events>
-  <templates>
-    <Template link=spaceshippirate />
-  </templates>
-  <controller>
-    <WaypointController team=1>
+      <EventListener event="guard2trigger4" /> <!-- "guard2trigger4" -->
+    </visibility>
+  </events>
+  <templates>
+    <Template link=spaceshippirate />
+  </templates>
+  <controller>
+    <WaypointPatrolController alertnessradius=2000 team=1 active=false>
       <waypoints>
 	<Model mesh="cube.mesh" scale=0 position="-12000, -21300, 24300" />
@@ -992,8 +998,8 @@
       <events>
 	<activity>
-	  <EventListener event=spawntrigger2 /> <!-- "guard2trigger4" -->
+	  <EventListener event="guard2trigger4" /> <!-- "guard2trigger4" -->
 	</activity>
       </events>
-    </WaypointController>
+    </WaypointPatrolController>
   </controller>
 </SpaceShip>
@@ -1002,12 +1008,12 @@
   <events>
     <visibility>
-      <EventListener event=spawntrigger2 /> <!-- "guard2trigger4" -->
-    </visibility>
-  </events>
-  <templates>
-    <Template link=spaceshippirate />
-  </templates>
-  <controller>
-    <WaypointController team=1>
+      <EventListener event="guard2trigger4" /> <!-- "guard2trigger4" -->
+    </visibility>
+  </events>
+  <templates>
+    <Template link=spaceshippirate />
+  </templates>
+  <controller>
+    <WaypointPatrolController alertnessradius=2000 team=1 active=false>
       <waypoints>
 	<Model mesh="cube.mesh" scale=0 position="-12000, -22700, 24300" />
@@ -1022,8 +1028,8 @@
       <events>
 	<activity>
-	  <EventListener event=spawntrigger2 /> <!-- "guard2trigger4" -->
+	  <EventListener event="guard2trigger4" /> <!-- "guard2trigger4" -->
 	</activity>
       </events>
-    </WaypointController>
+    </WaypointPatrolController>
   </controller>
 </SpaceShip>
@@ -1032,12 +1038,12 @@
   <events>
     <visibility>
-      <EventListener event=spawntrigger2 /> <!-- "guard2trigger4" -->
-    </visibility>
-  </events>
-  <templates>
-    <Template link=spaceshippirate />
-  </templates>
-  <controller>
-    <WaypointController team=1>
+      <EventListener event="guard2trigger4" /> <!-- "guard2trigger4" -->
+    </visibility>
+  </events>
+  <templates>
+    <Template link=spaceshippirate />
+  </templates>
+  <controller>
+    <WaypointPatrolController alertnessradius=2000 team=1 active=false>
       <waypoints>
 	<Model mesh="cube.mesh" scale=0 position="-12000, -22700, 25700" />
@@ -1052,8 +1058,8 @@
       <events>
 	<activity>
-	  <EventListener event=spawntrigger2 /> <!-- "guard2trigger4" -->
+	  <EventListener event="guard2trigger4" /> <!-- "guard2trigger4" -->
 	</activity>
       </events>
-    </WaypointController>
+    </WaypointPatrolController>
   </controller>
 </SpaceShip>
@@ -1063,12 +1069,12 @@
   <events>
     <visibility>
-      <EventListener event=spawntrigger2 /> <!-- escaped -->
-    </visibility>
-  </events>
-  <templates>
-    <Template link=spaceshippirate />
-  </templates>
-  <controller>
-    <WaypointController team=1>
+      <EventListener event="escaped" /> <!-- escaped -->
+    </visibility>
+  </events>
+  <templates>
+    <Template link=spaceshippirate />
+  </templates>
+  <controller>
+    <WaypointPatrolController alertnessradius=2000 team=1 active=false>
       <waypoints>
         <Model mesh="cube.mesh" scale=0 position="-11000, -22000, 25000" />
@@ -1083,8 +1089,8 @@
       <events>
 	<activity>
-	  <EventListener event=spawntrigger2 /> <!-- escaped -->
+	  <EventListener event="escaped" /> <!-- escaped -->
 	</activity>
       </events>
-    </WaypointController>
+    </WaypointPatrolController>
   </controller>
 </SpaceShip>
@@ -1093,12 +1099,12 @@
   <events>
     <visibility>
-      <EventListener event=spawntrigger2 /> <!-- escaped -->
-    </visibility>
-  </events>
-  <templates>
-    <Template link=spaceshippirate />
-  </templates>
-  <controller>
-    <WaypointController team=1>
+      <EventListener event="escaped" /> <!-- escaped -->
+    </visibility>
+  </events>
+  <templates>
+    <Template link=spaceshippirate />
+  </templates>
+  <controller>
+    <WaypointPatrolController alertnessradius=2000 team=1 active=false>
       <waypoints>
         <Model mesh="cube.mesh" scale=0 position="-13000, -22000, 25000" />
@@ -1113,10 +1119,56 @@
       <events>
 	<activity>
-	  <EventListener event=spawntrigger2 /> <!-- escaped -->
+	  <EventListener event="escaped" /> <!-- escaped -->
 	</activity>
       </events>
-    </WaypointController>
-  </controller>
-</SpaceShip>
+    </WaypointPatrolController>
+  </controller>
+</SpaceShip>
+
+<!-- FRIEND-SHIPS -->
+<SpaceShip position="8500, 2000, 17000" lookat="0, 0, 18000" name="friend" visible="true" radarname="Hood" >
+  <events>
+    <visibility>
+      <EventListener event="guard2trigger4" />
+    </visibility>
+  </events>
+  <templates>
+    <Template link=spaceshipswallow />
+  </templates>
+  <controller>
+    <WaypointPatrolController alertnessradius=2000 team=0 active=false>
+      <waypoints>
+        <Model mesh="cube.mesh" scale=100 position="0, -5000, 18000" />
+	<Model mesh="cube.mesh" scale=100 position="-11500, -22000, 25000" />
+      </waypoints>
+      <events>
+	<activity>
+	  <EventListener event="reached" />
+	</activity>
+      </events>
+    </WaypointPatrolController>
+  </controller>
+</SpaceShip>
+
+<BlinkingBillboard position="10000, 2000, 17000" color="1.0, 1.0, 0.05" frequency=0.5 amplitude=20 material="Examples/Flare" >
+  <events>
+    <visibility>
+      <EventTrigger>
+	<EventTrigger invert=true>
+	  <events>
+	    <trigger>
+	      <EventListener event="reached" />
+	    </trigger>
+	  </events>
+	</EventTrigger>
+        <events>
+          <trigger>
+            <EventListener event="spion5" />
+          </trigger>
+        </events>
+      </EventTrigger>
+    </visibility>
+  </events>
+</BlinkingBillboard>
 
 
@@ -1201,19 +1253,4 @@
 			enablecollisiondamage=true
 			collisionType="dynamic" />
-
-
-	<BlinkingBillboard position="-7000,-10000,42000" color="1,1,1" frequency=0.6 amplitude=100 material="Examples/Flare" >
-          <events>
-            <visibility>
-              <EventTrigger>
-                <events>
-                  <trigger>
-                    <EventListener event="spion" />
-                  </trigger>
-                </events>
-	      </EventTrigger>
-            </visibility>
-          </events>
-	</BlinkingBillboard>
 
 
@@ -1255,8 +1292,4 @@
     </Pawn>
 
-
-<!-- "-12000, -22000, 25000" -->
-
-
   </Scene>
 </Level>
