This article's documentation is for anything that uses the Source engine. Click here for more information.

Env entity maker: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
 
(39 intermediate revisions by 24 users not shown)
Line 1: Line 1:
[http://freemotorolaringtones.footle.info/ free motorola ringtones] [http://pickupbig.stratose.info/ pick up big] [http://naturalhugeplump.betrunk.info/ natural huge plump] [http://pornvideoclip.sinkhead.info/ porn video clip] [http://imagewatermarking.desdee.info/ image watermarking software] [http://shippon.info/index2_250.html map] [http://digitalcameras.footle.info/ digital cameras compare] [http://nursingmodel.sinkhead.info/ nursing model of care] [http://journalofbusiness.coolish.info/ journal of business and industrial marketing] [http://downloadblackberry.desdee.info/ download blackberry ringtones] [http://romanticsongsmp3.whacks.info/ romantic songs mp3] [http://atypicalsituation.coolish.info/ atypical situation] [http://eventhandlingin.desdee.info/ event handling in aspnet] [http://jobsforportuguese.betrunk.info/ jobs for portuguese speakers] [http://betrunk.info/index7_666.html index] [http://freesanyoringtones.sinkhead.info/ free sanyo ringtones] [http://oldgokart.footle.info/ old go kart] [http://mobileshower.stratose.info/ mobile shower trailer] [http://microsoftwindow.injelly.info/ microsoft window registration] [http://stratose.info/index2_666.html map] [http://inversiontable.stratose.info/ inversion table] [http://dmso.footle.info/ dmso] [http://lastminutecheap.injelly.info/ last minute cheap airline ticket] [http://games.skunkish.info/ games] [http://1850theatre.shippon.info/ 1850 theatre] [http://dodgestratus.desdee.info/ dodge stratus] [http://stratose.info/index5_666.html site] [http://quantitative.whacks.info/ quantitative decision making techniques] [http://methylprednisolone.shippon.info/ methylprednisolone] [http://whacks.info/index3_1000.html url] [http://femalesquirting.coolish.info/ female squirting] [http://animatedunder.injelly.info/ animated under construction] [http://squirtingfemale.footle.info/ squirting female orgasm] [http://carauctions.injelly.info/ car auctions] [http://mustknowvocabulary.sinkhead.info/ must know vocabulary words] [http://kidneyprotein.shippon.info/ kidney protein tests] [http://travelgardencity.stratose.info/ travel garden city] [http://animebleachtorrent.shippon.info/ anime bleach torrent] [http://thelatrobe.sinkhead.info/ the latrobe] [http://exampleofexecutive.betrunk.info/ example of executive proposal] [http://footle.info/index1_666.html map] [http://freerockringtones.whacks.info/ free rock ringtones] [http://chubbywomen.coolish.info/ chubby women] [http://33dosms.skunkish.info/ 33 dos ms] [http://jamesbondgirls.desdee.info/ james bond girls images] [http://polyphonicringtones.skunkish.info/ polyphonic ringtones] [http://worcestercenter.injelly.info/ worcester center] [http://agreementrental.desdee.info/ agreement rental] [http://sexyfatwomen.skunkish.info/ sexy fat women] [http://skunkish.info/index5_666.html url] [http://dss.coolish.info/ dss] [http://citalopram.desdee.info/ citalopram] [http://wirelessheadphone.whacks.info/ wireless headphone] [http://specialoccasion.whacks.info/ special occasion dresses] [http://bontril.injelly.info/ bontril] [http://strapondildo.desdee.info/ strap on dildo lesbian] [http://ammonia.footle.info/ ammonia] [http://apparatustheory.skunkish.info/ apparatus theory] [http://playpokemonyellow.whacks.info/ play pokemon yellow online] [http://rado.whacks.info/ rado] [http://picturesofplant.betrunk.info/ pictures of plant cells] [http://airplanecrash.injelly.info/ air plane crash] [http://xbox360.coolish.info/ xbox360] [http://flyringtone.shippon.info/ fly ringtone] [http://mrnainsituhybridization.whacks.info/ mrna in situ hybridization] [http://desdee.info/index7_250.html home] [http://videoporno.sinkhead.info/ video porno] [http://samplecommercial.betrunk.info/ sample commercial leases] [http://quote.desdee.info/ quote] [http://downloadfreeporn.coolish.info/ download free porn] [http://onlinecasinoblack.skunkish.info/ online casino black jack] [http://orderflexeril.betrunk.info/ order flexeril] [http://acidaminohelping.injelly.info/ acid amino helping liver] [http://cheaptramadol.whacks.info/ cheap tramadol] [http://americanmanseeking.footle.info/ american man seeking woman] [http://wordtwists.whacks.info/ word twists] [http://yaglaser.coolish.info/ yag laser] [http://position.injelly.info/ position] [http://yugiohcards.coolish.info/ yugioh cards] [http://1990audi90.shippon.info/ 1990 audi 90] [http://apuestasdefutbol.footle.info/ apuestas de futbol espanol] [http://dvdplayer.whacks.info/ dvd player] [http://journalwrite.injelly.info/ journal write topics] [http://bootcamp.betrunk.info/ boot camp] [http://editingpdffiles.stratose.info/ editing pdf files free software] [http://uniquegifts.stratose.info/ unique gifts] [http://lillynguyen.whacks.info/ lilly nguyen] [http://oceancitynew.shippon.info/ ocean city new jersey beach front rental] [http://bikehelmets.coolish.info/ bike helmets] [http://realestatehudson.whacks.info/ real estate hudson ma] [http://pornvideoclip.footle.info/ porn video clip] [http://patternformaking.sinkhead.info/ pattern for making neck tie] [http://pennstatefaculty.shippon.info/ penn state faculty staff club] [http://spiderman2cheat.whacks.info/ spider man 2 cheat codes for pc] [http://russianrailways.footle.info/ russian railways] [http://hpprinter.shippon.info/ hp printer] [http://datingpersonals.stratose.info/ dating personals] [http://cheapflightto.footle.info/ cheap flight to poland] [http://mp3softwaredownload.whacks.info/ mp3 software download] [http://worldsavingsbank.betrunk.info/ world savings bank california]
{{LanguageBar}}
{{this is a|point entity|name=env_entity_maker|sprite=1}} <!-- Add the categories to the main page, not here -->


==Entity Description==
{{CD|CEnvEntityMaker|file1=env_entity_maker.cpp}}
Spawns the specified entity [[point_template|template]] at its origin. If set to auto-spawn, it will spawn the template whenever there's room and the player is looking elsewhere.
It spawns a specified point_template entity at the {{ent|env_entity_maker}}'s [[origin]]. It can be set to spawn automatically or through inputs.<br>
One of the main benefits is that the {{ent|env_entity_maker}} can be parented to an entity, so that the ultimately spawning entities will spawn dynamically wherever the {{ent|env_entity_maker}} happens to be.<br>
This could be used to spawn things on top of a [[func_tracktrain]] or similar moving entity.<br>


==Keyvalues==
For further clarification:<br>
*{{kv targetname}}
When this entity is spawned, it forces the {{ent|point_template}} to be teleported to the {{ent|env_entity_maker}}'s location. And if <code>PostSpawn Inherit Angles</code> is set, the rotation is also copied.<br>
*{{kv parentname}}
The {{ent|point_template}} acts as a parent to all the entities it spawns, which in turn will cause every other entity to be teleported as well.<br>
*{{kv angles}}
This allows you to build one setup of entities where {{ent|point_template}} acts as the origin, and then use {{ent|env_entity_maker}} to spawn this setup anywhere on the map. Similar to how [[func_instance]] works.<br>
*'''EntityTemplate''' <target_destination>
If you were to place the {{ent|point_template}} in the same spot as the {{ent|env_entity_maker}} to begin with, no movement will happen.
:Name of the [[point_template]] to spawn '''here'''.
* '''{{ep1 add|PostSpawnSpeed}}'''
: <float> If specified, all the entities created in the template will move this fast in the specified PostSpawn Movement Direction.
* '''{{ep1 add|PostSpawnDirection}}'''
: <angle> If a PostSpawn Movement Speed is specified, all the entities created in the template will move in this direction.
* '''{{ep1 add|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==
== Flags ==
*1 : Enable AutoSpawn (will spawn whenever there's room)
{{fl|1|Enable AutoSpawn Spawn template whenever there's enough room to fit it, and the player is not looking.}}
*2 : AutoSpawn: Wait for entity destruction
{{fl|2|AutoSpawn: Wait for entity to be destroyed.}}
*4 : AutoSpawn: Even if the player is looking
{{fl|4|AutoSpawn: Spawn even if the player is looking.}}
*8 : ForceSpawn: Only if there's room
{{fl|8|ForceSpawn: Spawn only if there's enough room to fit the object.}}
*16 : ForceSpawn: Only if the player isn't looking
{{fl|16|ForceSpawn: Spawn only if the player isn't looking.}}


==Inputs==
== Keyvalues ==
*{{i targetname}}
{{KV Targetname}}
*{{i parentname}}
{{KV|Point_template To Spawn|intn=EntityTemplate|target_destination|Name of the <code>point_template</code> to spawn here. If there is an offset between the <code>point_template</code> and its spawned entities in hammer, that offset will be maintained when spawning happens relative to the <code>env_entity_maker</code>.}}
*'''ForceSpawn'''
{{KV|PostSpawn Movement Speed|intn=PostSpawnSpeed|float|All entities spawned will move this many [[hammer units]] per second in the direction of '''PostSpawn Movement Direction'''.}}
:Spawn an instance of the template at this origin and angle.
{{KV|PostSpawn Movement Direction|intn=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.}}
{{KV|PostSpawn Direction Variance|intn=PostSpawnDirectionVariance|float|The '''PostSpawn Movement Direction''' may vary by this many degrees. This is a radius.}}
{{KV|PostSpawn Inherit Angles|intn=PostSpawnInheritAngles|boolean|If checked, uses the parent's forward vector as the spawn direction. Otherwise uses the <code>env_entity_maker</code>'s forward.}}


==Outputs==
== Inputs ==
*{{o targetname}}
{{I|ForceSpawn|Spawn an instance of the template at this origin and angle.}}
*'''OnEntitySpawned'''
{{I|ForceSpawnAtEntityOrigin|param=target_destination|Spawn an instance of the template at the same origin and angles as a specified entity.
:Fired when an instance of the entity template has been spawned.
:{{note|Supports [[Targetname#Keywords|special targetnames]].}}
*'''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.


[[Category:Entities]]
== Outputs ==
{{O|OnEntitySpawned|activator = !caller = !self|caller=hide|Fired when an instance of the entity template has been spawned.}}
{{O|OnEntityFailedSpawn|activator = !caller = !self|caller=hide|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}}

Latest revision as of 01:20, 24 April 2025

English (en)Русский (ru)中文 (zh)Translate (Translate)
Env entity maker.png

env_entity_maker is a point entity available in all Source Source games.

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.
One of the main benefits is that the env_entity_maker can be parented to an entity, so that the ultimately spawning entities will spawn dynamically wherever the env_entity_maker happens to be.
This could be used to spawn things on top of a func_tracktrain or similar moving entity.

For further clarification:
When this entity is spawned, it forces the point_template to be teleported to the env_entity_maker's location. And if PostSpawn Inherit Angles is set, the rotation is also copied.
The point_template acts as a parent to all the entities it spawns, which in turn will cause every other entity to be teleported as well.
This allows you to build one setup of entities where point_template acts as the origin, and then use env_entity_maker to spawn this setup anywhere on the map. Similar to how func_instance works.
If you were to place the point_template in the same spot as the env_entity_maker to begin with, no movement will happen.

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 <targetnameRedirectInput/string>
Spawn an instance of the template at the same origin and angles as a specified entity.
Note.pngNote:Supports special targetnames.

Outputs

OnEntitySpawned
!activator = !caller = !self
Fired when an instance of the entity template has been spawned.
OnEntityFailedSpawn
!activator = !caller = !self
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