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/presentationFS10.oxw

    r9318 r9319  
    102102    <?lua end ?>
    103103
    104     <PickupSpawner position="500,-50,-500" triggerDistance="10" respawnTime="5" maxSpawnedItems="10">
    105       <pickup>
    106         <DronePickup template=dronepickup />
    107       </pickup>
    108     </PickupSpawner>
     104    <PickupSpawner pickup=dronepickup position="500,-50,-500" triggerDistance="10" respawnTime="5" maxSpawnedItems="10" />
    109105
    110106    <!-- Shield pickups -->
    111107
    112     <PickupSpawner position="-25,-50,-500" triggerDistance="10" respawnTime="5" maxSpawnedItems="10">
    113       <pickup>
    114         <ShieldPickup template=hugeshieldpickup />
    115       </pickup>
    116     </PickupSpawner>
     108    <PickupSpawner pickup=hugeshieldpickup position="-25,-50,-500" triggerDistance="10" respawnTime="5" maxSpawnedItems="10" />
    117109
    118110    <!-- Health pickups -->
    119111
    120     <PickupSpawner position="0,-75,-500" triggerDistance="10" respawnTime="30" maxSpawnedItems="10">
    121       <pickup>
    122         <HealthPickup template=hugehealthpickup />
    123       </pickup>
    124     </PickupSpawner>
     112    <PickupSpawner pickup=hugehealthpickup position="0,-75,-500" triggerDistance="10" respawnTime="30" maxSpawnedItems="10" />
    125113
    126114    <!-- Speed pickups -->
    127115
    128     <PickupSpawner position="25,-50,-500" triggerDistance="10" respawnTime="10" maxSpawnedItems="99">
    129       <pickup>
    130         <SpeedPickup template=hugespeedpickup />
    131       </pickup>
    132     </PickupSpawner>
    133 
    134     <PickupSpawner position="50,-50,-500" triggerDistance="10" respawnTime="10" maxSpawnedItems="99">
    135       <pickup>
    136         <SpeedPickup template=smalljumppickup />
    137       </pickup>
    138     </PickupSpawner>
     116    <PickupSpawner pickup=hugespeedpickup position="25,-50,-500" triggerDistance="10" respawnTime="10" maxSpawnedItems="99" />
     117    <PickupSpawner pickup=smalljumppickup position="50,-50,-500" triggerDistance="10" respawnTime="10" maxSpawnedItems="99" />
    139118
    140119    <!-- Invisible pickups -->
    141120
    142     <PickupSpawner position="0,-50,-500" triggerDistance="10" respawnTime="5" maxSpawnedItems="10">
    143       <pickup>
    144         <InvisiblePickup template=hugeinvisiblepickup />
    145       </pickup>
    146     </PickupSpawner>
     121    <PickupSpawner pickup=hugeinvisiblepickup position="0,-50,-500" triggerDistance="10" respawnTime="5" maxSpawnedItems="10" />
    147122
    148123    <!-- PickupRepresentation for the pickup below, since it is not a standard pickup provided by pickups.oxi -->
     
    155130    />
    156131
    157     <PickupSpawner position="25,-75,-500" respawnTime="60" triggerDistance="20" maxSpawnedItems="5">
    158       <pickup>
    159         <HealthPickup representation="MediumHealth" health=50 activationType=onUse durationType=once />
    160       </pickup>
    161     </PickupSpawner>
     132    <Template name=onusehealthpickup baseclass=HealthPickup>
     133      <HealthPickup representation="MediumHealth" health=50 activationType=onUse durationType=once />
     134    </Template>
     135
     136    <PickupSpawner pickup=onusehealthpickup position="25,-75,-500" respawnTime="60" triggerDistance="20" maxSpawnedItems="5" />
    162137
    163138  </Scene>
Note: See TracChangeset for help on using the changeset viewer.