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

env_entity_maker

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

env_entity_maker - это точечный объект мира, доступно для всех игр на движке Source Source.

Info content.png
This page has not been fully translated.
Эта переведенная страница нуждается в обновлении.

Вы можете помочь, закончив перевод.

Also, please make sure the article tries to comply with thealternate 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) (???) <целевой объект(en)>
Name of the point_template to spawn here.
PostSpawn Movement Speed (PostSpawnSpeed) (???) <число с плавающей запятой(en)>
All entities spawned will move this many hammer units(en) per second in the direction of PostSpawn Movement Direction.
PostSpawn Movement Direction (PostSpawnDirection) (???) <angle(en)>
All entities spawned in the template will move in this direction.
PostSpawn Direction Variance (PostSpawnDirectionVariance) (???) <число с плавающей запятой(en)>
The PostSpawn Movement Direction may vary by this many degrees. This is a radius.
PostSpawn Inherit Angles (PostSpawnInheritAngles) (???) <булева переменная(en)>
If Yes, offset the spawn angles by the angles of a Parent.

Base:
Name (targetname) <строка(en)>
Название объекта по которому другие объекты могут ссылаться на этот объект.
Parent (parentname) <целевой объект(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.
Note.pngПримечание:Hammer does not move the entities accordingly only in the editor.
Pitch Yaw Roll (X Y Z) (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) <строка(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) <скриптлист VScript(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) <строка(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) <булева переменная(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) <булева переменная(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 <целевой объект(en)>
Spawn an instance of the template at the same origin and angles as a specified entity.

Base:
AddContext <строка(en)>
Adds to the entity's list of response contexts. See Context.
AddOutput <строка(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 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 <строка(en)>
Remove a context from this entity's list. The name should match the key of an existing context.
SetParent <строка(en)>
Move with this entity. See Entity Hierarchy (parenting).
SetParentAttachment <строка(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 <строка(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 <целое число(en)> Отсутствует в FGD!
Changes this entity's team.
TeamNum <целое число(en)> Отсутствует в FGD!
This input changes value for TeamNum property.
Icon-Bug.pngБаг:Console command ent_info shows this input in any Source Engine game, but only in Counter-Strike: Global Offensive Counter-Strike: Global Offensive (and games based on it) this input exists and works.
DispatchResponse <строка(en)> Отсутствует в FGD!
Dispatches a response to the entity. See Response and Concept.
DispatchEffect <строка(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 <скрипт(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 <строка(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.
Icon-Bug.pngБаг:In Hammer, using string arguments will corrupt the VMF file's structure, making the file unviewable for the next Hammer session.
Note.pngРешение:Remove the string argument manually with a text editor.
Note.pngПримечание:Team Fortress 2 Backtick characters ` are replaced with quotation marks at runtime, allowing quotation marks to be used when normally not possible.
CallScriptFunction <строка(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 receving 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 <углы(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.