Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6694


Ignore:
Timestamp:
Apr 12, 2010, 4:08:15 PM (15 years ago)
Author:
ebeier
Message:

added some speedpickup templates

Location:
code/branches/ppspickups1
Files:
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/ppspickups1/data/levels/includes/pickups_speed.oxi

    r6575 r6694  
    11<PickupRepresentation
    22    name = "Small Speed Boost"
    3     description = "Adds a small amout of speed (?) to the ship."
     3    description = "Multiplies Speed of the Ship with a small
     4amount."
    45    spawnerTemplate = "smallspeedpickupRepresentation"
    56>
     
    89    </pickup>
    910</PickupRepresentation>
     11
     12<PickupRepresentation
     13    name = "Medium Speed Boost"
     14    description = "Multiplies Speed of the Ship with a bigger
     15amount."
     16    spawnerTemplate = "mediumspeedpickupRepresentation"
     17>
     18    <pickup>
     19        <SpeedPickup template=mediumspeedpickup />
     20    </pickup>
     21</PickupRepresentation>
     22
     23<PickupRepresentation
     24    name = "Huge Speed Boost"
     25    description = "Multiplies Speed of the Ship with a huge
     26amount."
     27    spawnerTemplate = "hugespeedpickupRepresentation"
     28>
     29    <pickup>
     30        <SpeedPickup template=hugespeedpickup />
     31    </pickup>
     32</PickupRepresentation>
     33
     34<PickupRepresentation
     35    name = "Small Jump Boost"
     36    description = "Boosts the Ship with a massive amount for a very short time."
     37    spawnerTemplate = "smalljumppickupRepresentation"
     38>
     39    <pickup>
     40        <SpeedPickup template=smalljumppickup />
     41    </pickup>
     42</PickupRepresentation>
  • code/branches/ppspickups1/data/levels/pickup_ppstest1.oxw

    r6579 r6694  
    2929    </PickupSpawner>
    3030
     31    <PickupSpawner position="0,0,-100" triggerDistance="10" respawnTime="10" maxSpawnedItems="99">
     32        <pickup>
     33            <SpeedPickup template=mediumspeedpickup />
     34        </pickup>
     35    </PickupSpawner>
     36
     37    <PickupSpawner position="25,0,-100" triggerDistance="10" respawnTime="10" maxSpawnedItems="99">
     38        <pickup>
     39            <SpeedPickup template=hugespeedpickup />
     40        </pickup>
     41    </PickupSpawner>
     42
     43    <PickupSpawner position="50,0,-100" triggerDistance="10" respawnTime="10" maxSpawnedItems="99">
     44        <pickup>
     45            <SpeedPickup template=smalljumppickup />
     46        </pickup>
     47    </PickupSpawner>
     48
    3149
    3250    <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" />
    3351    <SpawnPoint position="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff />
     52
     53
     54
     55    <MovableEntity scale=1.5 position="0,0,-300" velocity="0,0,0" rotationaxis="0,1,0" rotationrate=90>
     56      <events>
     57        <activity>
     58          <DistanceTrigger position="0,0,-300" distance=50 target="ControllableEntity" invert=1 />
     59        </activity>
     60      </events>
     61      <attached>
     62        <Model position="0,0,0" scale=10 mesh="ast1.mesh" />
     63        <StaticEntity position="0,0,100">
     64          <attached>
     65            <Model position="0,0,0" scale=6 mesh="ast1.mesh" />
     66            <MovableEntity position="0,0,0" velocity="0,0,0" rotationaxis="0,0,1" rotationrate=500>
     67              <attached>
     68                <Model position="0,35,0" scale=2 mesh="ast1.mesh" />
     69                <Model position="0,-35,0" scale=2 mesh="ast1.mesh" />
     70                <Model position="35,0,0" scale=2 mesh="ast1.mesh">
     71                  <attached>
     72                    <ParticleEmitter position="0,0,0" source="Orxonox/ExplosionComp4" />
     73                  </attached>
     74                </Model>
     75                <Model position="-35,0,0" scale=2 mesh="ast1.mesh">
     76                  <attached>
     77                    <ParticleEmitter position="0,0,0" source="Orxonox/fire3" />
     78                  </attached>
     79                </Model>
     80              </attached>
     81            </MovableEntity>
     82          </attached>
     83        </StaticEntity>
     84        <MovableEntity position="0,0,-100" velocity="0,0,0" rotationaxis="0,1,0" rotationrate=200>
     85          <attached>
     86            <ParticleEmitter position="0,0,0" source="Orxonox/fire3" />
     87            <Model position="0,0,0" scale=6 mesh="ast1.mesh" />
     88            <Model position="0,0,-50" scale=3 mesh="ast1.mesh" />
     89            <Model position="0,0,50" scale=3 mesh="ast1.mesh" />
     90          </attached>
     91        </MovableEntity>
     92      </attached>
     93    </MovableEntity>
     94
     95    <ExplosionChunk position="-500,0,-200" lifetime=3.0 loop=1/>
     96
    3497  </Scene>
    3598</Level>
  • code/branches/ppspickups1/data/levels/templates/pickup_representation_templates_speed.oxt

    r6643 r6694  
    44            <StaticEntity>
    55                <attached>
    6                     <Billboard position="0,0,0" colour="0.50,0.90,0.25" material="Sphere2" scale=0.1>
     6                    <Billboard position="0,0,0" colour="0.99,0.96,0.52" material="Sphere2" scale=0.1>
    77                        <attached>
    8                             <Billboard position="0,0,0" colour="0.90,0.90,0.10" material="3arrowsup" scale=0.7 />
     8                            <Billboard position="0,0,0" colour="0.98,0.94,0.22" material="3arrowsup" scale=0.3 />
    99                        </attached>
    1010                    </Billboard>
     
    1818  <SpeedPickup
    1919    duration = 10.0
    20     speedAdd = 100
    21     SpeedMultiply = 10
     20    speedAdd = 0.0
     21    SpeedMultiply = 10.0
    2222    activationType = "immediate"
    2323    durationType = "once"
    2424  />
    2525</Template>
     26
     27<Template name=mediumspeedpickupRepresentation>
     28    <PickupRepresentation>
     29        <spawner-representation>
     30            <StaticEntity>
     31                <attached>
     32                    <Billboard position="0,0,0" colour="0.99,0.96,0.52" material="Sphere2" scale=0.1>
     33                        <attached>
     34                            <Billboard position="0,0,0" colour="0.98,0.94,0.22" material="3arrowsup" scale=0.5 />
     35                        </attached>
     36                    </Billboard>
     37                </attached>
     38            </StaticEntity>
     39        </spawner-representation>
     40    </PickupRepresentation>
     41</Template>
     42
     43<Template name=mediumspeedpickup>
     44  <SpeedPickup
     45    duration = 10.0
     46    speedAdd = 0.0
     47    SpeedMultiply = 25.0
     48    activationType = "immediate"
     49    durationType = "once"
     50  />
     51</Template>
     52
     53<Template name=hugespeedpickupRepresentation>
     54    <PickupRepresentation>
     55        <spawner-representation>
     56            <StaticEntity>
     57                <attached>
     58                    <Billboard position="0,0,0" colour="0.99,0.96,0.52" material="Sphere2" scale=0.1>
     59                        <attached>
     60                            <Billboard position="0,0,0" colour="0.98,0.94,0.22" material="3arrowsup" scale=0.7 />
     61                        </attached>
     62                    </Billboard>
     63                </attached>
     64            </StaticEntity>
     65        </spawner-representation>
     66    </PickupRepresentation>
     67</Template>
     68
     69<Template name=hugespeedpickup>
     70  <SpeedPickup
     71    duration = 10.0
     72    speedAdd = 0.0
     73    SpeedMultiply = 50.0
     74    activationType = "immediate"
     75    durationType = "once"
     76  />
     77</Template>
     78
     79<Template name=smalljumppickupRepresentation>
     80    <PickupRepresentation>
     81        <spawner-representation>
     82            <StaticEntity>
     83                <attached>
     84                    <Billboard position="0,0,0" colour="0.99,0.96,0.52" material="Sphere2" scale=0.1>
     85                        <attached>
     86                            <Billboard position="0,0,0" colour="1,0,0" material="3arrowsup" scale=0.3 />
     87                        </attached>
     88                    </Billboard>
     89                </attached>
     90            </StaticEntity>
     91        </spawner-representation>
     92    </PickupRepresentation>
     93</Template>
     94
     95<Template name=smalljumppickup>
     96  <SpeedPickup
     97    duration = 0.7
     98    speedAdd = 5000.0
     99    SpeedMultiply = 1.0
     100    activationType = "immediate"
     101    durationType = "once"
     102  />
     103</Template>
  • code/branches/ppspickups1/src/modules/pickup/items/SpeedPickup.cc

    r6681 r6694  
    137137        if(this->isUsed())
    138138        {
    139             this->startPickupTimer(this->getDuration());
    140 
    141139            Engine* engine = this->carrierToEngineHelper();
    142140            if(engine == NULL) //!< If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
    143141                this->destroy();
     142
     143            this->startPickupTimer(this->getDuration());
    144144            engine->setSpeedAdd(this->getSpeedAdd());
    145145            engine->setSpeedMultiply(this->getSpeedMultiply());
     
    208208        {
    209209            COUT(1) << "Invalid duration in SpeedPickup." << std::endl;
    210             this->duration_ = 0;
     210            this->duration_ = 0.0f;
    211211        }
    212212    }
     
    227227        {
    228228            COUT(1) << "Invalid speedAdd in SpeedPickup." << std::endl;
    229             this->speedAdd_ = 0.0;
     229            this->speedAdd_ = 0.0f;
    230230        }
    231231    }
     
    246246        {
    247247            COUT(1) << "Invalid speedMultiply in SpeedPickup." << std::endl;
    248             this->speedMultiply_ = 1.0;
     248            this->speedMultiply_ = 1.0f;
    249249        }
    250250    }
    251251
    252252    void SpeedPickup::PickupTimerCallBack(void) {
    253         /* Reset values */
     253            Engine* engine = this->carrierToEngineHelper();
     254            if(engine == NULL) //!< If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
     255                this->destroy();
     256
     257            engine->setSpeedAdd(0.0f);
     258            engine->setSpeedMultiply(1.0f);
    254259    }
    255260}
Note: See TracChangeset for help on using the changeset viewer.