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

env_sprite

From Valve Developer Community
< Ru
Jump to: navigation, search
Underlinked - Logo.png
This article needs more Wikipedia icon links to other articles to help Wikipedia icon integrate it into the encyclopedia. Please help improve this article by adding links Wikipedia icon that are relevant to the context within the existing text.
January 2024
English (en)Русский (ru)Translate (Translate)

env_sprite - это точечная энтити(en), доступно для всех игр на движке Source Source. Это создаёт sprite(en) в вашем мире. Спрайты всегда смотрят на игрока.

Note.pngПримечание:This entity may also use env_glow for the classname.
Note.pngПримечание:Это сохраняемый объект(en) в Day of Defeat: SourceTeam Fortress 2.
  • В новом раунде игры состояние объектов данного класса намеренно не обновляется. Вы можете использовать logic_auto для осуществления принудительного сброса.
  • Уничтожение (Kill) такого объекта выполняется окончательно, так как он не восстанавливается в новом раунде.
  • Такой объект нельзя создать через point_template.
  • Наследование таких объектов с другими классами объектов приведёт к нежелательным последствиям.
Note.pngПримечание:Единственные render modes(en), которые рендерят прозрачность спрайта, это Glow , Additive , Additive Fractional Frame , World Space Glow и Alpha Add Отсутствует в FGD!.
Icon-Bug.pngБаг:При выборе спрайта, его расширения файла после имени не обязательно .spr / .vmt. В то время как предварительный просмотр спрайта может найти спрайт, расширение должно быть введено вручную, чтобы движок мог найти спрайт в игре. (Исправлено в Source 2009.)  [todo tested in?]
В коде это представлено классом CSprite, определённым в файле Sprite.cpp.

Flags

English (en)Русский (ru)Translate (Translate)

Sprite:

  • 1: Включен
  • 2: Проиграть один раз - используется для анимированных спрайтов; текстура оживится один раз, затем спрайт выключится..

Keyvalues

Sprite:

Sprite Name (model) ([todo internal name (i)]) <string(en)>
Путь к vmt файлу.
Scale (scale) ([todo internal name (i)]) <float(en)>
Масштабный множитель спрайта.
Icon-Bug.pngБаг:Спрайтовая шкала Hammer'a по умолчанию 0.25, но двигатель имеет 1.0. Чтобы синхронизировать значения, установите это значение ключа на что-то.  [todo tested in?]
Framerate (framerate) ([todo internal name (i)]) <string(en)>
Скорость, с которой спрайт должен анимироваться, если есть вообще.
Starting Frame (frame) ([todo internal name (i)]) <float(en)> Отсутствует в FGD!
Если спрайт анимирован, кадр должен начать анимацию с.
Size of Glow Proxy Geometry (GlowProxySize) ([todo internal name (i)]) <float(en)>
Размер свечения для визуализации. Каждый раз, когда сфера этого радиуса будет видна (пробираясь сквозь любую соседнюю геометрию), свечение будет визуализировано.
HDR color scale (HDRColorScale) ([todo internal name (i)]) <float(en)>
Цветовой множитель для игроков, использующих HDR.
Минимальный / Максимальный уровень DX (mindxlevel / maxdxlevel) <choices> (удалено начиная с Left 4 Dead)
Энтити не будет существовать, если графический движок будет работать вне данных версий ПО - DirectX Versions.
Выбор
Warning.pngПредупреждение:

