env_sprite
This article needs more links to other articles to help integrate it into the encyclopedia. Please help improve this article by adding links that are relevant to the context within the existing text.
January 2024
January 2024
env_sprite
is a point entity available in all Source games. Это создаёт sprite в вашем мире. Спрайты всегда смотрят на игрока.
Note:This entity may also use
env_glow
for the classname.Note:This is a preserved entity in .
- On a new round, its properties including its position will intentionally not reset. You can use logic_auto to emulate resetting it.
- Killing it removes it forever, as it is not respawned on a new round.
- It cannot be spawned with a point_template.
- Parenting this with non preserved entities may have undesirable effects.
Note:Единственные render modes, которые рендерят прозрачность спрайта, это Glow , Additive , Additive Fractional Frame , World Space Glow и Alpha Add !FGD.
Bug:При выборе спрайта, его расширения файла после имени не обязательно .spr / .vmt. В то время как предварительный просмотр спрайта может найти спрайт, расширение должно быть введено вручную, чтобы движок мог найти спрайт в игре. (Исправлено в Source 2009.)
Flags
Sprite:
- 1: Включен
- 2: Проиграть один раз - используется для анимированных спрайтов; текстура оживится один раз, затем спрайт выключится..
Keyvalues
Sprite:
- Sprite Name (model)
(???)
<string> - Путь к vmt файлу.
- Scale (scale)
(???)
<float> - Масштабный множитель спрайта.
Bug:Спрайтовая шкала Hammer'a по умолчанию
0.25
, но двигатель имеет 1.0
. Чтобы синхронизировать значения, установите это значение ключа на что-то.- Framerate (framerate)
(???)
<string> - Скорость, с которой спрайт должен анимироваться, если есть вообще.
- Size of Glow Proxy Geometry (GlowProxySize)
(???)
<float> - Размер свечения для визуализации. Каждый раз, когда сфера этого радиуса будет видна (пробираясь сквозь любую соседнюю геометрию), свечение будет визуализировано.
DXLevelChoice:
- Minimum / Maximum DX Level
(mindxlevel / maxdxlevel)
<choices> (removed since ) - The entity will not exist if the engine is running outside the given range of DirectX Versions.
Warning:If these are used, the object may break when the user switches their DirectX settings.
|
RenderFields:
- Render Mode
<choices>
- Установить нестандартный режим рендера энтити. Смотрите Режимы рендера для более подробной информации.
- FX Amount
<int>
<0-255> - Интенсивность выбранного режима рендера
- FX Color (R G B)
<color255>
- Цвет для выбранного режима рендера
- Disable Receiving Shadows
<bool>
- Предотвращает энтити от отбрасывания тени.
- Render FX
(renderfx)
<варианты выбора>
- Несколько GoldSrc режимов отображения, которые могут изменить процесс рендера энтити.
- 0: None
- 1: Slow Pulse (varies alpha by ±16 over a period of 1.5 s)
- 2: Fast Pulse (varies alpha by ±16 over a period of 0.4 s)
- 3: Slow Wide Pulse (varies alpha by ±64 over a period of 1.5 s)
- 4: Fast Wide Pulse (varies alpha by ±64 over a period of 0.4 s)
- 5: Slow Fade Away (decreases alpha by -1 per frame/(in all games since ) Fades out over 4 s)
- 6: Fast Fade Away (decreases alpha by -4 per frame/(in all games since ) Fades out over 1 s)
- 7: Slow Become Solid (increases alpha by +1 per frame/(in all games since ) Fades in over 4 s)
- 8: Fast Become Solid (increases alpha by +4 per frame/(in all games since ) Fades in over 1 s)
- 9: Slow Strobe (transparent 0.8 s, visible 0.8 s, repeat)
- 10: Fast Strobe (transparent 0.2 s, visible 0.2 s, repeat)
- 11: Faster Strobe (transparent 0.09 s, visible 0.09 s, repeat)
- 12: Slow Flicker (transparent 0.18 s, visible 1.5 s, repeat)
- 13: Fast Flicker (transparent 0.14 s, visible 0.2 s, repeat)
- 14: Constant Glow ("NoDissipation;" purpose uncertain—for sprites?)
- 15: Distort (causes unnatural flickering and position shifting)/(in all games since ) Fade Out (instant; not very useful outside of code)
- 16: Hologram (Distort + "distance fade")/(in all games since ) Fade In (instant; not very useful outside of code)
- 17: Scale Up ("Explode"/"scale up really big!" causes wild stretching of model parts) (in )/Fade Wider Pulse (varies alpha by ±255 over a period over a period of 0.26 s) (in all games since ) Подтверждаю:which branches/games is it available in, and where does it do what?
- 18: Glow Shell (purpose unclear) (in all games since ) Подтверждаю:what does this do? and which games is it in?
- 19: Clamp Minimum Scale ("keep this sprite from getting very small (SPRITES only!)")
- 20: Environmental Rain ("for environmental rendermode , make rain") (in ) Подтверждаю:which games? may be nonfunctional.
- 21: Environmental Snow ("for environmental rendermode , make snow") (in ) Подтверждаю:which games? may be nonfunctional.
- 22: Spotlight FX ("TEST CODE for experimental spotlight") (in )
- 23: Ragdoll ("HACKHACK: TEST CODE for signalling death of a ragdoll character;" ragdolls an entity but doesn't kill it) (in ) Подтверждаю:which games? may be nonfunctional?
- 24: Fade Wider Pulse (varies alpha by ±255 over a period over a period of 0.26 s) (in )
- 25:
kRenderFXMax
/Fade Near (removed since )
- Todo: what does this do? may be nonfunctional
Base:
- Classname (classname)
<строка>
- Имя класса определяет тип объекта. Имена классов могут быть изменены с помощью
AddOutput
, который будет влиять на то, как движок взаимодействует с сущностью в определенных обстоятельствах.. - Name
(targetname)
<строка>
- Имя (название объекта), к которому другие объекты относятся.
- Global Entity Name
(globalname)
<строка>
- Имя, под которым этот объект связан с другим объектом на другой карте. Когда игрок переходит на новую карту, объектам на новой карте с глобальными именами, совпадающим с объектами на предыдущей карте, будет скопировано состояние предыдущей карты по их состоянию..
- Parent
(parentname)
<конечное имя>
- Определяет источник движения. Предприятие сохранит свое первоначальное смещение от своего источника. Точка присоединения может быть добавлена в конце имени через запятую. «Каждая» сущность может присоединиться, даже к точечным объектам. Объекты, которые являются источниками, будут вынуждены перейти к следующей карте, например, из
trigger_transition
. Некоторые объекты, которые не предназначены для источников, могут работать неправильно.phys_constraint
можно использовать в качестве обходного пути для определения источника. - Origin (X Y Z)
(origin)
<coordinates >
- Положение центра этого объекта в мире. Вращающиеся объекты обычно вращаются вокруг своего происхождения.
- Pitch Yaw Roll (X Y Z)
(angles)
<угловое значение>
- Ориентация объекта в мире. Pitch - это вращение вокруг оси Y, yaw - это вращение вокруг оси Z, roll - это вращение вокруг оси X. Note:Это работает для брашей, хотя Hammer не показывает новые углы.
- Flags
(spawnflags)
<целое значение>
- Переключает функции объекта, его конкретный номер определяется комбинацией добавленных флагов..
- Response Contexts
(ResponseContext)
<строка>
- Предопределенные обстановок системы ответа для этого объекта. Формат: <код> ключ: значение, ключ: значение, ... </ code>. Обстановки могут быть filtered.
- Effects
(effects)
<целое значение>
Отсутствует в FGD! - Комбинация флагов эффектов для использования.
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:
AddContext
<string>- Adds to the entity's list of response contexts. See Context.
AddOutput
<string>- 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
toFireUser4
- Fires the respective
OnUser
outputs; 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 thanKill
input.
RemoveContext
<string>- Remove a context from this entity's list. The name should match the key of an existing context.
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.
DispatchResponse
<string> !FGD- Dispatches a response to the entity. See Response and Concept.
DispatchEffect
<string> (removed since ) !FGD- Dispatches a special effect from the entity's origin; See also List of Client Effects. Replaced by the particle system since .
RunScriptFile
<script> (in all games since ) (also in )- Execute a VScript file from disk, without file extension. The script contents are merged with the script scope of the receiving entity.
RunScriptCode
<string> (in all games since ) (also in )- 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 Hammer, using string arguments will corrupt the VMF file's structure, making the file unviewable for the next Hammer session.Fix:Remove the string argument manually with a text editor.
CallScriptFunction
<string> (in all games since ) (also in ) !FGD- Calls a VScript function defined in the scope of the receiving entity.
TerminateScriptScope
(only in ) !FGD- Destroys the script scope of the receving entity.
SetLocalOrigin
<coordinates> (in all games since ) !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.
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 )- This output fires when the entity is killed and removed from the game.