[Orxonox-commit 6183] r10841 - code/branches/campaignHS15/data/levels

paulsc at orxonox.net paulsc at orxonox.net
Mon Nov 23 17:01:15 CET 2015


Author: paulsc
Date: 2015-11-23 17:01:15 +0100 (Mon, 23 Nov 2015)
New Revision: 10841

Modified:
   code/branches/campaignHS15/data/levels/shuttleAttack.oxw
   code/branches/campaignHS15/data/levels/shuttleRetaliation.oxw
Log:
Worked on retaliation level.

Modified: code/branches/campaignHS15/data/levels/shuttleAttack.oxw
===================================================================
--- code/branches/campaignHS15/data/levels/shuttleAttack.oxw	2015-11-23 15:56:50 UTC (rev 10840)
+++ code/branches/campaignHS15/data/levels/shuttleAttack.oxw	2015-11-23 16:01:15 UTC (rev 10841)
@@ -191,7 +191,7 @@
 
 
 
-    <EventMultiTrigger name="spawntrigger">
+    <EventMultiTrigger name="spawntrigger" activations=1>
         <events>
             <trigger>
                 <EventListener event="playerSpawn" />

Modified: code/branches/campaignHS15/data/levels/shuttleRetaliation.oxw
===================================================================
--- code/branches/campaignHS15/data/levels/shuttleRetaliation.oxw	2015-11-23 15:56:50 UTC (rev 10840)
+++ code/branches/campaignHS15/data/levels/shuttleRetaliation.oxw	2015-11-23 16:01:15 UTC (rev 10841)
@@ -41,15 +41,26 @@
     <!-- GLOBAL LUA VARIABLES -->
     <?lua
 
+        units = 1
+
         --[[ Coordinates in (y,z,x). NOTE: Indexing starts at 1 in lua! Don“t forget to adapt the for loops, too! ]]--
         cCenter = {0, 0, 0}
-        cSpawn = {-50, 0, 0}
+        cSpawn = {-2000, 2000, 2000}
+        cSector = {2000, 2000, 2000}
+        cBeacon = {1500, 1500, 1500}
 
-        cField1 = {400, 0, 2500}
-        cField2 = {400, 0, -2500}
-        cPlanet1 = {8000, -2000, 15000}
-        cPlanet2 = {-20000, 4000, -1000}
+        cAlly1 = {-100, 0, 0}
+        cEnemy1 = {1000, 0, 0}
 
+        cPlanet1 = {-9000, -8000, 14000}
+        cPlanet2 = {12000, -1500, -10000}
+
+        cEnemyBasePlanet = {-20000, -5500, -8000}
+
+        cField1 = {-5000, -4000, -3000}
+        cField2 = {4000, 2000, 4500}
+
+
         --[[ Function to print Coordinates. Quotes not included! ]]--
         function printC(coord)
           print(coord[1] .. [[,]] .. coord[2] .. [[,]] .. coord[3])
@@ -62,7 +73,7 @@
         hasPhysics = true
     >
 
-    <SpawnPoint name="playerSpawn" team=0 position="<?lua printC(cSpawn) ?>" lookat="<?lua printC(cCenter) ?>" spawnclass=SpaceShip pawndesign=spaceshipescort />
+    <TeamSpawnPoint name="playerSpawn" team=0 position="<?lua printC(cSpawn) ?>" lookat="<?lua printC(cCenter) ?>" spawnclass=SpaceShip pawndesign=spaceshipescort />
 
     <WorldAmbientSound source="Earth.ogg" looping="true" playOnLoad="true" />
 
@@ -71,7 +82,7 @@
     <!--QUEST DEFINITIONS-->
 
     <GlobalQuest id="quest1">
-        <QuestDescription title="Quest 1" description="" failMessage="" completeMessage="" />
+        <QuestDescription title="Enter Sector 5C" description="It is time to retaliate against the aggressors. Get back to Sector 5C to kill every last one of them!" failMessage="" completeMessage="" />
         <hints>
         </hints>
         <complete-effects>
@@ -79,12 +90,39 @@
         </complete-effects>
     </GlobalQuest>
 
