- Timestamp:
- May 27, 2010, 7:05:36 PM (14 years ago)
- Location:
- code/branches/ppspickups3
- Files:
-
- 2 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/ppspickups3/data/levels/includes/pickups.oxi
r6884 r6980 2 2 3 3 <PickupRepresentation 4 pickupName = "S uperShield Pickup"5 pickupDescription = "Gives you a s hield with 1000000 helath points for 5 minutes"6 inventoryRepresentation = "Small Health"7 spawnerTemplate = "s upershieldpickupRepresentation"4 pickupName = "Small Shield Pickup" 5 pickupDescription = "Gives you a small shield for 10 seconds." 6 inventoryRepresentation = "SmallShield" 7 spawnerTemplate = "smallshieldpickupRepresentation" 8 8 > 9 9 <pickup> 10 <ShieldPickup template=supershieldpickup /> 10 <ShieldPickup template=smallshieldpickup /> 11 </pickup> 12 </PickupRepresentation> 13 14 <PickupRepresentation 15 pickupName = "Medium Shield Pickup" 16 pickupDescription = "Gives you a medium-sized shield for 30 seconds." 17 inventoryRepresentation = "MediumShield" 18 spawnerTemplate = "mediumshieldpickupRepresentation" 19 > 20 <pickup> 21 <ShieldPickup template=mediumshieldpickup /> 22 </pickup> 23 </PickupRepresentation> 24 25 <PickupRepresentation 26 pickupName = "Huge Shield Pickup" 27 pickupDescription = "Gives you a big shield for 60 seconds." 28 inventoryRepresentation = "HugeShield" 29 spawnerTemplate = "hugeshieldpickupRepresentation" 30 > 31 <pickup> 32 <ShieldPickup template=hugeshieldpickup /> 11 33 </pickup> 12 34 </PickupRepresentation> -
code/branches/ppspickups3/data/levels/pickup.oxw
r6884 r6980 29 29 <!-- Shield pickups --> 30 30 31 <PickupSpawner position="- 50,50,-100" triggerDistance="10" respawnTime="5" maxSpawnedItems="10">31 <PickupSpawner position="-25,-25,-100" triggerDistance="10" respawnTime="5" maxSpawnedItems="10"> 32 32 <pickup> 33 <ShieldPickup template=supershieldpickup /> 33 <ShieldPickup template=smallshieldpickup /> 34 </pickup> 35 </PickupSpawner> 36 37 <PickupSpawner position="0,-25,-100" triggerDistance="10" respawnTime="5" maxSpawnedItems="10"> 38 <pickup> 39 <ShieldPickup template=mediumshieldpickup /> 40 </pickup> 41 </PickupSpawner> 42 43 <PickupSpawner position="25,-25,-100" triggerDistance="10" respawnTime="5" maxSpawnedItems="10"> 44 <pickup> 45 <ShieldPickup template=hugeshieldpickup /> 34 46 </pickup> 35 47 </PickupSpawner> -
code/branches/ppspickups3/data/levels/templates/pickup_representation_templates.oxt
r6884 r6980 1 1 <!-- Shield pickups: --> 2 2 3 <Template name=s upershieldpickupRepresentation>3 <Template name=smallshieldpickupRepresentation> 4 4 <PickupRepresentation> 5 5 <spawner-representation> … … 8 8 <Billboard position="0,0,0" colour="1,1,1" material="Sphere2" scale=0.1> 9 9 <attached> 10 <Billboard position="0,0,0" colour="1,1,1" material="Shield" scale= 10/>11 </attached> 12 </Billboard> 13 </attached> 14 </StaticEntity> 15 </spawner-representation> 16 </PickupRepresentation> 17 </Template> 18 19 <Template name=s upershieldpickup>10 <Billboard position="0,0,0" colour="1,1,1" material="Shield" scale=0.3 /> 11 </attached> 12 </Billboard> 13 </attached> 14 </StaticEntity> 15 </spawner-representation> 16 </PickupRepresentation> 17 </Template> 18 19 <Template name=smallshieldpickup> 20 20 <ShieldPickup 21 absorption = 1 22 duration = 6000 23 shieldhealth = 1000000 21 duration = 10 22 shieldabsorption = 0.7 23 shieldhealth = 300 24 activationType = "immediate" 25 durationType = "once" 26 /> 27 </Template> 28 29 30 <Template name=mediumshieldpickupRepresentation> 31 <PickupRepresentation> 32 <spawner-representation> 33 <StaticEntity> 34 <attached> 35 <Billboard position="0,0,0" colour="1,1,1" material="Sphere2" scale=0.1> 36 <attached> 37 <Billboard position="0,0,0" colour="1,1,1" material="Shield" scale=0.5 /> 38 </attached> 39 </Billboard> 40 </attached> 41 </StaticEntity> 42 </spawner-representation> 43 </PickupRepresentation> 44 </Template> 45 46 <Template name=mediumshieldpickup> 47 <ShieldPickup 48 duration = 30 49 shieldabsorption = 0.8 50 shieldhealth = 500 51 activationType = "immediate" 52 durationType = "once" 53 /> 54 </Template> 55 56 57 <Template name=hugeshieldpickupRepresentation> 58 <PickupRepresentation> 59 <spawner-representation> 60 <StaticEntity> 61 <attached> 62 <Billboard position="0,0,0" colour="1,1,1" material="Sphere2" scale=0.1> 63 <attached> 64 <Billboard position="0,0,0" colour="1,1,1" material="Shield" scale=0.7 /> 65 </attached> 66 </Billboard> 67 </attached> 68 </StaticEntity> 69 </spawner-representation> 70 </PickupRepresentation> 71 </Template> 72 73 <Template name=hugeshieldpickup> 74 <ShieldPickup 75 duration = 60 76 shieldabsorption = 0.95 77 shieldhealth = 700 24 78 activationType = "immediate" 25 79 durationType = "once" -
code/branches/ppspickups3/src/orxonox/worldentities/pawns/Pawn.cc
r6896 r6980 80 80 else 81 81 this->weaponSystem_ = 0; 82 82 83 83 this->setCarrierName("Pawn"); 84 84 … … 107 107 XMLPortParam(Pawn, "maxhealth", setMaxHealth, getMaxHealth, xmlelement, mode).defaultValues(200); 108 108 XMLPortParam(Pawn, "initialhealth", setInitialHealth, getInitialHealth, xmlelement, mode).defaultValues(100); 109 109 110 110 XMLPortParam(Pawn, "shieldhealth", setShieldHealth, getShieldHealth, xmlelement, mode).defaultValues(0); 111 111 XMLPortParam(Pawn, "shieldabsorption", setShieldAbsorption, getShieldAbsorption, xmlelement, mode).defaultValues(0); 112 112 113 113 XMLPortParam(Pawn, "spawnparticlesource", setSpawnParticleSource, getSpawnParticleSource, xmlelement, mode); 114 114 XMLPortParam(Pawn, "spawnparticleduration", setSpawnParticleDuration, getSpawnParticleDuration, xmlelement, mode).defaultValues(3.0f); … … 170 170 float shielddamage = damage*this->shieldAbsorption_; 171 171 float healthdamage = damage*(1-this->shieldAbsorption_); 172 172 173 173 // In case the shield can not take all the shield damage. 174 if (shielddamage > this->getShieldHealth()) 174 if (shielddamage > this->getShieldHealth()) 175 175 { 176 COUT(1) << "the shield is too weak to take its share of the damage!" << std::endl;177 178 176 healthdamage += shielddamage-this->getShieldHealth(); 179 177 this->setShieldHealth(0); … … 181 179 182 180 this->setHealth(this->health_ - healthdamage); 183 181 184 182 if (this->getShieldHealth() > 0) 185 183 { 186 184 this->setShieldHealth(this->shieldHealth_ - shielddamage); 187 COUT(1) << "damage " << damage << " getShieldAbsorption " << getShieldAbsorption() << std::endl;188 COUT(1) << "shielddamage " << shielddamage << " healthdamage " << healthdamage << std::endl;189 COUT(1) << "the shield takes its share of the damage and is left with " << this->getShieldHealth() << std::endl;190 185 } 191 186 … … 195 190 } 196 191 } 197 192 198 193 void Pawn::hit(Pawn* originator, const Vector3& force, float damage) 199 194 {
Note: See TracChangeset
for help on using the changeset viewer.