Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 31, 2010, 9:24:33 AM (14 years ago)
Author:
dafrick
Message:

Updated pickups level and template and include file to properly include the DronePickup.
Additionally adjusted the level of output generated by the PickupSpawner.

Location:
code/branches/presentation3
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation3/data/levels/includes/pickups.oxi

    r7000 r7038  
     1
    12<!-- Shield pickups -->
    23
    34<PickupRepresentation
    45    pickupName = "Small Shield Pickup"
    5     pickupDescription = "Gives you a small shield for 10 seconds."
     6    pickupDescription = "Gives you a small-sized shield for 30 seconds."
    67    inventoryRepresentation = "SmallShield"
    78    spawnerTemplate = "smallshieldpickupRepresentation"
     
    197198</PickupRepresentation>
    198199
     200<!-- Drone Pickup -->
     201
     202<PickupRepresentation
     203    pickupName = "Drone Pickup"
     204    pickupDescription = "Adds a Drone to the Players Spaceship"
     205    spawnerTemplate = "dronepickupRepresentation"
     206>
     207    <pickup>
     208        <DronePickup template=dronepickup />
     209    </pickup>
     210</PickupRepresentation>
     211
  • code/branches/presentation3/data/levels/pickups.oxw

    r7036 r7038  
    2929    <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" />
    3030    <SpawnPoint position="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff />
    31 
    32     <!-- Drone pickup -->
    33 
    34     <PickupSpawner position="-100,0,-100" triggerDistance="10" respawnTime="30" maxSpawnedItems="10">
    35         <pickup>
    36             <DronePickup droneTemplate=droneTemplate />
    37         </pickup>
    38     </PickupSpawner>
    3931
    4032    <!-- Shield pickups -->
     
    151143      </pickup>
    152144    </PickupSpawner>
     145   
     146    <!-- Drone pickup -->
     147   
     148    <PickupSpawner position="-50,50,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10">
     149      <pickup>
     150        <DronePickup template=dronepickup />
     151      </pickup>
     152    </PickupSpawner>
     153   
     154    <!-- Other pickups -->
    153155
    154156    <!-- PickupRepresentation for the pickup below, since it is not a standard pickup provided by pickups.oxi -->
  • code/branches/presentation3/data/levels/templates/pickup_representation_templates.oxt

    r7034 r7038  
    2626  />
    2727</Template>
    28 
    2928
    3029<Template name=mediumshieldpickupRepresentation>
     
    426425    </PickupCollection>
    427426</Template>
     427
     428<!-- Drone Pickup -->
    428429
    429430<Template name=droneTemplate>
     
    458459    </Drone>
    459460</Template>
     461
     462<Template name=dronepickupRepresentation>
     463    <PickupRepresentation>
     464        <spawner-representation>
     465            <StaticEntity>
     466                <attached>
     467                    <Billboard position="0,0,0" colour="0.96,0.35,0.02" material="Sphere2" scale=0.1>
     468                        <attached>
     469                            <Model scale="5" mesh="drone.mesh"/>
     470                        </attached>
     471                    </Billboard>
     472                </attached>
     473            </StaticEntity>
     474        </spawner-representation>
     475    </PickupRepresentation>
     476</Template>
     477
     478<Template name=dronepickup>
     479    <DronePickup droneTemplate=droneTemplate />
     480</Template>
     481
  • code/branches/presentation3/src/modules/pickup/PickupSpawner.cc

    r6711 r7038  
    223223        else
    224224        {
    225             COUT(3) << "PickupSpawner empty, selfdestruct initialized." << std::endl;
     225            COUT(4) << "PickupSpawner (&" << this << ") empty, selfdestruct initialized." << std::endl;
    226226            this->setActive(false);
    227227            this->destroy();
     
    248248        if(this->pickup_ != NULL)
    249249        {
    250             COUT(1) << "In PickupSpawner: setPickupable called, with this->pickup_ already set." << std::endl;
     250            COUT(1) << "In PickupSpawner (&" << this << "): setPickupable called, with this->pickup_ already set." << std::endl;
    251251            return;
    252252        }
    253253        if(pickup == NULL)
    254254        {
    255             COUT(1) << "In PickupSpawner: Argument of setPickupable is NULL." << std::endl;
     255            COUT(1) << "In PickupSpawner (&" << this << "): Argument of setPickupable is NULL." << std::endl;
    256256            return;
    257257        }
     
    282282        if (this->isActive()) //!< Checks whether PickupSpawner is active.
    283283        {
    284             COUT(3) << "PickupSpawner triggered and active." << std::endl;
     284            COUT(4) << "PickupSpawner (&" << this << ") triggered and active." << std::endl;
    285285           
    286286            PickupCarrier* carrier = dynamic_cast<PickupCarrier*>(pawn);
     
    293293            if(!carrier->isTarget(this->pickup_))
    294294            {
    295                 COUT(4) << "PickupSpawner triggered but Pawn wasn't a target of the Pickupable." << std::endl;
     295                COUT(4) << "PickupSpawner (&" << this << ") triggered but Pawn wasn't a target of the Pickupable." << std::endl;
    296296                return;
    297297            }
     
    314314            {
    315315                if(target == NULL)
    316                     COUT(1) << "PickupSpawner: Pickupable has no target." << std::endl;
     316                    COUT(1) << "PickupSpawner (&" << this << "): Pickupable has no target." << std::endl;
    317317               
    318318                if(pickup == NULL)
    319319                {
    320                     COUT(1) << "PickupSpawner: getPickup produced an error, no Pickupable created." << std::endl;
     320                    COUT(1) << "PickupSpawner (&" << this << "): getPickup produced an error, no Pickupable created." << std::endl;
    321321                }
    322322                else
     
    352352    void PickupSpawner::respawnTimerCallback()
    353353    {
    354         COUT(3) << "PickupSpawner reactivated." << std::endl;
     354        COUT(4) << "PickupSpawner (&" << this << ") reactivated." << std::endl;
    355355
    356356        this->setActive(true);
  • code/branches/presentation3/src/orxonox/controllers/DroneController.cc

    r7035 r7038  
    9797    }
    9898
    99     /*
     99    /**
    100100    @brief
    101101        The controlling happens here. This method defines what the controller has to do each tick.
Note: See TracChangeset for help on using the changeset viewer.