Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 21, 2012, 3:34:45 PM (12 years ago)
Author:
landauf
Message:

refactored PickupSpawner - it doesn't clone a sample-pickup anymore, it creates new pickups from a template.
removed DroppedPickup because it is not needed anymore, PickupSpawner has now the same functionality.
the representation of the pickup spawner is now destroyed if the pickup is taken and re-created if it spawns again (instead of changing the visibility). makes it easier to change the pickup in a spawner during the game.
adjusted all level files accordingly

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2012merge/data/levels/presentation09b.oxw

    r9318 r9319  
    9494    </SpaceShip>
    9595
    96     <PickupSpawner position="-3800, 2500, 1500" respawnTime="60" triggerDistance="20" maxSpawnedItems="5">
    97       <pickup>
    98         <SpeedPickup template=smalljumppickup />
    99       </pickup>
    100     </PickupSpawner>
     96    <PickupSpawner pickup=smalljumppickup position="-3800, 2500, 1500" respawnTime="60" triggerDistance="20" maxSpawnedItems="5" />
    10197
    10298    <!-- PickupRepresentation for the pickup below, since it is not a standard pickup provided by pickups.oxi -->
     
    109105    />
    110106
    111     <PickupSpawner position="-4150,2750,1550" respawnTime="60" triggerDistance="20" maxSpawnedItems="5">
    112       <pickup>
    113         <HealthPickup representation="MediumHealth" health=100 activationType=onUse durationType=once />
    114       </pickup>
    115     </PickupSpawner>
    116 
    117     <PickupSpawner position="2300, 4300, 2400" respawnTime="5" triggerDistance="20">
    118       <pickup>
    119         <HealthPickup template=mediumhealthpickup />
    120       </pickup>
    121     </PickupSpawner>
     107    <Template name=onusehealthpickup baseclass=HealthPickup>
     108      <HealthPickup representation="MediumHealth" health=100 activationType=onUse durationType=once />
     109    </Template>
     110
     111    <PickupSpawner pickup=onusehealthpickup position="-4150,2750,1550" respawnTime="60" triggerDistance="20" maxSpawnedItems="5" />
     112
     113    <PickupSpawner pickup=mediumhealthpickup position="2300, 4300, 2400" respawnTime="5" triggerDistance="20" />
    122114
    123115    <Billboard position="-2500, 2400, 1500" material="Examples/Flare" />
Note: See TracChangeset for help on using the changeset viewer.