pur3r4ge
Newbie
- Joined
- Aug 30, 2004
- Messages
- 187
- Reaction score
- 0
I've picked apart the respawning barrel logic system from DM_Lockdown, since it seems as if many people are having problems. This will prevent you barrels from losing their "burn before exploding" behavior after respawning.
First of all, your going to need the following entities:
1) logic_auto
-this is for the initial spawn of the barrels
2) math_counter
-this keeps track of how many you've blown up
3) point_template
-when it's time to respawn, this says what to spawn
4) prop_physics_respawnable
-these are your barrels themselves
Once you've created the logic_auto, add the following output:
OnMapSpawn target entities named exploding_barrels_template via this input ForceSpawn after a delay in seconds of 0.00
Check the "remove on fire" flag
Next is the math_counter
Name it exploding_barrels_counter
initial value: 0
Minimum legal value: 0
Maximum legal value: this is the total number of barrels in the map. In the sample map, there are six barrels, so I used 6 for this value. (once you've created your barrels, you can count the number of exploding_barrels on the input list for the counter to get this number as well)
It needs 2 outputs.
OnHitMax target exploding_barrels_counter SetValue with an override of 0 after a dalay of 0
OnHitMax target exploding_barrels_template ForceSpawn after a delay of 30
Now we move on the the point_template
Name it exploding_barrels_template
set keyvalue Template 1 to exploding_barrels
Check the flag: Preserve entity names
Last is the barrels themselves. I'd create one, then copy it throughout your level.
Name: exploding_barrels (they are all named this)
world model: models/props_c17/oildrum001_explosive.mdl
respawn time: 30 seconds
add the following output:
OnBreak target exploding_barrels_counter via input Add a parameter override of 1 after a delay of 0
Make sure the only flag checked is "start asleep" (you'll need to position the model directly on the floor)
You can check out a sample map here:
Right click and "save target as":
Barrel Logic sample
Feel free to post corrections. This is really pushing the limit of my understanding of hammer's I/O system
First of all, your going to need the following entities:
1) logic_auto
-this is for the initial spawn of the barrels
2) math_counter
-this keeps track of how many you've blown up
3) point_template
-when it's time to respawn, this says what to spawn
4) prop_physics_respawnable
-these are your barrels themselves
Once you've created the logic_auto, add the following output:
OnMapSpawn target entities named exploding_barrels_template via this input ForceSpawn after a delay in seconds of 0.00
Check the "remove on fire" flag
Next is the math_counter
Name it exploding_barrels_counter
initial value: 0
Minimum legal value: 0
Maximum legal value: this is the total number of barrels in the map. In the sample map, there are six barrels, so I used 6 for this value. (once you've created your barrels, you can count the number of exploding_barrels on the input list for the counter to get this number as well)
It needs 2 outputs.
OnHitMax target exploding_barrels_counter SetValue with an override of 0 after a dalay of 0
OnHitMax target exploding_barrels_template ForceSpawn after a delay of 30
Now we move on the the point_template
Name it exploding_barrels_template
set keyvalue Template 1 to exploding_barrels
Check the flag: Preserve entity names
Last is the barrels themselves. I'd create one, then copy it throughout your level.
Name: exploding_barrels (they are all named this)
world model: models/props_c17/oildrum001_explosive.mdl
respawn time: 30 seconds
add the following output:
OnBreak target exploding_barrels_counter via input Add a parameter override of 1 after a delay of 0
Make sure the only flag checked is "start asleep" (you'll need to position the model directly on the floor)
You can check out a sample map here:
Right click and "save target as":
Barrel Logic sample
Feel free to post corrections. This is really pushing the limit of my understanding of hammer's I/O system