Difference between revisions of "TF2/Creating Respawning Sentries"

From Valve Developer Community
< TF2
Jump to: navigation, search
(Creating new article. I don't have any pictures, so this article will need pictures, similar to Creating Respawning Dispensers.)
 
(Create env_entity_maker)
Line 8: Line 8:
 
Create an equal number of [[env_entity_maker]] entities as you have sentries. Set Name to "sentryspawner1", "sentryspawner2", etc. Set 'Point_template To Spawn' to the matching point_template, so env_entity_maker "senspawner1" will have 'Point_template To Spawn' value "sentrytemplate1".
 
Create an equal number of [[env_entity_maker]] entities as you have sentries. Set Name to "sentryspawner1", "sentryspawner2", etc. Set 'Point_template To Spawn' to the matching point_template, so env_entity_maker "senspawner1" will have 'Point_template To Spawn' value "sentrytemplate1".
  
'''NOTE:''' If you don't want a generic "Player" <death symbol> "Sentry Gun" message every time a player destroys a dispenser, don't add any env_entity's.
+
{{Note|If you don't want a generic "Player" <death symbol> "Sentry Gun" message every time a player destroys a dispenser, don't add any env_entity's.}}
  
 
== Sentry Outputs ==
 
== Sentry Outputs ==

Revision as of 15:44, 20 December 2009

Create Sentries

Start by placing a few obj_sentrygun entities in your map. Name the first "sentry1", the second "sentry2", and so on.

Create point_template

Add an equal number of point_template entities as you have sentries. Set Name to "sentrytemplate1", "sentrytemplate2", etc. Set 'Template1' to the matching sentry, so point_template will have 'Template1' value "sentry1".

Create env_entity_maker

Create an equal number of env_entity_maker entities as you have sentries. Set Name to "sentryspawner1", "sentryspawner2", etc. Set 'Point_template To Spawn' to the matching point_template, so env_entity_maker "senspawner1" will have 'Point_template To Spawn' value "sentrytemplate1".

Note.png Note: If you don't want a generic "Player" <death symbol> "Sentry Gun" message every time a player destroys a dispenser, don't add any env_entity's.

Sentry Outputs

On the output tab for each sentry, add these values with the corresponding numbers:

My output named: OnDestroyed
Target entities named: template1
Via this input: ForceSpawn
After a delay in seconds of: 10

Hammer will say this is an invalid output, ignore that. Adjust the delay to the number of seconds you want the sentries to take to respawn.

Set Initial Sentries

If you test your map now, you will find there are no sentries on your map! So, we need to add some. Select all your sentries, and make a copy set. Once you've copied them, go into the copied sentries' properties and delete the Name value. Move the copied sentries on top of your original ones. Now, when your map loads, there should be a set of sentries, which, when destroyed, make another one spawn in its place.

See Also