+    <GlobalQuest id="quest2">
+        <QuestDescription title="Find them" description="It seems they have hiden themselves, that is, their whole civilization, in fear of retaliation. Our scientists presume some cloaking technology to be in use. Look out for a way to make the aggressors visible!" failMessage="" completeMessage="" />
+        <hints>
+            <QuestHint id="quest2hint1">
+                <QuestDescription title="The detector beacon" description="Our scientists claim cloaking is generally toggled by a visible Switch called a detector beacon. Try to find a bright light in your Area and approach it" />
+            </QuestHint>
+        </hints>
+        <complete-effects>
+            <AddQuest questId="quest3" />
+        </complete-effects>
+    </GlobalQuest>
+
+    <GlobalQuest id="quest3">
+        <QuestDescription title="Fight their army" description="You have successfully uncovered their civilization and home planet, and it is much worse than we thought... they came prepared! You have to fight their army to fulfill your mission." failMessage="" completeMessage="" />
+        <hints>
+        </hints>
+        <complete-effects>
+            <AddQuest questId="quest4" />
+        </complete-effects>
+    </GlobalQuest>
+
+    <GlobalQuest id="quest4">
+        <QuestDescription title="Destroy their civilisation" description="You have successfully uncovered their civilization and home planet, and it is much worse than we thought... they came prepared! You have to fight their army to fulfill your mission." failMessage="" completeMessage="" />
+        <hints>
+        </hints>
+    </GlobalQuest>
+
     <!--EVENTS AND TRIGGERS
         Usable events and triggers:
         spawntrigger
     -->
 
-    <EventMultiTrigger name="spawntrigger">
+    <EventMultiTrigger name="spawntrigger" activations=1>
         <events>
             <trigger>
                 <EventListener event="playerSpawn" />
@@ -92,6 +130,24 @@
         </events>
     </EventMultiTrigger>
 
+    <DistanceTrigger name="reachedSector" position="<?lua printC(cSector) ?>" distance=1000 target="SpaceShip" beaconMode="exclude" targetname="NPC" stayactive=true />
+
+    <EventMultiTrigger name="hintBeacon">
+        <events>
+            <trigger>
+                <EventTrigger stayactive="true" delay=90 >
+                   <events>
+                      <trigger>
+                         <EventListener event="reachedSector" />
+                      </trigger>
+                   </events>
+                </EventTrigger>
+            </trigger>
+        </events>
+    </EventMultiTrigger>
+
+    <DistanceTrigger name="cloakBeacon" position="<?lua printC(cBeacon) ?>" distance=100 target="SpaceShip" beaconMode="exclude" targetname="NPC" stayactive=true />
+
     <!--TODO: Complete the DistanceTriggers for completing/succeeding correctly! -->
 
     <DistanceTrigger active=false name="missionComplete" position="2000,0,0" distance=100 target="SpaceShip" stayactive=true>
@@ -139,9 +195,42 @@
         </events>
     </QuestEffectBeacon>
 
+    <QuestEffectBeacon times=1>
+        <effects>
+            <CompleteQuest questId="quest1" />
+        </effects>
+        <events>
+            <execute>
+                <EventListener event="reachedSector" />
+            </execute>
+        </events>
+    </QuestEffectBeacon>
+
+    <QuestEffectBeacon times=1>
+        <effects>
+            <AddQuestHint hintId="quest2hint2" />
+        </effects>
+        <events>
+            <execute>
+                <EventListener event="hintBeacon" />
+            </execute>
+        </events>
+    </QuestEffectBeacon>
+
+    <QuestEffectBeacon times=1>
+        <effects>
+            <CompleteQuest questId="quest2" />
+        </effects>
+        <events>
+            <execute>
+                <EventListener event="cloakBeacon" />
+            </execute>
+        </events>
+    </QuestEffectBeacon>
+
     <!--NOTIFICATIONS -->
 
-    <SimpleNotification broadcast="true" message="Welcome, Commander.">
+    <SimpleNotification broadcast="true" message="Welcome, Commander. It is time to retaliate!">
         <events>
             <trigger>
                 <EventTrigger stayactive="true" delay=4 >
@@ -155,15 +244,169 @@
         </events>
     </SimpleNotification>
 
