Эта статья документации для всего, что использует платформу Source. Нажмите для получения дополнительной информации.

env_entity_maker

From Valve Developer Community
< Ru
Jump to: navigation, search
English (en)Русский (ru)中文 (zh)Translate (Translate)
Env entity maker.png

env_entity_maker - это точечная энтити(en), доступно для всех игр на движке Source Source.

Info content.png
This page has not been fully translated.

You can help by finishing the translation.

Also, please make sure the article tries to comply with the alternate languages guide.

энтити в центр(en) env_entity_maker. Он может быть создан автоматически или через ввод.

env_entity_maker
Env entity maker.png
ТипТочечный объект мира
ПлатформаSource Source
ДоступностьВо всех играх
 
В коде это представлено классом CEnvEntityMaker, определённым в файле env_entity_maker.cpp.

Флаги

  • 1: Enable AutoSpawn - Создаёт энтити где угодно в комнате, в которой хватит места для энтити, и где не смотрит игрок.
  • 2: AutoSpawn: Ждёт энтити для самоуничтожения.
  • 4: AutoSpawn: Создаётся, там, где даже смотрит игрок.
  • 8: ForceSpawn: Создаётся только, если в комнате хватит места для объекта.
  • 16: ForceSpawn: Создаётся, только если игрок не смотрит.

Keyvalues

Point_template To Spawn (EntityTemplate) ([todo internal name (i)]) <targetname(en)>
Name of the point_template to spawn here.
PostSpawn Movement Speed (PostSpawnSpeed) ([todo internal name (i)]) <float(en)>
All entities spawned will move this many hammer units(en) per second in the direction of PostSpawn Movement Direction.
PostSpawn Movement Direction (PostSpawnDirection) ([todo internal name (i)]) <angle(en)>
All entities spawned in the template will move in this direction.
PostSpawn Direction Variance (PostSpawnDirectionVariance) ([todo internal name (i)]) <float(en)>
The PostSpawn Movement Direction may vary by this many degrees. This is a radius.
PostSpawn Inherit Angles (PostSpawnInheritAngles) ([todo internal name (i)]) <boolean(en)>
If Yes, offset the spawn angles by the angles of a Parent.

Base:

Name (targetname) <string(en)>
Название объекта по которому другие объекты могут ссылаться на этот объект.
Parent (parentname) <targetname(en)>
Maintain the same initial offset to this entity. An attachment point can also be used if separated by a comma at the end. (parentname [targetname],[attachment])
Tip.pngСовет:Entities transition to the next map with their parents
Tip.pngСовет:phys_constraint can be used as a workaround if parenting fails.
Origin (X Y Z) (origin) <coordinates(en)>
Положение центра этого объекта в пространстве мира. Rotating entities typically rotate around their origin.
Icon-Bug.pngБаг:Hammer does not move the entities accordingly in the editor.  [todo tested in?]
Pitch Yaw Roll (Y Z X) (angles) <angle(en)>
Ориентация этого объекта в пространстве мира. Тангаж (Pitch) - вращение вокруг оси Y, рысканье(yaw) - вращение вокруг оси Z, крен(roll) - вращение вокруг оси X.
Note.pngПримечание:This works on brush entities, although Hammer doesn't show the new angles.
Classname (classname) <string(en)> Отсутствует в FGD!
Определяет свойства объекта до его появления.
Tip.pngСовет:Changing this on runtime still has use, like making matching an entry in S_PreserveEnts will persist the entity on new rounds!
Spawnflags (spawnflags) <flags(en)> Отсутствует в FGD!
Переключает специфические возможности объекта, конечное числовое значение определется комбинацией включенных возможностей.
Effects (effects) <flags(en)> Отсутствует в FGD!
Набор эффектов для использования.
Entity Scripts (vscripts) <scriptlist(en)> (Во всех играх начиная с Left 4 Dead 2) (также в Team Fortress 2)
Space delimited list of VScript files (without file extension) that are executed after all entities have spawned. The scripts are all executed in the same script scope, later ones overwriting any identical variables and functions. Scripts executed on the worldspawn entity will be placed in root scope.
Think function (thinkfunction) <string(en)> (Во всех играх начиная с Left 4 Dead 2) (также в Team Fortress 2)
Name of the function within this entity's script that'll be called automatically every 100 milliseconds, or a user-defined interval if the function returns a number. Avoid expensive operations in this function, as it may cause performance problems.
Lag Compensation (LagCompensate) <boolean(en)> (Во всех играх начиная с Left 4 Dead 2) Отсутствует в FGD!
Set to Yes to lag compensate this entity. Should be used very sparingly!
Is Automatic-Aim Target (is_autoaim_target) <boolean(en)> (Во всех играх начиная с Counter-Strike: Global Offensive) Отсутствует в FGD!
If set to 1, this entity will slow down aiming movement for consoles and joystick controllers when the entity is under the crosshairs.

