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

Env credits: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
(Entity doesn't work outside HL2/Portal/BMS (regardless of if credits.txt exists), note other credits entities)
 
(19 intermediate revisions by 9 users not shown)
Line 1: Line 1:
{{lang|Env credits}}
{{stub|section=1}}
[[File:env_credits.png|left]]{{base point|env_credits}} This entity is used to control the rolling [[credits]]. The credits text that's displayed is determined inside the file <code>scripts/credits.txt</code> see that file for an example of how the script should be laid out.
{{LanguageBar}}
 
{{CD|CCredits|file1=EnvMessage.cpp}}
{{note|In {{l4ds}}, this entity is drastically different and has ''nothing'' except one input; <code>Start</code>.}}
{{This is a|logical entity|engine=Source|name=env_credits|sprite=1}} This entity is used to control the rolling [[credits]]. The text that will be displayed is determined inside the file <code>scripts/credits.txt</code>.
 
{{bug|While implemented in all games, this entity only functions in the {{hl2series|2}} (and derived mods), {{portal|2}}, and {{bms|2}}. In other games nothing will be displayed due to <code>CHudCredits</code> not being compiled into the client DLL, or the game may crash from an undefined <code>CreditsMsg</code> user message.|tested={{portal2}}{{tf2}}}}
{{code class|CCredits|EnvMessage.cpp}}
{{note|Some other games have different entities for credits:
 
* For the {{portalseries|2}} musical credits, use {{ent|env_portal_credits}}.
== Bugs/Limitations ==
* For the {{l4dseries|2}} campaign "credits", use {{ent|env_outtro_stats}}.
{{Important|The {{tf2|4}} will crash if an env_credits is attempted to be used without a registered <code>scripts/credits.txt</code> file. {{clarify|which games suffer from this other than {{tf2|4}}?}} }}
}}


==Keyvalues==
==Keyvalues==
Line 13: Line 13:


==Inputs==
==Inputs==
{{IO|RollCredits|Start the intro credits rolling.}}
{{I|RollCredits|Start the intro credits rolling.
{{IO|RollOutroCredits|Start the outro credits rolling.}}
:{{note|Replaced with {{ent|env_introcredits}} entity in {{bms|4}}.
{{IO|ShowLogo|Show logo.}}
}}|not={{bms}}}}
{{IO|Start|since=L4D|Start rolling credits.}}
{{I|RollOutroCredits|Start the outro credits rolling.|not={{bms}}}}
{{I|ShowLogo|Show logo.}}
{{I|Start|since=L4D|Start rolling credits.}}
{{I|SetLogoLength|param=float|Sets the amount of time the logo is displayed. Default is 5.0.}}
{{I|RollEndCredits|Start the end credits rolling.|only={{bms}}}}
{{I|RollJokeOutroCredits|Start a joke version of the outro credits rolling quickly past.|only={{hdtf}}}}


==Outputs==
==Outputs==
{{IO|OnCreditsDone|Fired when the credits having finished rolling.}}
{{O|OnCreditsDone|Fired when the credits having finished rolling.}}
 
==File format==
{{Empty section|date=January 2024}}


==Files==
==Files==
Line 25: Line 33:


[[Category:GUI Entities|env_credits]]
[[Category:GUI Entities|env_credits]]
[[Category:Plain text formats|credits.txt]]
==See also==
* {{ent|env_message}}
* {{ent|env_hudhint}}
* {{ent|point_message}}
* {{ent|game_text}}
* {{ent|env_introcredits}}

Latest revision as of 20:36, 7 December 2025

Stub

This article or section is a stub. You can help by expanding it.

English (en)Русский (ru)中文 (zh)Translate (Translate)
C++ Class hierarchy
CCredits
CPointEntity
CBaseEntity
C++ EnvMessage.cpp
Env credits.png

env_credits is a logical entity available in all Source Source games. This entity is used to control the rolling credits. The text that will be displayed is determined inside the file scripts/credits.txt.

Icon-Bug.pngBug:While implemented in all games, this entity only functions in the Half-Life 2 series Half-Life 2 series (and derived mods), Portal Portal, and Black Mesa Black Mesa. In other games nothing will be displayed due to CHudCredits not being compiled into the client DLL, or the game may crash from an undefined CreditsMsg user message.  (tested in: Portal 2Team Fortress 2)
Note.pngNote:Some other games have different entities for credits:

Keyvalues

Name (targetname) <string>
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also: Generic Keyvalues, Inputs and Outputs available to all entities

Inputs

RollCredits  (not in Black Mesa)
Start the intro credits rolling.
Note.pngNote:Replaced with env_introcredits entity in Black Mesa Black Mesa.
RollOutroCredits  (not in Black Mesa)
Start the outro credits rolling.
ShowLogo
Show logo.
Start  (in all games since Left 4 Dead)
Start rolling credits.
SetLogoLength <floatRedirectInput/float>
Sets the amount of time the logo is displayed. Default is 5.0.
RollEndCredits  (only in Black Mesa)
Start the end credits rolling.
RollJokeOutroCredits  (only in Hunt Down the Freeman)
Start a joke version of the outro credits rolling quickly past.

Outputs

OnCreditsDone
Fired when the credits having finished rolling.

File format

Empty

This article or section is empty. You can help by adding it.

Files

  1. scripts/credits.txt

See also