env_entity_maker

From Valve Developer Community

Jump to: navigation, search

env_entity_maker is a point entity available in all Source games.

Contents

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.

Keyvalues

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

Targetname:

Name <string>
The targetname that other entities refer to this entity by.
Entity Scripts <scriptlist> (New with Left 4 Dead 2)
Name(s) of script files that are executed after all entities have spawned.
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.
Note:Try to avoid expensive operations in this function, as it may cause performance problems.

Parentname:

Parent <targetname>
Specifies a movement parent. An entity will maintain its initial offset from its parent.

Angles:

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.

Flags

  • 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

Inputs

ForceSpawn
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)

Targetname:

Kill
Removes this entity from the world.
KillHierarchy
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 game script file from disk.
RunScriptCode  <string> (New with Left 4 Dead 2)
Execute a string of script source code. String quotation may be needed when fired via console.
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 game script function.

Parentname:

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.
ClearParent
Removes this entity from the the movement hierarchy, leaving it free to move independently.

Outputs

OnEntitySpawned
Fired when an instance of the entity template has been spawned.
OnEntityFailedSpawn
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.
OnKilled  

(New with Left 4 Dead)

This Output fires when the entity is killed and removed from the game.
Personal tools
Namespaces
Variants
Actions