This article's documentation is for anything that uses the Source engine. Click here for more information.

env_fade

Материал из Valve Developer Community
Перейти к: навигация, поиск
English (en)Русский (ru)中文 (zh)
... Icon-Important.png
Info content.png
This page needs to be translated.
Эта страница нуждается в переводе.

Данная страница содержит информацию, которая частично либо некорректно переведена, или здесь вообще нет перевода.

Кроме того, не забудьте использовать русский статье об альтернативных языках.


Кроме того, не забудьте использовать русский словарь переводчика.
env_fade
Env fade.png
ТипТочечный объект мира
ДвижокSource Source
ДоступностьВо всех играх
 

env_fade — это точечный объект мира, доступный во всех играх на платформе Source Source.

Создаёт затемнение экрана. Screen fades are used to blend regular game imagery to or from a solid color. Add duration and holdtime together for the total time this entity will be in effect. The modulate flag on env_fade uses a different kind of blending to achieve the fade. The normal fade does a straight weighted blend between the screen and the fading color (i.e. the fade color becomes a more/less opaque overlay over the scene). Modulate actually attenuates the screen colors in RGB with the fade color. So you could, for example, remove all of the red and blue from a scene with modulate and be left with a green overlay - well, sort of night vision anyway. The fade color for that would be pure green with modulate.


Содержание


Keyvalues

Duration (seconds) (???) <string>
The time that it will take to fade the screen in or out.
Hold Fade (seconds) (???) <string>
The time to hold the faded in/out state.
Fade Alpha (???) <integer>
Alpha of the fade, where 0 = fully transparent and 255 = fully opaque.
Fade Color (R G B) (???) <color255>
Fade color.
Reverse Fade Duration (seconds) (???) <float> (во всех играх начиная с Portal 2)
The duration of the reverse fade.

Targetname:
Name (targetname) <string>
The targetname that other entities refer to this entity by.

Flags

  • 1 : Fade From
Essentially a "fade in," where the screen begins from an opaque color.
  • 2 : Modulate
Use attenuation blending, see Entity Description.
  • 4 : Triggering player only

(во всех играх начиная с Alien Swarm)

Only affect activator
  • 8 : Stay Out
The fade remains indefinitely until another fade deactivates it. This prevents the ondeath-fadeout used in Portal 2.

Inputs

Fade
Start the screen fade.
FadeReverse  (во всех играх начиная с Portal 2)
Begin doing the reverse of the current fade.


Kill
Удаляет этот энтити из мира.
KillHierarchy
Удаляет энтити и его потомков из мира.
AddOutput  <строка>
Определяет keyvalue/output в этом энтити. Потенциально представляет большую опасность, используйте с осторожностью.
Формат: <key> <value>
Формат: <output name> <targetname>:<inputname>:<parameter>:<delay>:<макс. количество активаций, -1 - бесконечно>
FireUser1 до FireUser4
Запуск выходов OnUser; см. Пользовательские вводы и выводы.
Use  Отсутствует в FGD! English
То же, что и при вызове +use игроком; может не всё. Можно вызвать, создав вывод, которому не указан ввод.
Этот ввод не входит в Valve-файлы FGD.
RunScriptFile  <скрипт> (Во всех играх начиная с L4D2)
Выполнить файл игрового скрипта с диска.
RunScriptCode  <строка> (Во всех играх начиная с L4D2)
Выполнить строку исходного кода скрипта.
Warning.pngПредупреждение:Никогда не передавайте строковые параметры функции скрипта с помощью этого входа. Это повредит структуру VMF из-за вложения кавычек, которые потребуется удалять вручную в текстовом редакторе.

Outputs

OnBeginFade
Fired when the fade has begun. (!activator is the activator)

Targetname:
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  (only in Left 4 Dead)
This output fires when the entity is killed and removed from the game.