env_entity_maker
From Valve Developer Community
This is a point entity available in all Source games.
Contents |
Entity Description
Spawns the specified entity template at its origin. If set to auto-spawn, it will spawn the template whenever there's room and the player is looking elsewhere.
Keyvalues
Targetname:
- Name <string>
- The targetname other entities refer to this entity by.
Parentname:
- Parent
<targetname> - Specifies the targetname of this entity's movement parent. Entities with parents move with their parent.
Angles:
- Pitch Yaw Roll (Y Z X)
<angle> - This entity's angular orientation in the world.
- EntityTemplate <target_destination>
- Name of the point_template to spawn here.
- PostSpawnSpeed
- <float> If specified, all the entities created in the template will move this fast in the specified PostSpawn Movement Direction.
- PostSpawnDirection
- <angle> If a PostSpawn Movement Speed is specified, all the entities created in the template will move in this direction.
- PostSpawnDirectionVariance
- <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.
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
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> -
FireUser1toFireUser4 - Fire the
OnUseroutputs; see User Inputs and Outputs.
Parentname:
-
SetParent <targetname> - Move with this entity. See Entity Hierarchy (parenting).
-
SetParentAttachment <string> - Attach to a named attachment on the current parent. The entity will teleport so that the position of its root bone matches that of the attachment.
-
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 its current movement hierarchy.
- ForceSpawn
- Spawn an instance of the template at this origin and angle.
- ForceSpawnAtEntityOrigin <target_destination> (New with Orange Box)
- Spawn an instance of the template that the same origin and angle as the specified entity (specify by targetname in parameters)
Outputs
Targetname:
-
OnUser1toOnUser4 - Fired in response to the
FireUserinputs; see User Inputs and Outputs. -
OnKilled(New with Left 4 Dead) - Fired when the entity is killed and removed from the game.
- 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.
Usage
To make an entity spawn in the same position as it is shown in hammer leave the postspawn properties as 0 and make sure that the point_template entity is in the position on the map as the env_entity_maker because entities will be moved from shown position by that that the env_entity_maker is moved from the point_template
