Env entity maker

From Valve Developer Community
Revision as of 14:39, 7 March 2023 by THE OWL (talk | contribs) (Test)
Jump to navigation Jump to search
English (en)Русский (ru)中文 (zh)Translate (Translate)

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

C++ In code, it is represented by theCEnvEntityMakerclass, defined in theenv_entity_maker.cppfile.

Flags

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

Keyvalues

start ([todo internal name (i)])
EntityTemplate ([todo internal name (i)]) <targetname>
Point_template To Spawn
PostSpawnSpeed ([todo internal name (i)]) <float>
PostSpawn Movement Speed
PostSpawnDirection ([todo internal name (i)]) <angle>
PostSpawn Movement Direction
PostSpawnDirectionVariance ([todo internal name (i)]) <float>
PostSpawn Direction Variance
PostSpawnInheritAngles ([todo internal name (i)]) <boolean>
PostSpawn Inherit Angles


end ([todo internal name (i)])

Inputs

ForceSpawn
Spawn an instance of the template at this origin and angle.
ForceSpawnAtEntityOrigin <targetnameRedirectInput/string>
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.