Env credits: Difference between revisions
Jump to navigation
Jump to search

Bug:While implemented in all games, this entity only functions in the
Half-Life 2 series (and derived mods),
Portal, and
Black Mesa. In other games nothing will be displayed due to 
)
Note:Some other games have different entities for credits:
(position irrelevant so it's logical entity) |
(Entity doesn't work outside HL2/Portal/BMS (regardless of if credits.txt exists), note other credits entities) |
||
| Line 3: | Line 3: | ||
{{CD|CCredits|file1=EnvMessage.cpp}} | {{CD|CCredits|file1=EnvMessage.cpp}} | ||
{{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>. | {{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}}}} | |||
{{ | {{note|Some other games have different entities for credits: | ||
* For the {{portalseries|2}} musical credits, use {{ent|env_portal_credits}}. | |||
* For the {{l4dseries|2}} campaign "credits", use {{ent|env_outtro_stats}}. | |||
}} | |||
{{ | |||
==Keyvalues== | ==Keyvalues== | ||
Revision as of 20:36, 7 December 2025
| CCredits |

env_credits is a logical entity available in all
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.
CHudCredits not being compiled into the client DLL, or the game may crash from an undefined CreditsMsg user message. (tested in: - For the

Portal series musical credits, use env_portal_credits. - For the

Left 4 Dead series campaign "credits", use env_outtro_stats.
Keyvalues
- Name (targetname) <string>
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g.
parentnameortarget).
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
) - Start the intro credits rolling.
Note:Replaced with env_introcredits entity in
Black Mesa.
- ShowLogo
- Show logo.
- Start (in all games since
) - Start rolling credits.
- SetLogoLength <float>
- Sets the amount of time the logo is displayed. Default is 5.0.
Outputs
- OnCreditsDone
- Fired when the credits having finished rolling.
File format
Files
scripts/credits.txt