RenderFields:
Render Mode <choices>
Установить нестандартный режим отображения объекта. Смотрите Режимы отображения для более подробной информации.
FX Amount <int> <0-255>
Интенсивность выбранного режима отображения
FX Color (R G B) <color255>
Цвет для выбранного режима отображения
Disable Receiving Shadows <bool>
Предотвращает отображение теней на объекте.
Render FX (renderfx) <choices>
Несколько GoldSrc 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/(во всех играх начиная с Left 4 Dead) Fades out over 4 s)
  • 6: Fast Fade Away (decreases alpha by -4 per frame/(во всех играх начиная с Left 4 Dead) Fades out over 1 s)
  • 7: Slow Become Solid (increases alpha by +1 per frame/(во всех играх начиная с Left 4 Dead) Fades in over 4 s)
  • 8: Fast Become Solid (increases alpha by +4 per frame/(во всех играх начиная с Left 4 Dead) 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)/(во всех играх начиная с Left 4 Dead) Fade Out (instant; not very useful outside of code)
  • 16: Hologram (Distort + "distance fade")/(во всех играх начиная с Left 4 Dead) Fade In (instant; not very useful outside of code)
  • 17: Scale Up ("Explode"/"scale up really big!" causes wild stretching of model parts) Source 2013)/Fade Wider Pulse (varies alpha by ±255 over a period over a period of 0.26 s) (во всех играх начиная с Left 4 Dead)
    Подтвердить:which branches/games is it available in, and where does it do what?
  • 18: Glow Shell (purpose unclear) (во всех играх начиная с Source 2013)
    Подтвердить: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 English, make rain") Source 2013)
    Подтвердить:which games? may be nonfunctional.
  • 21: Environmental Snow ("for environmental rendermode English, make snow") Source 2013)
    Подтвердить:which games? may be nonfunctional.
  • 22: Spotlight FX ("TEST CODE for experimental spotlight") Source 2013)
  • 23: Ragdoll ("HACKHACK: TEST CODE for signalling death of a ragdoll character;" ragdolls an entity but doesn't kill it) Source 2013)
    Подтвердить:which games? may be nonfunctional?
  • 24: Fade Wider Pulse (varies alpha by ±255 over a period over a period of 0.26 s) Source 2013)
  • 25: kRenderFXMax/Fade Near (удалено начиная с Left 4 Dead)
Нужно сделать: what does this do? may be nonfunctional


Основные:

Classname (classname) <string(en)>
Имя класса определяет тип объекта. Имена классов могут быть изменены с помощью AddOutput, который будет влиять на то, как движок взаимодействует с сущностью в определенных обстоятельствах..
Name (targetname) <string(en)>
Имя (название объекта), к которому другие объекты относятся.
Global Entity Name (globalname) <string(en)>
Имя, под которым этот объект связан с другим объектом на другой карте. Когда игрок переходит на новую карту, объектам на новой карте с глобальными именами, совпадающим с объектами на предыдущей карте, будет скопировано состояние предыдущей карты по их состоянию..
Parent (parentname) <targetname(en)>
Определяет источник движения. Предприятие сохранит свое первоначальное смещение от своего источника. Точка присоединения может быть добавлена в конце имени через запятую. «Каждая» сущность может присоединиться, даже к точечным объектам. Объекты, которые являются источниками, будут вынуждены перейти к следующей карте, например, из trigger_transition. Некоторые объекты, которые не предназначены для источников, могут работать неправильно. phys_constraint можно использовать в качестве обходного пути для определения источника.
Origin (X Y Z) (origin) <coordinates(en)>
Положение центра этого объекта в мире. Вращающиеся объекты обычно вращаются вокруг своего происхождения.
Pitch Yaw Roll (X Y Z) (angles) <angle(en)>
Ориентация объекта в мире. Pitch - это вращение вокруг оси Y, yaw - это вращение вокруг оси Z, roll - это вращение вокруг оси X.
Note.pngПримечание:Это работает для брашей, хотя Hammer не показывает новые углы.
Flags (spawnflags) <integer(en)>
Переключает функции объекта, его конкретный номер определяется комбинацией добавленных флагов..
Response Contexts (ResponseContext) <string(en)>
Предопределенные обстановок системы ответа для этого объекта. Формат: <код> ключ: значение, ключ: значение, ... </ code>. Обстановки могут быть filtered.
Effects (effects) <integer(en)> Отсутствует в FGD!
Комбинация флагов эффектов для использования.


Inputs

English (en)Русский (ru)Translate (Translate)

Sprite:ru:

SetScale <float(en)>
Устанавливает масштаб.
HideSprite
Делает спрайт невидимым.
ShowSprite
Делает спрайт видимым.
ToggleSprite
Сделать спрайт невидимым или видимым в зависимости от текущего состояния.
ColorRedValue <float(en)>
Изменить интенсивность красного канала (0-255).
ColorGreenValue <float(en)>
Изменить интенсивность зелёного канала (0-255).
ColorBlueValue <float(en)>
Изменить интенсивность синего канала (0-255).

RenderFields:
Alpha  <integer(en)>
Прозрачность спрайта (0 - 255).
Color  <color255(en)>
Цвет спрайта (R G B).
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

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.

See also