From Valve Developer Community
Jump to: navigation, search

env_entity_maker is a point entity available in all Source games.

Entity description

It spawns the specified entity template at the env_entity_maker's origin. If set to auto-spawn, it will spawn the template whenever there's room and the player is looking elsewhere.


Point_template To Spawn <targetname>
Name of the point_template to spawn here.
PostSpawn Movement Speed <float>
If specified, all the entities created in the template will move this fast in the specified PostSpawn Movement Direction.
PostSpawn Movement Direction <angle>
If a PostSpawn Movement Speed is specified, all the entities created in the template will move in this direction.
PostSpawn Direction Variance <float>
This variance is applied to the PostSpawn Movement Direction for each spawned entity in the template. Use it to apply some randomness to the directions.
PostSpawn Inherit Angles <boolean>
If in hierarchy, is spawn direction in world space, or object local space of parent


Name <string>
The targetname that other entities refer to this entity by.
Entity Scripts <scriptlist> (New with Left 4 Dead 2)
Space delimited list of VScript files (without file extension) that are executed after all entities have spawned. The scripts are all executed in the same script scope, later ones overwriting any identical variables and functions.
Script think function <string> (New with Left 4 Dead 2)
Name of a function in this entity's script which will be called automatically every 100 milliseconds (ten times a second) for the duration of the script. It can be used to create timers or to simulate autonomous behavior. The return value (if present) will set the time until the next call.
Note:Try to avoid expensive operations in this function, as it may cause performance problems.


Parent <targetname>
Specifies a movement parent. An entity will maintain its initial offset from its parent. An attachment point can be added to the end of the name, separated by a comma.


Pitch Yaw Roll (Y Z X) <angle>
This entity's orientation in the world. Pitch is rotation around the Y axis, yaw is the rotation around the Z axis, roll is the rotation around the X axis.


  • 1 : Enable AutoSpawn (will spawn whenever there's room)
  • 2 : AutoSpawn: Wait for entity destruction
  • 4 : AutoSpawn: Even if the player is looking
  • 8 : ForceSpawn: Only if there's room
  • 16 : ForceSpawn: Only if the player isn't looking


Spawn an instance of the template at this origin and angle.
ForceSpawnAtEntityOrigin  <targetname>
Spawn an instance of the template that the same origin and angle as the specified entity (specify by targetname in parameters)


Removes this entity from the world.
Removes this entity and all its children from the world.
AddOutput  <string>
Evaluates a keyvalue/output on this entity. It can be potentially very dangerous, use with care.
Format: <key> <value>
Format: <output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire, -1 means infinite>
FireUser1 to FireUser4
Fire the OnUser outputs; see User Inputs and Outputs.
Use  !FGD
Same as a player invoking +use; may not do anything. Can also be invoked by creating an output that does not specify an input.
This input is not included in Valve's FGDs.
RunScriptFile  <script> (New with Left 4 Dead 2)
Execute a VScript file from disk, without file extension. The script contents are merged with the script scope of the receiving entity.
RunScriptCode  <string> (New with Left 4 Dead 2)
Execute a string of VScript source code in the scope of the entity receiving the input. String quotation may be needed when fired via console.
In <Left 4 Dead 2>, the code is executed in the script scope of the entity that fires the output, not the one receiving the input.
Warning:Never try to pass string parameters to a script function with this input. It will corrupt the VMF structure because of the nested quotation marks, which then must be removed manually with a text editor.
CallScriptFunction  <string> (New with Left 4 Dead 2)
Execute a VScript function in the scope of the receiving entity.
Note:This input is missing from some games FGD files.


SetParent  <string>
Move with this entity. See Entity Hierarchy (parenting).
SetParentAttachment  <string>
Change this entity to attach to a specific attachment point on its parent. The entity will teleport so that the position of its root bone matches that of the attachment. Entities must be parented before being sent this input.
SetParentAttachmentMaintainOffset  <string>
As above, but without teleporting. The entity retains its position relative to the attachment at the time of the input being received.
Removes this entity from the the movement hierarchy, leaving it free to move independently.


Fired when an instance of the entity template has been spawned.
Fired when a ForceSpawn input failed to spawn the template, either due to lack of space or being in player's view, depending on the spawnflags.
OnUser1 to OnUser4
These Outputs each fire in response to the firing of the like-numbered FireUser1 to FireUser4 Input; see User Inputs and Outputs.

(New with Left 4 Dead)

This Output fires when the entity is killed and removed from the game.