Template:Archived Page History/Env entity maker/en: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Update to use the descriptions provided in CS2's fgd file, as it was reworded to be easier to understand)
(-removed duplicate info, see also)
Line 1: Line 1:
{{langsp}}<!-- Add the categories to the main page, not here -->
{{langsp}}<!-- Add the categories to the main page, not here -->
{{infotable
|env_entity_maker
|img=[[File:Env entity maker.png]]
|type=e0
|engine=2
|in=0
}}


{{CD|CEnvEntityMaker|file1=env_entity_maker.cpp}}
{{CD|CEnvEntityMaker|file1=env_entity_maker.cpp}}
It spawns a specified {{Ent|point_template}} entity at the <code>env_entity_maker</code>'s [[origin]]. It can be set to spawn automatically or through inputs.
It spawns a specified {{ent|point_template}} entity at the <code>env_entity_maker</code>'s [[origin]]. It can be set to spawn automatically or through inputs.
 


== Flags ==
== Flags ==
Line 35: Line 26:
{{IO|OnEntitySpawned|Fired when an instance of the entity template has been spawned.}}
{{IO|OnEntitySpawned|Fired when an instance of the entity template has been spawned.}}
{{IO|OnEntityFailedSpawn|Fired when a <code>ForceSpawn</code> input failed to spawn the template, either due to lack of space or being in player's view, depending on the spawnflags.}}
{{IO|OnEntityFailedSpawn|Fired when a <code>ForceSpawn</code> input failed to spawn the template, either due to lack of space or being in player's view, depending on the spawnflags.}}
== See Also ==
* {{ent|point_template}}

Revision as of 09:27, 19 June 2024

Flag-white.pngEnglish (en)
C++ Class hierarchy
CEnvEntityMaker
CPointEntity
CBaseEntity
C++ env_entity_maker.cpp

It spawns a specified point_template entity at the env_entity_maker's origin. It can be set to spawn automatically or through inputs.

Flags

Enable AutoSpawn Spawn template whenever there's enough room to fit it, and the player is not looking. : [1]
AutoSpawn
Wait for entity to be destroyed. : [2]
AutoSpawn
Spawn even if the player is looking. : [4]
ForceSpawn
Spawn only if there's enough room to fit the object. : [8]
ForceSpawn
Spawn only if the player isn't looking. : [16]

Keyvalues

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

Point_template To Spawn (EntityTemplate) <targetname>
Name of the point_template to spawn here. If there is an offset between the point_template and its spawned entities in hammer, that offset will be maintained when spawning happens relative to the env_entity_maker.
PostSpawn Movement Speed (PostSpawnSpeed) <float>
All entities spawned will move this many hammer units per second in the direction of PostSpawn Movement Direction.
PostSpawn Movement Direction (PostSpawnDirection) <angle>
If a PostSpawn Movement Speed is specified, this angle will be added to the movement direction of all the entities created by the template.
PostSpawn Direction Variance (PostSpawnDirectionVariance) <float>
The PostSpawn Movement Direction may vary by this many degrees. This is a radius.
PostSpawn Inherit Angles (PostSpawnInheritAngles) <boolean>
If checked, uses the parent's forward vector as the spawn direction. Otherwise uses the env_entity_maker's forward.

Inputs

ForceSpawn
Spawn an instance of the template at this origin and angle.
ForceSpawnAtEntityOrigin <targetname>
Spawn an instance of the template at the same origin and angles as a specified entity.

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.

See Also