Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9986 for code/trunk


Ignore:
Timestamp:
Jan 5, 2014, 2:39:34 PM (10 years ago)
Author:
jo
Message:

Improving the first mission. Two fixes are needed to make it well playable:

  1. an end, if the countdown run out
  2. a place for the portal such that when the player flies through, the player position is right.
Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/data/levels/iJohnVane_TriptoArea51.oxw

    r9943 r9986  
    5757
    5858
    59    <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"/>       
    60 
    61    <TeamSpawnPoint team=0 position="0,0,0" direction="1,1,1" spawnclass=SpaceShip pawndesign=spaceshipescort> <!--spaceshipescort-->
    62         <events>
     59   <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"/>   
     60
     61   <TeamSpawnPoint team=0 position="0,0,0" direction="1,1,1" spawnclass=SpaceShip pawndesign=spaceshipescort>
     62         <events>
    6363            <activity>
    6464                <EventListener event="start" />
     
    6666        </events>
    6767    </TeamSpawnPoint>
     68   <!--TeamSpawnPoint team=0 position="0,94000,0" lookat="0,118000,0" spawnclass=SpaceShip pawndesign=spaceshipcollateraldamage/-->
     69
     70   <Script code="Mission setLives 1" onLoad="true"/>
    6871
    6972   <DistanceTrigger name="spawntrigger" position="0,0,0" distance=10 target="SpaceShip" stayActive="true" delay=0.1/>
     
    147150            <DistanceTrigger position="10,-202, -42" distance="800" target="Pawn"
    148151                beaconMode="exclude" targetname="bcnDestroyer" name="dockMe"/>
    149            <Billboard position="10,-202,-42" material="Flares/ringflare" colour="0.7,0.4,0.1" scale=1/>
     152       <Billboard position="10,-202,-42" material="Flares/ringflare" colour="0.7,0.4,0.1" scale=1/>
    150153        </attached>
    151154
     
    291294      <QuestDescription title="Docking" description="Our Commander got kidnapped in Area 51. Fly to the Main Station and get a better Spaceship to rescue him.
    292295
    293         Flying moves:
    294         break (S)
    295         roll     (Q) and (E)
    296         boost (Space)
    297 
    298         Whenever a new quest is added you can view it by pressing (F3). Quit this menu via (Esc)." failmessage="" completeMessage="" />
     296    Flying moves:
     297    break (S)
     298    roll     (Q) and (E)
     299    boost (Space)
     300
     301    Whenever a new quest is added you can view it by pressing (F3). Quit this menu via (Esc)." failmessage="" completeMessage="" />
    299302      <complete-effects>
    300303         <AddQuest questId="Level_Kaan.portals" />
     
    303306
    304307   <LocalQuest id="Level_Kaan.portals">
    305       <QuestDescription title="Portals" description="Now you've got a Spaceship with more health and weapons. Your next goal is to pass through the portal and find there the           wormhole to Area 51" failmessage="" completeMessage="" />
     308      <QuestDescription title="Portals" description="Now you've got a Spaceship with more health and weapons. Your next goal is to pass through the portal and find there the         wormhole to Area 51" failmessage="" completeMessage="" />
    306309      <complete-effects>
    307310         <AddQuest questId="Level_Kaan.asteroids" />
     
    341344
    342345
    343 <!------------------------------------- OBJECTS IN THIS PART ------------------------------------------>
     346<!------------------------------------- OBJECTS IN THIS PART  lookat="0,118000,0" ------------------------------------------>
    344347
    345348   <Template name=PortalDefault>
     
    351354   </Template>
    352355
    353    <PortalEndPoint position="4000,2500,4000" id="1" distance="40" target="MobileEntity" design="PortalDefault" reenterDelay="0"/>
    354    <PortalEndPoint position="0,94000,0" id="2" distance="40" target="MobileEntity" design="PortalDefault" reenterDelay="0"/>
     356   <PortalEndPoint position="5000,5800,4500" id="1" distance="40" target="MobileEntity" design="PortalDefault" reenterDelay="0"/>
     357   <PortalEndPoint position="0,94000,0" id="2" distance="40" target="MobileEntity" design="PortalDefault" reenterDelay="0" lookat="0,118000,0" />
    355358   <PortalLink fromID="1" toID="2" />
    356359   <!--<PortalLink fromID="2" toID="1" />-->
     
    358361<!-- Meteoriten, die sich bewegen -->
    359362   <?lua
    360       for i = 1, 600, 1
     363      for i = 1, 300, 1
    361364      do
    362365      j = math.random()
    363         x = math.random()
     366      x = math.random()
    364367      y = math.random()
    365         z = math.random()
     368      z = math.random()
    366369   ?>
    367370
    368    <MovableEntity       
    369       position = "<?lua print(math.random()* 1000-500) ?>,<?lua print(math.random() * 10000 + 110000) ?>,<?lua print(math.random() * 1000-500) ?>"
     371   <MovableEntity   
     372      position = "<?lua print(math.random()* 600-300) ?>,<?lua print(math.random() * 40000 + 110000) ?>,<?lua print(math.random() * 600-300) ?>"
    370373      scale = "<?lua print(j * 40)?>"
    371       velocity = "<?lua print(x*60-30)?>, <?lua print(y*60-160)?>, <?lua print(z*60-30)?>"
     374      velocity = "<?lua print(x*20-10)?>, <?lua print(y*60-160)?>, <?lua print(z*20-10)?>"
    372375      collisionType = dynamic
    373376      collisiondamage = 0.05
    374377      enablecollisiondamage = true
    375         active = true
    376    >           
    377               <events>         
    378                  <activity>             
    379                 <EventListener event="start" />                 
    380              </activity>               
    381               </events>                 
    382               <attached>               
    383                  <Model mass="<?lua print(j * 1000) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" />                           
    384               </attached>
     378      active = true
     379   >           
     380          <events>         
     381            <activity>         
     382              <EventListener event="start" />         
     383            </activity>         
     384          </events>         
     385          <attached>         
     386              <Model mass="<?lua print(j * 1000) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" />                   
     387          </attached>
    385388         <collisionShapes>
    386             <SphereCollisionShape radius="<?lua print(j * 50) ?>" />
     389             <SphereCollisionShape radius="<?lua print(j * 50) ?>" />
    387390         </collisionShapes>   
    388391   </MovableEntity>
    389392
     393   <?lua
     394      end
     395   ?>
     396
     397
     398<!-- Fiese Meteoriten, die direkt auf den Spieler zufliegen-->
     399
     400   <?lua
     401      for i = 1, 240, 1
     402      do
     403      j = math.random()
     404      x = math.random()
     405      y = math.random()
     406      z = math.random()
     407   ?>
     408   <MovableEntity   
     409      position = "<?lua print(math.random()* 240-120) ?>,<?lua print(math.random() * 40000 + 110000) ?>,<?lua print(math.random()* 240-120) ?>"
     410      scale = "10"
     411      velocity = "0, -160, 0"
     412      collisionType = dynamic
     413      collisiondamage = 0.05
     414      enablecollisiondamage = true
     415      active = true
     416   >           
     417          <events>           
     418            <activity>           
     419              <EventListener event="start" />           
     420            </activity>           
     421          </events>           
     422          <attached>           
     423              <Model mass="2000" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" />                     
     424          </attached>
     425         <collisionShapes>
     426             <SphereCollisionShape radius="10" />
     427         </collisionShapes>   
     428   </MovableEntity>
    390429   <?lua
    391430      end
     
    450489         <DistanceTriggerBeacon name="bcnDestroyer" />
    451490         <Billboard position="0,0,0" material="Portals/Default" />
    452         <DistanceTrigger name="endOfLevel" position="0,0,0" target="SpaceShip" beaconMode="exclude" targetname="bcnDestroyer" distance=50 stayActive="true" delay=0/>
    453 
     491         <DistanceTrigger name="endOfLevel" position="0,0,0" target="SpaceShip" beaconMode="exclude"
     492                          targetname="bcnDestroyer" distance=50 stayActive="true" delay=0/>
    454493        <Model mesh="HydroHarvester.mesh" mass=10 position="0,0,0" scale=50 />
    455494      </attached>
    456       <collisionShapes>
    457         <BoxCollisionShape  position="-560,0,0" halfExtents="115,100,245" /><!-- Three lower boxes -->
    458         <BoxCollisionShape  position="290,0,-480" halfExtents="115,100,245" yaw=-120 />
    459         <BoxCollisionShape  position="290,0,480" halfExtents="115,100,245" yaw=-240 />
    460         <BoxCollisionShape  position="-280,0,0" halfExtents="163,50,50" /><!-- Three lower connections -->
    461         <BoxCollisionShape  position="140,0,-240" halfExtents="163,50,50" yaw=-120 />
    462         <BoxCollisionShape  position="140,0,240" halfExtents="163,50,50" yaw=-240 />
    463         <BoxCollisionShape  position="0,530,0" halfExtents="172,52,298" /><!-- Upper Tower -->
    464         <BoxCollisionShape  position="0,530,0" halfExtents="172,52,298" yaw=-120 />
    465         <BoxCollisionShape  position="0,530,0" halfExtents="172,52,298" yaw=-240 />
    466         <BoxCollisionShape  position="0,400,0" halfExtents="43,110,26" yaw=-30 /><!-- Middle one-->
    467         <BoxCollisionShape  position="-200,100,0" halfExtents="26,50,43" /><!--Three lower legs -->
    468         <BoxCollisionShape  position="100,100,-173" halfExtents="43,50,26" yaw=-30 />
    469         <BoxCollisionShape  position="100,100,-173" halfExtents="43,50,26" yaw=30 />
    470         <BoxCollisionShape  position="-100,264,0" halfExtents="26,105,43" roll=-49 /><!--Three upper legs -->
    471         <BoxCollisionShape  position="50,264,-87" halfExtents="26,105,43" roll=-49 yaw=-120 />
    472         <BoxCollisionShape  position="50,264,87" halfExtents="26,105,43" roll=-49 yaw=-240 />
    473       </collisionShapes>
    474     </StaticEntity>
     495  </StaticEntity>
     496
     497    <OverlayGroup name="spacefightHUD" scale = "1, 1">
     498      <CountDown
     499         position    = "0.51, 0.05"
     500         pickpoint   = "0.0, 0.0"
     501         font        = "ShareTechMono"
     502         textsize    = "0.1"
     503         colour      = "1.0, 1.0, 1.0, 1.0"
     504         align       = "center"                 
     505         counter     = "110.0"
     506         speedfactor = "1.0"
     507         active      = "false"
     508      >
     509        <events>
     510          <activity>
     511            <EventListener event="portal4" />
     512          </activity>
     513        </events>
     514      </CountDown>
     515    </OverlayGroup>
     516
     517
     518  <DistanceTrigger name="HACKgameOver" position="0,94000,0" target="SpaceShip" distance=100000 stayActive="true" >
     519    <EventTrigger name="gameOver" stayActive="true" delay=10 >
     520      <events>
     521        <trigger>
     522          <EventListener event=portal4 />
     523        </trigger>
     524      </events>
     525    </EventTrigger>
     526  </DistanceTrigger>
     527
     528   <Script code="Mission endMission false" onLoad="false">
     529        <events>
     530            <trigger>
     531                <EventListener event="HACKgameOver" />
     532            </trigger>
     533        </events>
     534    </Script>
    475535
    476536 <DistanceTrigger name="portal3" position="0,94000,0" target="SpaceShip" distance=50 stayActive="true" delay=1/>
     
    484544
    485545  <DistanceTrigger name="portal4" position="0,94000,0" target="SpaceShip" distance=50 stayActive="true" delay=5/>
    486    <SimpleNotification message="Housten: Hurry up John">
     546   <SimpleNotification message="Housten: Hurry up John, time is running out!">
    487547      <events>
    488548         <trigger>
     
    530590
    531591
    532    <DistanceTrigger name="portal9" position="0,94000,0" target="SpaceShip" distance=50 stayActive="true" delay=25/>
     592   <!--DistanceTrigger name="portal9" position="0,94000,0" target="SpaceShip" distance=50 stayActive="true" delay=25/>
    533593   <SimpleNotification message="Houston: It should really look like a black hole.">
    534594      <events>
     
    564624            </trigger>
    565625        </events>
    566     </SimpleNotification>
     626    </SimpleNotification-->
    567627
    568628   <Script code="Mission endMission true" onLoad="false">
  • code/trunk/src/orxonox/gametypes/Mission.cc

    r9730 r9986  
    8686    void Mission::end()
    8787    {
     88        if (this->missionAccomplished_ && !this->gtinfo_->hasEnded())
     89            this->gtinfo_->sendAnnounceMessage("Mission accomplished!");
     90        else if (!this->gtinfo_->hasEnded())
     91            this->gtinfo_->sendAnnounceMessage("Mission failed!");
    8892        Gametype::end();
    89         if (this->missionAccomplished_)
    90             this->gtinfo_->sendAnnounceMessage("Mission accomplished!");
    91         else
    92             this->gtinfo_->sendAnnounceMessage("Mission failed!");
    9393    }
    9494
Note: See TracChangeset for help on using the changeset viewer.