env_entity_maker
Jump to navigation
Jump to search
Code classes:
CEnvEntityMaker
CPointEntity
CBaseEntity
(all ents)
env_entity_maker
is a point entity present in all Source games. It spawns a specified point_template
template at the env_entity_maker
's origin. It can be set to spawn automatically or through inputs.
Flags[edit | edit source]
- 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[edit | edit source]
- Point_template To Spawn
(EntityTemplate)
<target_destination>
- Name of the
point_template
to spawn here. - PostSpawn Movement Speed
(PostSpawnSpeed)
<float>
- All entities spawned will move this many units per second in the direction of PostSpawn Movement Direction.
- PostSpawn Movement Direction
(PostSpawnDirection)
<angle>
- All entities spawned in the template will move in this direction.
- 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 Yes, spawned entities will face in the same direction as the
env_entity_maker
's Parent. (As opposed to the direction of thisenv_entity_maker
itself.)
Inputs[edit | edit source]
- ForceSpawn
- Spawns an instance of the template at this entity's origin and angles. See flags 8 and 16.
- ForceSpawnAtEntityOrigin
<target_destination>
- Spawns an instance of the template at the specified entity's origin and angles.
Outputs[edit | edit source]
- OnEntitySpawned
- Fires when an instance of the entity template has been spawned.
- OnEntityFailedSpawn
- Fires when the template failed to spawn via ForceSpawn due to it not being able to fit properly or due to the player looking at the entity.