TF2/Creating Respawning Dispensers
Start by placing a few obj_dispenser entities in your map. Name the first "spawned1", the second "spawned2", and so on.
Add an equal number of point_template entities as you have dispensers. Set 'Name' to "template1", "template2", etc. Set 'Template1' to the matching dispenser, so point_template will have 'Template1' value "spawned1". In the 'Flags' tab, tick "Don't remove template entities" to make sure the dispensers spawn on start-up.
Create an equal number of env_entity_maker entities, one entity per dispenser. Set 'Name' to "spawner1", "spawner2", etc. Set 'Point_template To Spawn' to the matching point_template, so env_entity_maker "spawner1" will have 'Point_template To Spawn' value "template1".
On the output tab for each dispenser, add these values with the corresponding numbers:
- My output named:
- Target entities named:
- Via this input:
- After a delay in seconds of:
OnDestroyed is not one of the selectable outputs, so Hammer will say this is invalid. Ignore that, it will work in game. Adjust the delay to the number of seconds you want the dispenser to take to respawn.
Now, when your map loads, there should be a set of dispensers, which, when destroyed, make another one spawn in its place.