Npc template maker

From Valve Developer Community
Revision as of 15:12, 18 March 2007 by Maven (talk | contribs) (Entity Description: mentioned how to make the NPC a template)
Jump to: navigation, search


Entity Description

Npc maker.png

Used for spawning clones of particular template NPCs when triggered, either to provide enemies for an ambush or to replace killed enemies in a standoff-type situation. For a simpler version which doesn't use template entities, see the npc_maker entity, or alternatively see the point_template entity which is more suited for spawning an entire squad into the appropriate positions.

For this to work, the target NPC must be marked as a template NPC. The easiest way to do this is to set the "Template NPC" spawnflag on the NPC.


  • TemplateName
<target_destination> Template NPC that this maker should be creating clones of.
  • Radius
<float> Radius around this maker within which NPCs are to be placed. Spawned NPCs will try and find empty space within this radius to spawn.
  • DestinationGroup
<target_destination> If you'd like spawned NPCs to be created at an info_npc_spawn_destination entity, enter the name of that entity here. If you have more than one destination entity by that name, the Destination Criteria will be used to select one from the group.
  • CriterionVisibility
<choices> Should the NPC try to spawn at a destination that the player can see? Only applicable if a Destination Group is being used.
Literal Value Description
0 Yes
1 No
2 Don't Care
  • CriterionDistance
<choices> Should the NPC try to spawn nearest to or farthest from the player's current location? Only applicable if a Destination Group is being used.
Literal Value Description
0 Nearest
1 Farthest
2 Don't Care
<integer> Minimum spawn distance from player
The spawn destination node distance to the player will have to be further or equal than this value.


  • 256 : Always use radius spawn
  • 512 : Don't preload template models


  • SpawnNPCInRadius
Spawn an NPC somewhere within the maker's radius.
  • SpawnNPCInLine
Spawn an NPC somewhere within a line behind the maker.
  • ChangeDestinationGroup <string>
Switch to a different set of Destination entities.
Set the minimum spawn distance from player to destination node.


See Also

  • npc_maker - simpler version which doesn't use a template NPC entity.
  • point_template - spawns NPCs (or other entities) in-place; can deal with up to sixteen different targetnames simultaneously, and multiple entities per targetname.