Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6935 for code/branches


Ignore:
Timestamp:
May 20, 2010, 2:50:59 PM (14 years ago)
Author:
dafrick
Message:

Some changed in a level also in Triggers…

Location:
code/branches/presentation3
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation3/data/levels/Level(Deathmatch).oxw

    r6920 r6935  
    6060  gametype=TeamDeathmatch
    6161>
     62    <lodinformation>
     63            <MeshLodInformation mesh=Transporter.mesh lodQuality=10 />
     64    </lodinformation>
    6265
    6366        <!-- Ausgang: Szene ===> ambientlight/skybox -->
     
    8285
    8386                <!--Spieler Spawnpoint ===> position/direction-->
    84                 <SpawnPoint position="150,0,-50" direction="2000,0,-1000" spawnclass=SpaceShip pawndesign=spaceshipassffplayer team=0 active="true" >
     87                <SpawnPoint position="150,0,-50" direction="2000,0,-1000" spawnclass=SpaceShip pawndesign=spaceshipassffplayer team=0 active="true" name=spawn1>
     88                        <events>
     89                                <activity>
     90                                        <EventListener event="activateFirstSpawnpoint" />
     91                                </activity>
     92                        </events>
     93                        <attached>
     94                            <Billboard position="0,0,0" colour="0,1.0,0" material="Examples/Flare"/>
     95                        </attached>
     96                </SpawnPoint>
     97
     98                <SpawnPoint position="10000,0,3000" direction="2000,0,-1000" spawnclass=SpaceShip pawndesign=spaceshipassffplayer team=0 active="false" name=spawn2>
    8599                        <events>
    86100                                <activity>
     
    88102                                </activity>
    89103                        </events>
    90                 </SpawnPoint>
    91 
    92                 <SpawnPoint position="10000,0,3000" direction="2000,0,-1000" spawnclass=SpaceShip pawndesign=spaceshipassffplayer team=0 active="false" >
    93                         <events>
    94                                 <activity>
    95                                         <EventListener event="activateSecondSpawnpoint" />
    96                                 </activity>
    97                         </events>
     104                        <attached>
     105                            <Billboard position="0,0,0" colour="1.0,0,0" material="Examples/Flare"/>
     106                        </attached>
    98107                </SpawnPoint>
    99108
     
    231240<!--Erstellen des Asteroidenfeldes___FUNKTIONIERT_________________________________________________________________________________________________________________________________________OK-->
    232241
    233                 <StaticEntity position="3000,0,-1000">
     242                <?lua for i=0,100,1 do
     243                x=math.random(250,4000)
     244                y=math.random(-500,500)
     245                z=math.random(1000,2000)
     246                scale=math.random(20,70)
     247                ?>
     248                <MovableEntity collisionType=kinematic linearDamping=0.8 angularDamping=0 mass="<?lua print(scale * 5) ?>" position="<?lua print(x) ?>,<?lua print(y) ?>,<?lua print(z) ?>" rotationaxis="<?lua print(math.random()) ?>,<?lua print(math.random()) ?>,<?lua print(math.random()) ?>" rotationrate="<?lua print(math.random()*15) ?>">
    234249                        <attached>
    235                                 <?lua for i=0,100,1 do
    236                                 x=math.random(250,4000)
    237                                 y=math.random(-500,500)
    238                                 z=math.random(1000,2000)
    239                                 scale=math.random(20,70)
    240                                 ?>
    241                                 <MovableEntity collisionType=kinematic linearDamping=0.8 angularDamping=0 mass="<?lua print(scale * 5) ?>" position="<?lua print(x) ?>,<?lua print(y) ?>,<?lua print(z) ?>" rotationaxis="<?lua print(math.random()) ?>,<?lua print(math.random()) ?>,<?lua print(math.random()) ?>" rotationrate="<?lua print(math.random()*15) ?>">
    242                                         <attached>
    243                                                 <Model scale=<?lua print(scale) ?> mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false/>
    244                                         </attached>
    245                                         <collisionShapes>
    246                                         <SphereCollisionShape radius="<?lua print(scale * 3) ?>" />
    247                                         </collisionShapes>
    248                                 </MovableEntity>
    249                                 <?lua end ?>
     250                                <Model scale=<?lua print(scale) ?> mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false/>
    250251                        </attached>
    251                 </StaticEntity>
     252                        <collisionShapes>
     253                                <SphereCollisionShape radius="<?lua print(scale * 3) ?>" />
     254                                </collisionShapes>
     255                </MovableEntity>
     256                <?lua end ?>
    252257
    253258<!--Erstellen des Ateroidenfeldes______ENDE__________________________________________________________________________________________________________________________________________________-->
     
    255260<!--Erstellen von Asteroiden die zufaellig plaziert sind___________________________________________________________________________________________________________________________________OK-->
    256261
    257                 <StaticEntity position="0,0,0">
    258                         <attached>
    259                                 <?lua for i=0,150,1 do
    260                                 x=math.random(-8000,8000)
    261                                 y=math.random(-8000,8000)
    262                                 z=math.random(-8000,8000)
    263                                 ?>
    264                                 <MovableEntity collisionType=kinematic linearDamping=0.8 angularDamping=0 mass="<?lua print(scale * 5) ?>" position="<?lua print(x) ?>,<?lua print(y) ?>,<?lua print(z) ?>" rotationaxis="<?lua print(math.random()) ?>,<?lua print(math.random()) ?>,<?lua print(math.random()) ?>" rotationrate="<?lua print(math.random()*15) ?>" >
    265                                         <attached>
    266                                                 <Model scale=<?lua print(math.random(20,70)) ?> mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false/>
    267                                         </attached>
    268                                         <collisionShapes>
    269                                         <SphereCollisionShape radius="<?lua print(scale * 3) ?>" />
    270                                         </collisionShapes>
    271                                 </MovableEntity>
    272                                 <?lua end ?>
    273                         </attached>
    274                 </StaticEntity>
     262        <?lua for i=0,150,1 do
     263        x=math.random(-8000,8000)
     264        y=math.random(-8000,8000)
     265        z=math.random(-8000,8000)
     266        ?>
     267        <MovableEntity collisionType=kinematic linearDamping=0.8 angularDamping=0 mass="<?lua print(scale * 5) ?>" position="<?lua print(x) ?>,<?lua print(y) ?>,<?lua print(z) ?>" rotationaxis="<?lua print(math.random()) ?>,<?lua print(math.random()) ?>,<?lua print(math.random()) ?>" rotationrate="<?lua print(math.random()*15) ?>" >
     268                <attached>
     269                        <Model scale=<?lua print(math.random(20,70)) ?> mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false/>
     270                </attached>
     271                <collisionShapes>
     272                        <SphereCollisionShape radius="<?lua print(scale * 3) ?>" />
     273                </collisionShapes>
     274        </MovableEntity>
     275        <?lua end ?>
    275276
    276277<!--Erstellen von Asteroiden die zufaellig plaziert sind______ENDE___________________________________________________________________________________________________________________________-->
     
    405406<!--Erstellen von Feinden auf dem Weg zu den Transportern______ENDE__________________________________________________________________________________________________________________________-->
    406407
    407 <DistanceTrigger name="activateSecondSpawnpoint" position="10000,0,3000" distance="1000" target="DistanceTriggerBeacon" targetname="PlayerDistanceTrigger" activations="1" stayactive="true" />
     408<Trigger name=activateFirstSpawnpoint invert=true >
     409    <DistanceTrigger name="activateSecondSpawnpoint" position="150,0,-300" distance="10" target="DistanceTriggerBeacon" targetname="PlayerDistanceTrigger" activations="1" stayactive="true">
     410        <attached>
     411                <Billboard position="0,0,0" colour="0,0,1.0" material="Examples/Flare" />
     412        </attached>
     413    </DistanceTrigger>
     414</Trigger>
    408415
    409416        </Scene>
  • code/branches/presentation3/src/modules/objects/triggers/DistanceTrigger.cc

    r6906 r6935  
    155155      }
    156156    }
     157
    157158    return false;
    158159  }
  • code/branches/presentation3/src/modules/questsystem/QuestEffectBeacon.cc

    r6906 r6935  
    134134        if(pawn == NULL)
    135135        {
    136             COUT(2) << "The QuestEffectBeacon was triggered by an entity other than a Pawn." << std::endl;
     136            COUT(2) << "The QuestEffectBeacon was triggered by an entity other than a Pawn. (" << trigger->getIdentifier()->getName() << ")" << std::endl;
    137137            return false;
    138138        }
  • code/branches/presentation3/src/orxonox/gametypes/TeamDeathmatch.cc

    r6920 r6935  
    138138
    139139        SpawnPoint* fallbackSpawnPoint = NULL;
    140 
    141140        if (teamSpawnPoints.size() > 0)
    142141        {
    143142            unsigned int randomspawn = static_cast<unsigned int>(rnd(static_cast<float>(teamSpawnPoints.size())));
    144143            unsigned int index = 0;
     144            // Get random fallback spawnpoint in case there is no active SpawnPoint.
    145145            for (std::set<SpawnPoint*>::const_iterator it = teamSpawnPoints.begin(); it != teamSpawnPoints.end(); ++it)
    146146            {
     
    154154            }
    155155
     156            // Remove all inactive SpawnPoints from the list.
    156157            for (std::set<SpawnPoint*>::const_iterator it = teamSpawnPoints.begin(); it != teamSpawnPoints.end(); )
    157158            {
    158                 if (!(*it)->isActive())
    159                 {
    160                     COUT(1) << "MUP" << std::endl;
     159                if(!(*it)->isActive())
     160                {
     161                    COUT(1) << (*it)->getName() << " is inactive." << std::endl;
    161162                    teamSpawnPoints.erase(it++);
    162163                    continue;
    163164                }
     165                COUT(1) << (*it)->getName() << " is active." << std::endl;
    164166
    165167                ++it;
    166168            }
     169
     170            COUT(1) << "MUP " << teamSpawnPoints.size() << std::endl;
    167171
    168172            randomspawn = static_cast<unsigned int>(rnd(static_cast<float>(teamSpawnPoints.size())));
Note: See TracChangeset for help on using the changeset viewer.