-    <!--STATIONS -->
+    <SimpleNotification broadcast="true" message="Get to section 5C and erradicate the aggressors!">
+        <events>
+            <trigger>
+                <EventTrigger stayactive="true" delay=8 >
+                   <events>
+                      <trigger>
+                         <EventListener event="spawntrigger" />
+                      </trigger>
+                   </events>
+                </EventTrigger>
+            </trigger>
+        </events>
+    </SimpleNotification>
 
+    <SimpleNotification broadcast="true" message="That seems extreme. Is there no way around it?">
+        <events>
+            <trigger>
+                <EventTrigger stayactive="true" delay=12 >
+                   <events>
+                      <trigger>
+                         <EventListener event="spawntrigger" />
+                      </trigger>
+                   </events>
+                </EventTrigger>
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+     <SimpleNotification broadcast="true" message="Stick to your objective, Commander. This is war.">
+        <events>
+            <trigger>
+                <EventTrigger stayactive="true" delay=16 >
+                   <events>
+                      <trigger>
+                         <EventListener event="spawntrigger" />
+                      </trigger>
+                   </events>
+                </EventTrigger>
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <!--SHIPS -->
+
+    <!--Allied units-->
+
+    
+
+    <SpaceShip position="<?lua printC(cAlly1) ?>" lookat="0,0,0" name="leader1">
+      <templates>
+        <Template link=spaceshipassff />
+      </templates>
+      <controller>
+        <DivisionController team=0 formationMode="DIAMOND" action="FIGHT">
+        </DivisionController>
+      </controller>
+    </SpaceShip>
+
+    <SpaceShip position="100 ,0,100" lookat="0,0,0">
+      <templates>
+        <Template link=spaceshipassff />
+      </templates>
+      <controller>
+        <WingmanController team=0>
+        </WingmanController>
+      </controller>
+    </SpaceShip>
+
+    <SpaceShip position="0, -100,0" lookat="0,0,0">
+      <templates>
+        <Template link=spaceshipassff />
+      </templates>
+      <controller>
+        <WingmanController team=0>
+        </WingmanController>
+      </controller>
+    </SpaceShip>
+
+    <SpaceShip position="-100, 0, 100" lookat="0,0,0">
+      <templates>
+        <Template link=spaceshipassff />
+      </templates>
+      <controller>
+        <SectionController team=0>
+        </SectionController>
+      </controller>
+    </SpaceShip>
+
+    
+    
+    <!-- Enemy Units -->
+
+
+    <?lua
+    for k = 1, units, 1
+    do
+    x = math.cos(math.pi/(2*units - 2)*k)*1500
+    y = math.sin(math.pi/(2*units - 2)*k)*1500
+    ?>
+
+    <SpaceShip team=1 position="<?lua printC(cEnemy1) ?>" lookat="0,0,0" name="enemy<?lua print(k) ?>">
+      <templates>
+        <Template link=spaceshipassff />
+      </templates>
+      <controller>
+        <DivisionController team=1 formationMode="DIAMOND" action="FIGHT">
+        </DivisionController>
+      </controller>
+    </SpaceShip>
+
+    <SpaceShip team=1 position="100 ,0,100" lookat="0,0,0" name="enemy<?lua print(k) ?>">
+      <templates>
+        <Template link=spaceshipassff />
+      </templates>
+      <controller>
+        <WingmanController team=1>
+        </WingmanController>
+      </controller>
+    </SpaceShip>
+
+    <SpaceShip team=1 position="0, -100,0" lookat="0,0,0" name="enemy<?lua print(k) ?>">
+      <templates>
+        <Template link=spaceshipassff />
+      </templates>
+      <controller>
+        <WingmanController team=1>
+        </WingmanController>
+      </controller>
+    </SpaceShip>
+
+    <SpaceShip team=1 position="-100, 0, 100" lookat="0,0,0" name="enemy<?lua print(k) ?>">
+      <templates>
+        <Template link=spaceshipassff />
+      </templates>
+      <controller>
+        <SectionController team=1>
+        </SectionController>
+      </controller>
+    </SpaceShip>
+
+    <?lua end ?>
+    
     <!--ELEMENTS -->
 
