Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9027 for code/branches


Ignore:
Timestamp:
Mar 14, 2012, 11:21:04 PM (13 years ago)
Author:
jo
Message:

Added in game documentation for new group behaviour.

Location:
code/branches/pCuts
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/pCuts/data/levels/presentationHS11.oxw

    r9016 r9027  
     1<!-- TODO: add in level documentation !! -->
     2
     3
    14<LevelInfo
    25 name = "Presentation HS 2011"
     
    7982        </events>
    8083    </SimpleNotification>
     84
     85
    8186
    8287
     
    131136<?lua end ?>
    132137
    133 
    134 
    135 
    136 
    137 
     138<!-- @Triggers: "hintX" <->  delayed LetsGo -->
     139    <EventTrigger name="hint1" activations="1" stayactive="true" delay=4.2>
     140      <events>
     141        <trigger>
     142          <EventListener event="LetsGo" />
     143        </trigger>
     144      </events>
     145    </EventTrigger>
     146    <EventTrigger name="hint2" activations="1" stayactive="true" delay=8.4>
     147      <events>
     148        <trigger>
     149          <EventListener event="LetsGo" />
     150        </trigger>
     151      </events>
     152    </EventTrigger>
     153    <EventTrigger name="hint3" activations="1" stayactive="true" delay=12.6>
     154      <events>
     155        <trigger>
     156          <EventListener event="LetsGo" />
     157        </trigger>
     158      </events>
     159    </EventTrigger>
     160    <EventTrigger name="hint4" activations="1" stayactive="true" delay=16.8>
     161      <events>
     162        <trigger>
     163          <EventListener event="LetsGo" />
     164        </trigger>
     165      </events>
     166    </EventTrigger>
     167    <EventTrigger name="hint5" activations="1" stayactive="true" delay=21>
     168      <events>
     169        <trigger>
     170          <EventListener event="LetsGo" />
     171        </trigger>
     172      </events>
     173    </EventTrigger>
     174    <EventTrigger name="hint6" activations="1" stayactive="true" delay=25.2>
     175      <events>
     176        <trigger>
     177          <EventListener event="LetsGo" />
     178        </trigger>
     179      </events>
     180    </EventTrigger>
     181
     182
     183
     184    <SimpleNotification message="Make bots follow you: Press (1)"  broadcast="true">
     185        <events>
     186            <trigger>
     187                <EventListener event=hint1 />
     188            </trigger>
     189        </events>
     190    </SimpleNotification>
     191
     192    <SimpleNotification message="Toggle group behaviour: Press (1)"  broadcast="true">
     193        <events>
     194            <trigger>
     195                <EventListener event=hint2 />
     196            </trigger>
     197        </events>
     198    </SimpleNotification>
     199
     200    <SimpleNotification message="Tell the bots to defend you: Press (2)"  broadcast="true">
     201        <events>
     202            <trigger>
     203                <EventListener event=hint3 />
     204            </trigger>
     205        </events>
     206    </SimpleNotification>
     207
     208    <SimpleNotification message="Make them attack opponents: Press (2)"  broadcast="true">
     209        <events>
     210            <trigger>
     211                <EventListener event=hint4 />
     212            </trigger>
     213        </events>
     214    </SimpleNotification>
     215
     216    <SimpleNotification message="Let the bots behave normal: Press (2) "  broadcast="true">
     217        <events>
     218            <trigger>
     219                <EventListener event=hint5 />
     220            </trigger>
     221        </events>
     222    </SimpleNotification>
     223
     224    <SimpleNotification message="Have a look at the console to verify this."  broadcast="true">
     225        <events>
     226            <trigger>
     227                <EventListener event=hint6 />
     228            </trigger>
     229        </events>
     230    </SimpleNotification>
    138231
    139232<!-- Generate asteroid field and asteroid belt -->
  • code/branches/pCuts/src/orxonox/gametypes/Dynamicmatch.cc

    r8858 r9027  
    3131//Low; Codeoptimierung und Dokumentation
    3232
    33 /*
    34 short gaming manual:
    35 There are three different parties a player can belong to: victim, chaser or killer
    36 Every player starts as chaser. As long as there are not enough victims and killers, you can change your and other player's parties by shooting them.
    37 In order to win you have to earn as much points as possible:
    38 - as victim by escaping the chasers
    39 - as chaser by shooting the victim
    40 - as killer by killing the chasers
    41 
    42 
    43 What you shouldn't do is shooting at players of your own party. By doing so your score will decrease.
    44 P.S: If you don't want to be a victim: Get rid of your part by shooting a chaser.
     33/**
     34@brief
     35    Short Gaming Manual:
     36    There are three different parties a player can belong to: victim, chaser or killer
     37    Every player starts as chaser. As long as there are not enough victims and killers, you can change your and other player's parties by shooting them.
     38    In order to win you have to earn as much points as possible:
     39    - as victim by escaping the chasers
     40    - as chaser by shooting the victim
     41    - as killer by killing the chasers
     42
     43
     44    What you shouldn't do is shooting at players of your own party. By doing so your score will decrease.
     45    P.S: If you don't want to be a victim: Get rid of your part by shooting a chaser.
    4546*/
    4647#include "Dynamicmatch.h"
     
    9596            ColourValue(0.3f, 0.3f, 1.0f),  //piggycolour
    9697            ColourValue(0.3f, 1.0f, 0.3f)   //killercolour  what about black: 0.0f, 0.0f, 0.0f
    97 
    9898        };
    9999        static std::vector<ColourValue> defaultcolours(colours, colours + sizeof(colours) / sizeof(ColourValue));
     
    111111        if (victim && victim->getPlayer()) //&& originator && originator->getPlayer() ??
    112112        {
    113         int target= playerParty_[victim->getPlayer()];
    114         int source= playerParty_[originator->getPlayer()];
     113            int target = playerParty_[victim->getPlayer()];
     114            int source = playerParty_[originator->getPlayer()];
    115115
    116116            //Case: Not Enough Pigs: party change (= party management)
     
    309309    /**
    310310    @brief
    311         Grant the piggy a boost.
     311        Grant the victim a boost.
    312312    @param spaceship
    313313        The SpaceShip to give the boost.
     
    315315    void Dynamicmatch::grantPigBoost(SpaceShip* spaceship)
    316316    {
    317         // Give pig boost
     317        // Give victim boost
    318318        if (spaceship)
    319319        {
     
    374374
    375375        if (this->hasStarted() && !gameEnded_)
    376         {   pointsPerTime =pointsPerTime + dt;
    377             gameTime_ = gameTime_ - dt;
    378             if (pointsPerTime > 2.0f)//hard coded!! should be changed
    379             {
    380                 pointsPerTime=0.0f;
     376        {
     377orxout() << " number of chasers:  " << numberOf[chaser] << endl;
     378orxout() << " number of killers:  " << numberOf[killer] << endl;
     379orxout() << " number of victims:  " << numberOf[piggy] << endl;
     380            pointsPerTime = pointsPerTime + dt; //increase points
     381            gameTime_ = gameTime_ - dt; // decrease game time
     382            if (pointsPerTime > 2.0f) //hard coded points for victim! should be changed
     383            {
     384                pointsPerTime = 0.0f;
    381385                rewardPig();
    382386            }
     
    408412    }
    409413
     414/**
     415    @brief The reward function is called every 2 seconds via the tick function and makes the victim score points.
     416*/
    410417    void Dynamicmatch::rewardPig()
    411418    {
     
    415422            {
    416423                 //Spieler mit der Pig-party frags++
    417                  std::map<PlayerInfo*, Player>::iterator it2 = this->players_.find(it->first);// still not sure if right syntax
     424                 std::map<PlayerInfo*, Player>::iterator it2 = this->players_.find(it->first);
    418425                 if (it2 != this->players_.end())
    419426                 {
  • code/branches/pCuts/src/orxonox/gametypes/TeamDeathmatch.cc

    r9024 r9027  
    3030
    3131#include "core/CoreIncludes.h"
    32 #include "core/ConfigValueIncludes.h"
    3332#include "chat/ChatManager.h"
    34 #include "interfaces/TeamColourable.h"
    3533#include "infos/PlayerInfo.h"
    36 #include "worldentities/TeamSpawnPoint.h"
    3734#include "worldentities/pawns/Pawn.h"
    3835
  • code/branches/pCuts/src/orxonox/gametypes/TeamGametype.cc

    r9016 r9027  
    8989    }
    9090
     91    /**
     92    @brief
     93        Function that determines the player's team number when entering the game for the first time.
     94        Override this function for other team structures.
     95    */
    9196    void TeamGametype::findAndSetTeam(PlayerInfo* player)
    9297    {
     
    130135            this->allowedInGame_.erase(player);
    131136        }
    132 
    133137
    134138        return valid_player;
Note: See TracChangeset for help on using the changeset viewer.