env_sprite
From Valve Developer Community
env_sprite is a point entity available in all Source games. Это создаёт sprite в вашем мире. Спрайты всегда смотрят на игрока.

env_glow
for the classname.
Warning: In some/all multiplayer games, this entity will intentionally not reset itself to its default properties (including position) when a new round begins. If this is an issue, use inputs to emulate resetting it.


In code, it is represented by class
CSprite
, defined in Sprite.cpp
.
Flags
Sprite:
- 1: Включен
- 2: Проиграть один раз - используется для анимированных спрайтов; текстура оживится один раз, затем спрайт выключится..
Keyvalues
Sprite:

0.25
, но двигатель имеет 1.0
. Чтобы синхронизировать значения, установите это значение ключа на что-то.- Framerate (framerate)
<string>
- Скорость, с которой спрайт должен анимироваться, если есть вообще.
- Starting Frame (frame)
<float>
!FGD - Если спрайт анимирован, кадр должен начать анимацию с.
- Size of Glow Proxy Geometry (GlowProxySize)
<float>
- Размер свечения для визуализации. Каждый раз, когда сфера этого радиуса будет видна (пробираясь сквозь любую соседнюю геометрию), свечение будет визуализировано.
- HDR color scale (HDRColorScale)
<float>
- Цветовой множитель для игроков, использующих HDR.
DXLevelChoice:
- Minimum DX Level (mindxlevel)
<choices>
- The entity will not exist if the engine is running outside the given range of DirectX Versions. Replaced by SystemLevelChoice from
Left 4 Dead onwards.
-
Warning: If these are used, the object may break when the user switches their DirectX settings.
- Maximum DX Level (maxdxlevel)
<choices>
RenderFields:
- Render Mode
<choices>
- Установить нестандартный режим рендера энтити. Смотрите Режимы рендера для более подробной информации.
- FX Amount
<int>
<0-255> - Интенсивность выбранного режима рендера
- FX Color (R G B)
<color255>
- Цвет для выбранного режима рендера
- Disable Receiving Shadows
<bool>
- Предотвращает энтити от отбрасывания тени.
RenderFXChoices:
Base:
- Classname (classname)
<string>
- Имя класса определяет тип объекта. Имена классов могут быть изменены с помощью
AddOutput
, который будет влиять на то, как движок взаимодействует с сущностью в определенных обстоятельствах.. - Name (targetname)
<string>
- Имя (название объекта), к которому другие объекты относятся.
- Global Entity Name (globalname)
<string>
- Имя, под которым этот объект связан с другим объектом на другой карте. Когда игрок переходит на новую карту, объектам на новой карте с глобальными именами, совпадающим с объектами на предыдущей карте, будет скопировано состояние предыдущей карты по их состоянию..
- Parent (parentname)
<targetname>
- Определяет источник движения. Предприятие сохранит свое первоначальное смещение от своего источника. Точка присоединения может быть добавлена в конце имени через запятую. «Каждая» сущность может присоединиться, даже к точечным объектам. Объекты, которые являются источниками, будут вынуждены перейти к следующей карте, например, из
trigger_transition
. Некоторые объекты, которые не предназначены для источников, могут работать неправильно.phys_constraint
можно использовать в качестве обходного пути для определения источника. - Origin (X Y Z) (origin)
<coordinates>
- Положение центра этого объекта в мире. Вращающиеся объекты обычно вращаются вокруг своего происхождения.
- Pitch Yaw Roll (X Y Z) (angles)
<angle>
- Ориентация объекта в мире. Pitch - это вращение вокруг оси Y, yaw - это вращение вокруг оси Z, roll - это вращение вокруг оси X.
Note:Это работает для брашей, хотя Hammer не показывает новые углы.
- Flags (spawnflags)
<integer>
- Переключает функции объекта, его конкретный номер определяется комбинацией добавленных флагов..
- Response Contexts (ResponseContext)
<string>
- Предопределенные обстановок системы ответа для этого объекта. Формат: <код> ключ: значение, ключ: значение, ... </ code>. Обстановки могут быть filtered.
- Effects (effects)
<integer>
!FGD - Комбинация флагов эффектов для использования.
- Local Time (ltime)
<float>
!FGD - Местное время объекта, независимое от глобальных часов. Используется в основном для физических расчетов.
- Next Think (nextthink)
<float>
!FGD - Время до того, как сущность thinks снова.
- Hammer ID (hammerid)
<integer>
!FGD - Hammer ID объекта. В основном используется плагинами и командами отладки, такими как
ent_keyvalue
. Может быть назначен вручную с помощью значения ключа «hammerid» или «id». Объекты, созданные во время выполнения, не имеют идентификатора Hammer. - Disable for Xbox 360 (disableX360)
<boolean>
(New with Left 4 Dead 2) !FGD - Если Да, отключает этот объект в версии Xbox 360 Source.
- Entity Scripts (vscripts)
<scriptlist>
(New with Left 4 Dead 2) - Список разделенных пробелами файлов VScript (без расширения файла), которые выполняются после появления всех объектов. Все сценарии выполняются в одной и той же области видимости, а затем перезаписывают любые идентичные переменные и функции..
- Script think function (thinkfunction)
<string>
(New with Left 4 Dead 2) - Имя функции в сценарии этой сущности, которая будет вызываться автоматически каждые 100 миллисекунд (десять раз в секунду) в течение всего сценария. Он может использоваться для создания таймеров или для моделирования автономного поведения. Возвращаемое значение (если присутствует) установит время до следующего вызова. Старайтесь избегать expensive операций в этой функции, так как это может вызвать проблемы с производительностью.
- Lag Compensation (LagCompensate)
<boolean>
(New with Left 4 Dead 2) !FGD - Установите Да чтобы компенсировать отставание этой организации. Следует использовать очень экономно!
- Is Automatic-Aim Target (is_autoaim_target)
<boolean>
(New with Counter-Strike: Global Offensive) !FGD - Если установлено значение 1, этот объект будет замедлять движение прицеливания для консолей и контроллеров джойстика, когда объект находится под перекрестием.
Inputs
Sprite:ru:
-
SetScale
<float>
- Устанавливает масштаб.
-
HideSprite
- Делает спрайт невидимым.
-
ShowSprite
- Делает спрайт видимым.
-
ToggleSprite
- Сделать спрайт невидимым или видимым в зависимости от текущего состояния.
-
ColorRedValue
<float>
- Изменить интенсивность красного канала (0-255).
-
ColorGreenValue
<float>
- Изменить интенсивность зелёного канала (0-255).
-
ColorBlueValue
<float>
- Изменить интенсивность синего канала (0-255).
RenderFields:
-
Alpha
<целое значение>
- Прозрачность спрайта (0 - 255).
-
Color
<color255>
- Цвет спрайта (R G B).
Base:
-
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 thanKill
. -
SetParent
<string>
- Move with this entity. See Entity Hierarchy (parenting).
-
SetParentAttachment
<string>
- 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>
- As above, but without teleporting. The entity retains its position relative to the attachment at the time of the input being received.
-
ClearParent
- Removes this entity from the the movement hierarchy, leaving it free to move independently.
-
AddOutput
<string>
- Evaluates a keyvalue/output on this entity.
Format:<key> <value>
Format:<output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire, -1 means infinite>
-
FireUser1
toFireUser4
- Fire the
OnUser
outputs; see User Inputs and Outputs. -
Use
!FGD - Same as a player invoking +use; may not do anything. Can also be invoked by creating an output that does not specify an input.
This input is not included in Valve's FGDs. -
DispatchEffect
<string>
!FGD - Dispatches a special effect from the entity's origin. Removed and replaced entirely by the particle system since
.
-
DispatchResponse
<string>
!FGD - Dispatches a response to the entity. See Response and Concept.
-
AddContext
<string>
- Adds to the entity's list of response contexts. Format is
<key>:<value>
. -
RemoveContext
<string>
- Remove a context from this entity's list. The name should match the key of an existing context.
-
ClearContext
<string>
- Removes all contexts from this entity's list.
-
RunScriptFile
<script>
(New with Left 4 Dead 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>
(New with Left 4 Dead 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.
Bug: In
, the code is executed in the script scope of the entity that fires the output, not the one receiving the input.
Warning: Never try to pass string parameters to a script function with this input. It will corrupt the VMF structure because of the nested quotation marks, which then must be removed manually with a text editor.
-
CallScriptFunction
<string>
(New with Left 4 Dead 2) !FGD - Execute a VScript function in the scope of the receiving entity.
-
SetLocalOrigin
<coordinates>
(New with 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>
(New with Alien Swarm) !FGD - Set this entity's angles.
Outputs
Base:
-
OnUser1
toOnUser4
- These outputs each fire in response to the firing of the like-numbered
FireUser1
toFireUser4
Input; see User Inputs and Outputs. -
OnKilled
(Only in the Left 4 Dead series) - This output fires when the entity is killed and removed from the game.