-    <!-- Planets from the shuttle defense Level. Remove or keep at will. -->
+    <!-- Asteroids you have to fly through to get to the EnemyBase -->
+    
+    <?lua
+        dofile("includes/asteroidField.lua")
+       asteroidField(cField1[1], cField1[2], cField1[3], 20, 30, 4500, 500, 0)
+    ?>    
 
-    <Planet
+    <!-- Other Asteroid-Fields -->
+
+    <?lua
+        dofile("includes/asteroidField.lua")
+       asteroidField(cField2[1], cField2[2], cField2[3], 20, 30, 4500, 500, 0)
+    ?> 
+
+    <!-- Planets -->
+
+   <Planet
         position="<?lua printC(cPlanet1) ?>"
-        scale="2000"
+        scale="3000"
         collisionType="dynamic"
         linearDamping="0.8"
         angularDamping="0"
@@ -177,29 +420,31 @@
         imagesize="1024.0f"
         collisiondamage = 2
         enablecollisiondamage = true
+    visible=true
+    active=true
       >
       <attached>
-        <ForceField position="0,0,0" mode="sphere" diameter="4000" velocity="-500" />
+        <ForceField position="0,0,0" mode="sphere" diameter="6000" velocity="-500" />
         </attached>
           <collisionShapes>
-            <SphereCollisionShape radius="2000" position="0,0,0" />
+            <SphereCollisionShape radius="3000" position="0,0,0" />
       </collisionShapes>
     </Planet>
 
     <?lua
         dofile("includes/asteroidField.lua")
-        asteroidBelt(cPlanet1[1], cPlanet1[2], cPlanet1[3], 30, 0, 30, 20, 40, 2800, 3000, 200, 1)
+        asteroidBelt(cPlanet1[1], cPlanet1[2], cPlanet1[3], 30, 20, 100, 20, 40, 3400, 3700, 400, 1)
     ?>
 
     <Planet
         position="<?lua printC(cPlanet2) ?>"
-        scale="3000"
+        scale="2000"
         collisionType="dynamic"
         linearDamping="0.8"
         angularDamping="0"
         mass="5000000"
         pitch="0"
-        mesh="planets/planet3.mesh"
+        mesh="planets/ganymede.mesh"
         atmosphere="atmosphere1"
         rotationaxis="1,0,0"
         rotationrate="1.0"
@@ -207,12 +452,14 @@
         imagesize="1024.0f"
         collisiondamage = 2
         enablecollisiondamage = true
+    visible=true
+    active=true
       >
       <attached>
-        <ForceField position="0,0,0" mode="sphere" diameter="6000" velocity="-500" />
+        <ForceField position="0,0,0" mode="sphere" diameter="4000" velocity="-500" />
         </attached>
           <collisionShapes>
-            <SphereCollisionShape radius="3000" position="0,0,0" />
+            <SphereCollisionShape radius="2000" position="0,0,0" />
       </collisionShapes>
     </Planet>
 
@@ -221,5 +468,34 @@
         asteroidBelt(cPlanet2[1], cPlanet2[2], cPlanet2[3], 30, 20, 100, 20, 40, 3400, 3700, 400, 1)
     ?>
 
+    <!-- EnemyPlanet(s) -->
+
+    <Planet
+        position="<?lua printC(cEnemyBasePlanet) ?>"
+        scale="5000"
+        collisionType="dynamic"
+        linearDamping="0.8"
+        angularDamping="0"
+        mass="5000000"
+        pitch="0"
+        mesh="planets/jupiter.mesh"
+        atmosphere="atmosphere1"
+        rotationaxis="1,0,0"
+        rotationrate="1.0"
+        atmospheresize="80.0f"
+        imagesize="1024.0f"
+        collisiondamage = 2
+        enablecollisiondamage = true
+    visible=true
+    active=true
+      >
+      <attached>
+        <ForceField position="0,0,0" mode="sphere" diameter="10000" velocity="-500" />
+        </attached>
+          <collisionShapes>
+            <SphereCollisionShape radius="5000" position="0,0,0" />
+      </collisionShapes>
+    </Planet>
+
     </Scene>
 </Level>




More information about the Orxonox-commit mailing list