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

    r9318 r9319  
    3737    <!-- Shield pickups -->
    3838
    39     <PickupSpawner position="-25,-25,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10">
    40       <pickup>
    41         <ShieldPickup template=smallshieldpickup />
    42       </pickup>
    43     </PickupSpawner>
    44 
    45     <PickupSpawner position="0,-25,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10">
    46       <pickup>
    47         <ShieldPickup template=mediumshieldpickup />
    48       </pickup>
    49     </PickupSpawner>
    50 
    51     <PickupSpawner position="25,-25,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10">
    52       <pickup>
    53         <ShieldPickup template=hugeshieldpickup />
    54       </pickup>
    55     </PickupSpawner>
     39    <PickupSpawner pickup=smallshieldpickup position="-25,-25,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10" />
     40    <PickupSpawner pickup=mediumshieldpickup position="0,-25,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10" />
     41    <PickupSpawner pickup=hugeshieldpickup position="25,-25,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10" />
    5642
    5743    <!-- Health pickups -->
    5844
    59     <PickupSpawner position="-25,0,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10">
    60       <pickup>
    61         <HealthPickup template=smallhealthpickup />
    62       </pickup>
    63     </PickupSpawner>
    64 
    65     <PickupSpawner position="0,0,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10">
    66       <pickup>
    67         <HealthPickup template=mediumhealthpickup />
    68       </pickup>
    69     </PickupSpawner>
    70 
    71     <PickupSpawner position="25,0,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10">
    72       <pickup>
    73         <HealthPickup template=hugehealthpickup />
    74       </pickup>
    75     </PickupSpawner>
    76 
    77     <PickupSpawner position="50,0,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10">
    78       <pickup>
    79         <HealthPickup template=crazyhealthpickup />
    80       </pickup>
    81     </PickupSpawner>
     45    <PickupSpawner pickup=smallhealthpickup position="-25,0,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10" />
     46    <PickupSpawner pickup=mediumhealthpickup position="0,0,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10" />
     47    <PickupSpawner pickup=hugehealthpickup position="25,0,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10" />
     48    <PickupSpawner pickup=crazyhealthpickup position="50,0,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10" />
    8249
    8350    <!-- Speed pickups -->
    8451
    85     <PickupSpawner position="-25,25,-125" triggerDistance="10" respawnTime="10" maxSpawnedItems="99">
    86       <pickup>
    87         <SpeedPickup template=smallspeedpickup />
    88       </pickup>
    89     </PickupSpawner>
    90 
    91     <PickupSpawner position="0,25,-125" triggerDistance="10" respawnTime="10" maxSpawnedItems="99">
    92       <pickup>
    93         <SpeedPickup template=mediumspeedpickup />
    94       </pickup>
    95     </PickupSpawner>
    96 
    97     <PickupSpawner position="25,25,-125" triggerDistance="10" respawnTime="10" maxSpawnedItems="99">
    98       <pickup>
    99         <SpeedPickup template=hugespeedpickup />
    100       </pickup>
    101     </PickupSpawner>
    102 
    103     <PickupSpawner position="50,25,-125" triggerDistance="10" respawnTime="10" maxSpawnedItems="99">
    104       <pickup>
    105         <SpeedPickup template=smalljumppickup />
    106       </pickup>
    107     </PickupSpawner>
     52    <PickupSpawner pickup=smallspeedpickup position="-25,25,-125" triggerDistance="10" respawnTime="10" maxSpawnedItems="99" />
     53    <PickupSpawner pickup=mediumspeedpickup position="0,25,-125" triggerDistance="10" respawnTime="10" maxSpawnedItems="99" />
     54    <PickupSpawner pickup=hugespeedpickup position="25,25,-125" triggerDistance="10" respawnTime="10" maxSpawnedItems="99" />
     55    <PickupSpawner pickup=smalljumppickup position="50,25,-125" triggerDistance="10" respawnTime="10" maxSpawnedItems="99" />
    10856
    10957    <!-- Invisible pickups -->
    11058
    111     <PickupSpawner position="-25,50,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10">
    112       <pickup>
    113         <InvisiblePickup template=smallinvisiblepickup />
    114       </pickup>
    115     </PickupSpawner>
    116 
    117     <PickupSpawner position="0,50,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10">
    118       <pickup>
    119         <InvisiblePickup template=mediuminvisiblepickup />
    120       </pickup>
    121     </PickupSpawner>
    122 
    123     <PickupSpawner position="25,50,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10">
    124       <pickup>
    125         <InvisiblePickup template=hugeinvisiblepickup />
    126       </pickup>
    127     </PickupSpawner>
     59    <PickupSpawner pickup=smallinvisiblepickup position="-25,50,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10" />
     60    <PickupSpawner pickup=mediuminvisiblepickup position="0,50,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10" />
     61    <PickupSpawner pickup=hugeinvisiblepickup position="25,50,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10" />
    12862
    12963    <!-- Meta pickups -->
    13064
    131     <PickupSpawner position="-25,75,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10">
    132       <pickup>
    133         <MetaPickup representation="use" metaType="use" />
    134       </pickup>
    135     </PickupSpawner>
    136 
    137     <PickupSpawner position="0,75,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10">
    138       <pickup>
    139         <MetaPickup representation="drop" metaType="drop" />
    140       </pickup>
    141     </PickupSpawner>
    142 
    143     <PickupSpawner position="25,75,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10">
    144       <pickup>
    145         <MetaPickup metaType="destroy" />
    146       </pickup>
    147     </PickupSpawner>
    148 
    149     <PickupSpawner position="50,75,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10">
    150       <pickup>
    151         <MetaPickup metaType="destroyCarrier" />
    152       </pickup>
    153     </PickupSpawner>
     65    <Template name=usemetapickup baseclass=MetaPickup>
     66      <MetaPickup representation="use" metaType="use" />
     67    </Template>
     68   
     69    <Template name=dropmetapickup baseclass=MetaPickup>
     70      <MetaPickup representation="drop" metaType="drop" />
     71    </Template>
     72   
     73    <Template name=destroymetapickup baseclass=MetaPickup>
     74      <MetaPickup metaType="destroy" />
     75    </Template>
     76   
     77    <Template name=destroycarriermetapickup baseclass=MetaPickup>
     78      <MetaPickup metaType="destroyCarrier" />
     79    </Template>
     80   
     81    <PickupSpawner pickup=usemetapickup position="-25,75,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10" />
     82    <PickupSpawner pickup=dropmetapickup position="0,75,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10" />
     83    <PickupSpawner pickup=destroymetapickup position="25,75,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10" />
     84    <PickupSpawner pickup=destroycarriermetapickup position="50,75,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10" />
    15485
    15586    <!-- Pickup Collection pickups -->
    15687
    157     <PickupSpawner position="-50,25,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10">
    158       <pickup>
    159         <PickupCollection template=triplehealthspeedinvisibilitypickup />
    160       </pickup>
    161     </PickupSpawner>
     88    <PickupSpawner pickup=triplehealthspeedinvisibilitypickup position="-50,25,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10" />
    16289   
    16390    <!-- Drone pickup -->
    16491   
    165     <PickupSpawner position="-50,50,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10">
    166       <pickup>
    167         <DronePickup template=dronepickup />
    168       </pickup>
    169     </PickupSpawner>
     92    <PickupSpawner pickup=dronepickup position="-50,50,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10" />
    17093   
    17194    <!-- DamageBoost pickup -->
    17295   
    173     <PickupSpawner position="-50,75,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10">
    174       <pickup>
    175         <DamageBoostPickup template=smalldamageboostpickup />
    176       </pickup>
    177     </PickupSpawner>
    178    
    179       <PickupSpawner position="-50,100,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10">
    180       <pickup>
    181         <DamageBoostPickup template=mediumdamageboostpickup />
    182       </pickup>
    183     </PickupSpawner>
    184    
    185       <PickupSpawner position="-50,125,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10">
    186       <pickup>
    187         <DamageBoostPickup template=largedamageboostpickup />
    188       </pickup>
    189     </PickupSpawner>
    190    
     96    <PickupSpawner pickup=smalldamageboostpickup position="-50,75,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10" />
     97    <PickupSpawner pickup=mediumdamageboostpickup position="-50,100,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10" />
     98    <PickupSpawner pickup=largedamageboostpickup position="-50,125,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10" />
    19199   
    192100    <!-- Other pickups -->
     
    201109    />
    202110
    203     <PickupSpawner position="-50,0,-125" respawnTime="60" triggerDistance="20" maxSpawnedItems="5">
    204       <pickup>
    205         <HealthPickup representation="MediumHealth" health=500 activationType=immediate healthRate=10 durationType=continuous />
    206       </pickup>
    207     </PickupSpawner>
     111    <Template name=continuoushealthpickup baseclass=HealthPickup>
     112      <HealthPickup representation="MediumHealth" health=500 activationType=immediate healthRate=10 durationType=continuous />
     113    </Template>
     114   
     115    <PickupSpawner pickup=continuoushealthpickup position="-50,0,-125" respawnTime="60" triggerDistance="20" maxSpawnedItems="5" />
    208116
    209     <PickupSpawner position="-25,-50,-125" respawnTime="60" triggerDistance="20" maxSpawnedItems="5">
    210       <pickup>
    211         <ShrinkPickup template ="smallshrinkpickup"/>
    212       </pickup>
    213     </PickupSpawner>
    214 
    215     <PickupSpawner position="0,-50,-125" respawnTime="60" triggerDistance="20" maxSpawnedItems="5">
    216       <pickup>
    217         <ShrinkPickup template ="mediumshrinkpickup"/>
    218       </pickup>
    219     </PickupSpawner>
    220 
    221     <PickupSpawner position="25,-50,-125" respawnTime="60" triggerDistance="20" maxSpawnedItems="5">
    222       <pickup>
    223         <ShrinkPickup template ="hugeshrinkpickup"/>
    224       </pickup>
    225     </PickupSpawner>
     117    <PickupSpawner pickup="smallshrinkpickup" position="-25,-50,-125" respawnTime="60" triggerDistance="20" maxSpawnedItems="5" />
     118    <PickupSpawner pickup="mediumshrinkpickup" position="0,-50,-125" respawnTime="60" triggerDistance="20" maxSpawnedItems="5" />
     119    <PickupSpawner pickup="hugeshrinkpickup" position="25,-50,-125" respawnTime="60" triggerDistance="20" maxSpawnedItems="5" />
    226120   
    227121    <!-- @Objects: 4 boxes (uncontrolled pawns) -->
Note: See TracChangeset for help on using the changeset viewer.