Changeset 8875
- Timestamp:
- Sep 4, 2011, 10:27:17 PM (13 years ago)
- Location:
- code/branches/ai2
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/ai2/data/levels/missionOne.oxw
r8874 r8875 49 49 <WorldAmbientSound source="Mars.ogg" looping="true" playOnLoad="true" /> <!-- AlphaCentauri.ogg--> 50 50 51 52 51 <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"/> 53 <SpawnPoint team=0 position=" -200,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff />54 <!-- Script code="artificialcontroller setbotlevel 0.1" /--> 52 <SpawnPoint team=0 position="800,700,600" direction="-1,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff /> 53 55 54 56 55 <!-- END OF INCLUDES & NECESSARITIES --> 57 56 58 <!-- QUESTS: TODO! STORY!! 59 <LocalQuest id="orxonox-weaponsystem-check"> 60 <QuestDescription title="Tutorial" description=" " /> //The description of the quest. 61 <subquests> 57 <LocalQuest id="missionOne.basicFlying"> 58 <QuestDescription title="Flying" description="INSERT STORY HERE. The first thing you have to learn is flying. Use 'W' to accelerate and steer with your mouse. In order to know where to fly there are two detection systems. The navigation markers highlite important objects directly in the level. If you can't directly see those objects, there are arrows which indicate how you have to steer. The second device is the radar. There you get an overview of all objects near you. In order to find an object that you spotted on radar, you have to steer in a way that the corresponding dot is in the center of the radar. Now you can find the corresponding object straight ahead. Your goal is to fly to the first waypoint. It's that orange dot on the radar." failmessage="" completeMessage="Well done." /> 59 <!--subquests> 62 60 <Quest id ="questId1" /> 63 61 <Quest id="questIdn" /> … … 77 75 ... 78 76 <QuestEffect /> 79 </complete-effects> 80 </LocalQuest--> 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 77 </complete-effects--> 78 </LocalQuest> 79 80 <LocalQuest id="missionOne.weaponsystemI"> 81 <QuestDescription title="Weaponsystem I" description="INSERT STORY HERE. Test your four different weapons on the four boxes. The four weapons are laser (left click), plasma (right click), self targeting rockets (middle click) and manual rockets (press 'T'). Attention if you use manual rockets: Press 'T' only once to start the rocket. If you miss your target you can get out of the rocket, by clicking or pressing 'T' once more." failmessage="" completeMessage="All right." /> 82 <!--subquests> 83 <Quest id ="questId1" /> 84 <Quest id="questIdn" /> 85 </subquests> 86 <hints> 87 <QuestHint id="hintId1" /> 88 89 "The laser is a standard weapon. It is fast and precise but does not deal much damage." 90 "That was the lightning gun. Its plasma munition is quite slow, but a normal spaceship can't take more than three hits of such a strong weapon. That could be your favourite weapon for close range combat or if you want to hit a really slow enemy." 91 "The target seeking rockets follow slow targets on their own." 92 "Task complete. Manual rockets are your most powerful weapon. But since you have to steer it to your target yourself, you will leave your spaceship unprotected for a while. The total amount of both manual and target seeking rockets is limited to 10." 93 94 95 <QuestHint id="hintIdn" /> 96 </hints> 97 <fail-effects> 98 <QuestEffect /> 99 ... 100 <QuestEffect /> 101 </fail-effects> 102 <complete-effects> 103 <QuestEffect /> 104 ... 105 <QuestEffect /> 106 </complete-effects--> 107 </LocalQuest> 108 109 110 111 112 113 <QuestEffectBeacon position="800,700,600" times="1"> 114 <effects> 115 <AddQuest questId="missionOne.basicFlying" /> 116 </effects> 117 <events> 118 <execute> 119 <EventListener event="questStart"/> 120 </execute> 121 </events> 122 <attached> 123 <DistanceTrigger name="questStart" position="0,0,0" distance="50" target="Pawn" beaconMode="identify" targetname="PlayerDistanceTrigger" delay="2" /> 124 </attached> 125 </QuestEffectBeacon> 99 126 100 127 101 128 <!-- TUTORIAL-TODO: --> 102 103 <!-- 1. Aiming & Weapons (static targets, moving targets, dangerous targets)--> <!-- 3 Mouse buttons + "T"--> 104 <!-- 2. Flying & manoeuvring (basic flying, using pickups, forcefields, docks & portals) --> <!-- "W","S","SPACE"--> 129 <!-- 1. Flying & manoeuvring (basic flying, using pickups, forcefields, docks & portals) --> <!-- "W","S","SPACE"--> 130 <!-- 2. Aiming & Weapons (static targets, moving targets, dangerous targets)--> <!-- 3 Mouse buttons + "T"--> 105 131 <!-- 3. Game handling (quests, knowing when a game is over :-), pausing, chat, ... ) --> <!--"F3", "F2", "ESC" --> 106 132 <!-- 4. Extras (other things to discover) --> <!-- "Q","E","A","D","C", "CTRL", "", ... --> 107 133 108 134 <!-- 109 Four boxes for aiming 110 111 TODO: display text: "Destroy those four boxes. Aim the a the box and shoot by using the left mouse button." 112 "The laser is a standard weapon. It is fast and precise but does not deal much damage. Now do the same with the next target, but right click instead." 113 "That was the lightning gun. Its plasma munition is quite slow, but a normal spaceship can't take more than three hits of such a strong weapon. That should be your favourite in close range combat or if you want to hit a really slow enemy. Try to destroy the next box by right clicking at it." 114 "The target seeking rockets follow their target on their own and the explosive load shouldn't be underestimated. Now its time to hit the last target with the hand guided rocket. You can release one by pressing T once. Note: If you miss the target, you can get out of the rocket by clicking or pressing T once more." 115 116 "Task complete. Manual rockets are your most powerful weapon. But since you have to steer it to your target yourself, you will leave your spaceship unprotected for a while. Now lets move to a slightly more difficult target. Take a look at your radar. The red dot is an enemy's ship. Try to turn your ship towards it, such that the red dot is in the radar's centre. You should be able to see it then directly. Your task is to destroy it." 135 136 117 137 118 138 "Lets start flying. Use W to accelerate and S to brake. The goal is to reach the spacestation which is displayed on the radar. If you want to be faster you can temporarily boost by hitting additionally the space button. If you use too much boost your engine heats up and you won't be able to use boost for a while. By the way boost could be useful during combat .." … … 120 140 --> 121 141 122 <DistanceTrigger name="spawndelaytrigger0" position=" -200,0,0" target="Pawn" distance=10 stayActive="true"/>142 <DistanceTrigger name="spawndelaytrigger0" position="800,700,600" target="Pawn" distance=10 stayActive="true"/> 123 143 <SimpleNotification message="Welcome to the Orxonox Tutorial."> 124 144 <events> … … 129 149 </SimpleNotification> 130 150 <!-------------------------------------- PART ZERO: How to fly ---------------------------------------> 151 152 153 154 155 156 157 158 159 160 131 161 132 162 <!-------------------------------------- PART ONE : Destroy boxes ---------------------------------------> … … 716 746 717 747 <!-- TODO: 718 - better performance: 4-8 Transporters from different directions heading towards duball's station719 - attached with triggers: - if all bots died, then display end message720 - do a count down: 'x enemies left'721 748 - update spaceshipTransporter 722 749 - bots do friendly fire (is drone function reusable?) … … 1152 1179 </events> 1153 1180 </Script--> 1154 1181 <!-- Script code="artificialcontroller setbotlevel 0.1" /--> 1155 1182 </Scene> 1156 1183 </Level> -
code/branches/ai2/src/modules/overlays/hud/HUDNavigation.cc
r8874 r8875 164 164 165 165 unsigned int markerCount_ = 0; 166 bool closeEnough_ = false; // inly display objects that are close enough to be relevant for the player166 bool closeEnough_ = false; //only display objects that are close enough to be relevant for the player 167 167 // for (ObjectMap::iterator it = activeObjectList_.begin(); it != activeObjectList_.end(); ++it) 168 168 for ( sortedList::iterator listIt = sortedObjectList_.begin(); listIt != sortedObjectList_.end(); ++markerCount_, ++listIt ) 169 169 { 170 170 ObjectMap::iterator it = activeObjectList_.find ( listIt->first ); 171 if( detectionLimit_ < 0 ) 172 closeEnough_ = true ; 173 else 174 closeEnough_ = listIt->second < detectionLimit_ ; 175 if ( markerCount_ < markerLimit_ && closeEnough_ ) // display on HUD íf statement is true 171 closeEnough_ = listIt->second < detectionLimit_ ; 172 if ( markerCount_ < markerLimit_ && (closeEnough_ || detectionLimit_ < 0) ) // display on HUD if the statement is true 176 173 { 177 174 -
code/branches/ai2/src/modules/overlays/hud/HUDRadar.cc
r8874 r8875 124 124 125 125 void HUDRadar::objectChanged( RadarViewable* rv ) 126 { 127 if(rv == dynamic_cast<RadarViewable*>(this->owner_)) //case: player changed 128 return; 129 if( showObject(rv) == false ) //case: (radar) invisible object changed 130 return; 131 if( this->radarObjects_.find(rv) == this->radarObjects_.end() ) // if (radar) invisibility becomes (radar) visible 132 this->addObject(rv); 133 assert( this->radarObjects_.find(rv) != this->radarObjects_.end() ); 134 Ogre::PanelOverlayElement* panel = this->radarObjects_[rv]; 135 panel->setMaterialName(TextureGenerator::getMaterialName( 136 shapeMaterials_[rv->getRadarObjectShape()], rv->getRadarObjectColour())); 126 {// The new implementation behaves more precisely, since inactive RadarViewables are not displayed anymore. 127 this->removeObject(rv); 128 this->addObject(rv); 137 129 } 138 130 -
code/branches/ai2/src/orxonox/LevelManager.cc
r8706 r8875 87 87 void LevelManager::setConfigValues() 88 88 { 89 SetConfigValue(defaultLevelName_, " presentationDM.oxw")89 SetConfigValue(defaultLevelName_, "missionOne.oxw") 90 90 .description("Sets the pre selection of the level in the main menu."); 91 91 } … … 158 158 if (this->levels_.size() > 0) 159 159 { 160 // Activate the level that is the first in the list of levels whose activity has been requested. 160 // Activate the level that is the first in the list of levels whose activity has been requested. 161 161 this->levels_.front()->setActive(true); 162 162 // Make every player enter the newly activated level. … … 272 272 Loader::unload(&file); 273 273 274 if(info == NULL) 274 if(info == NULL) 275 275 { 276 276 // Create a default LevelInfoItem object that merely contains the name -
code/branches/ai2/src/orxonox/interfaces/RadarViewable.h
r7163 r8875 38 38 #include "core/OrxonoxClass.h" 39 39 #include "core/SmartPtr.h" 40 40 //TODO: if a RadarViewable changes visibility or activity, the event is not correctly working 41 41 namespace orxonox 42 42 { -
code/branches/ai2/src/orxonox/worldentities/pawns/Pawn.cc
r8758 r8875 452 452 this->isHumanShip_ = true; 453 453 } 454 455 void Pawn::changedActivity(void) 456 { 457 SUPER(Pawn, changedActivity); 458 459 this->setRadarVisibility(this->isActive()); 460 } 461 462 void Pawn::changedVisibility(void) 463 { 464 SUPER(Pawn, changedVisibility); 465 //this->setVisible(this->isVisible()); 466 this->setRadarVisibility(this->isVisible()); 467 } 468 454 469 } -
code/branches/ai2/src/orxonox/worldentities/pawns/Pawn.h
r8852 r8875 170 170 virtual const Vector3& getCarrierPosition(void) const 171 171 { return this->getWorldPosition(); }; 172 virtual void changedActivity(void); //!< To enable radarviewability when the activity is changed 173 virtual void changedVisibility(void); //!< To enable proper radarviewability when the visibility is changed 172 174 173 175 protected:
Note: See TracChangeset
for help on using the changeset viewer.