Inputs

ForceSpawn
Spawn an instance of the template at this origin and angle.
ForceSpawnAtEntityOrigin <targetname(en)>
Spawn an instance of the template at the same origin and angles as a specified entity.
CBaseEntity:
AddContext <string(en)>
Adds to the entity's list of response contexts. See Context.
AddOutput(en) <string(en)>
Assigns a new keyvalue/output on this entity. For keyvalues, some rely on extra necessary code to be ran and won't work if its simply just changed through this input. There is a strict format that must be followed:
// Format of changing KeyValues: "AddOutput [key] [value]"
//// Raw text:
"OnUser1" "!self,AddOutput,targetname new_name"

// Format of adding an Output: "AddOutput {targetname}:{inputname}:{parameter}:{delay}:{max times to fire, -1 means infinite}"
//// Raw text:
"OnUser1" "!self,AddOutput,OnUser1:SetParent:!activator:0.0:-1"
// Arguments can be left blank, but the empty blank should still be contained.
//// Raw text:
"OnUser1" "!self,AddOutput,OnUser1:ClearParent::0.0:-1"
ClearContext
Removes all contexts from this entity's list.
ClearParent
Removes this entity from the movement hierarchy, leaving it free to move independently.
FireUser1 to FireUser4
Fires the respectiveOnUseroutputs; see User Inputs and Outputs.
Kill
Removes this entity and any entities parented to it from the world.
KillHierarchy
Functions the same as Kill, although this entity and any entities parented to it are killed on the same frame, being marginally faster thanKillinput.
RemoveContext <string(en)>
Remove a context from this entity's list. The name should match the key of an existing context.
SetParent <string(en)>
Move with this entity. See Entity Hierarchy (parenting).
SetParentAttachment <string(en)>
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 <string(en)>
As above, but without teleporting. The entity retains its position relative to the attachment at the time of the input being received.
Use  Отсутствует в FGD!
Same as a player invoking +use; no effect in most cases.
SetTeam <integer(en)> Отсутствует в FGD!
Changes this entity's team.
TeamNum <integer(en)> Отсутствует в FGD!
This input changes value for TeamNum property.
DispatchResponse <string(en)> Отсутствует в FGD!
Dispatches a response to the entity. See Response and Concept.
DispatchEffect <string(en)> (удалено начиная с Left 4 Dead) Отсутствует в FGD!
Dispatches a special effect from the entity's origin; See also List of Client Effects. Replaced by the particle system since Left 4 Dead.
RunScriptFile <script(en)> (Во всех играх начиная с Left 4 Dead 2) (также в Team Fortress 2)
Execute a VScript file from disk, without file extension. The script contents are merged with the script scope of the receiving entity.
RunScriptCode <string(en)> (Во всех играх начиная с Left 4 Dead 2) (также в Team Fortress 2)
Execute a string of VScript source code in the scope of the entity receiving the input. String quotation may be needed when fired via console.
CallScriptFunction <string(en)> (Во всех играх начиная с Left 4 Dead 2) (также в Team Fortress 2) Отсутствует в FGD!
Calls a VScript function defined in the scope of the receiving entity.
TerminateScriptScope  (только в Team Fortress 2) Отсутствует в FGD!
Destroys the script scope of the receiving entity.
SetLocalOrigin <coordinates(en)> (Во всех играх начиная с Alien Swarm) Отсутствует в FGD!
Send this entity to a spot in the map. If the entity is parented to something, it will be offset from the parent by this amount.
SetLocalAngles <angles(en)> (Во всех играх начиная с Alien Swarm) Отсутствует в FGD!
Set this entity's angles.

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.

Base:

OnUser1 to OnUser4
These outputs each fire in response to the firing of the like-numbered FireUser1 to FireUser4 Input; see User Inputs and Outputs.
OnKilled  (только в Left 4 Dead)
This output fires when the entity is killed and removed from the game.