Env entity maker

From Valve Developer Community
Revision as of 16:29, 27 November 2011 by XFunc CaRteR (talk | contribs) (→‎Usage)
Jump to navigation Jump to search

Template:Base point 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.

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.

[Todo]:What does this gibberish mean?

Keyvalues

Point_template To Spawn ([todo internal name (i)]) <targetname>
Name of the point_template to spawn here.
PostSpawn Movement Speed ([todo internal name (i)]) <float>
If specified, all the entities created in the template will move this fast in the specified PostSpawn Movement Direction.
PostSpawn Movement Direction ([todo internal name (i)]) <angle>
If a PostSpawn Movement Speed is specified, all the entities created in the template will move in this direction.
PostSpawn Direction Variance ([todo internal name (i)]) <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 ([todo internal name (i)]) <boolean>
If in hierarchy, is spawn direction in world space, or object local space of parent
Name (targetname) <string>[ Edit ]
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

Parentname:
Parent (parentname) <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) (angles) <QAngle>
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 <targetnameRedirectInput/string>
Spawn an instance of the template that the same origin and angle as the specified entity (specify by targetname in parameters)


Parentname:
SetParent <stringRedirectInput/string>
Move with this entity. See Entity Hierarchy (parenting).
SetParentAttachment <stringRedirectInput/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 <stringRedirectInput/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.