Env portal credits: Difference between revisions
(lots of info) |
(credits.txt link) |
||
| Line 1: | Line 1: | ||
{{LanguageBar}} | {{LanguageBar}} | ||
{{CD|CPortalCredits|file1=env_portal_credits.cpp}} | {{CD|CPortalCredits|file1=env_portal_credits.cpp}} | ||
{{this is a|logical entity|name=env_portal_credits|series=Portal}} This entity controls the musical credits seen in both Portal games. All of the credits data, including the names and song lyrics, is read from the file {{ | {{this is a|logical entity|name=env_portal_credits|series=Portal}} This entity controls the musical credits seen in both Portal games. All of the credits data, including the names and song lyrics, is read from the file {{ent|credits.txt}}. | ||
In {{portal|2}}, the credits are rendered directly over the normal viewport, so to produce the black background from the original game a {{ent|point_viewcontrol}} should be activated alongside an {{ent|env_fade}} or inside a black box. The credits will automatically start the sound <code>music/portal_still_alive.mp3</code> after the delay specified by <code>songstarttime</code> in the credits file. HL2-style rolling credits can still be created with this entity, but they appear somewhat broken, so using the original {{ent|env_credits}} for this is recommended instead. | In {{portal|2}}, the credits are rendered directly over the normal viewport, so to produce the black background from the original game a {{ent|point_viewcontrol}} should be activated alongside an {{ent|env_fade}} or inside a black box. The credits will automatically start the sound <code>music/portal_still_alive.mp3</code> after the delay specified by <code>songstarttime</code> in the credits file. HL2-style rolling credits can still be created with this entity, but they appear somewhat broken, so using the original {{ent|env_credits}} for this is recommended instead. | ||
Latest revision as of 01:08, 9 December 2025
| CPortalCredits |
env_portal_credits is a logical entity available in ![]()
Portal series. This entity controls the musical credits seen in both Portal games. All of the credits data, including the names and song lyrics, is read from the file credits.txt.
In
Portal, the credits are rendered directly over the normal viewport, so to produce the black background from the original game a point_viewcontrol should be activated alongside an env_fade or inside a black box. The credits will automatically start the sound music/portal_still_alive.mp3 after the delay specified by songstarttime in the credits file. HL2-style rolling credits can still be created with this entity, but they appear somewhat broken, so using the original env_credits for this is recommended instead.
music/portal_still_alive.mp3 with a blank file, then play your own track through map logic, which will pause correctly.map_wants_save_disable 1 is recommended in the latter game.In
Portal 2, a background has been added to the credits, but there is a fade-in at the start so fading to black first may still be desirable. Music will need to be played manually through map logic as it no longer starts automatically. After the credits finish, media/sp_ending_callback.bik will be played, and then the game will automatically return to the main menu. All inputs to this entity will produce Portal-style credits; rolling credits and intro credits are no longer supported, and env_credits no longer functions.
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
- Start the intro credits rolling.
- RollOutroCredits
- Start the outro credits rolling.
- ShowLogo
- Shows the Half-Life 2: Episode One logo, with an incorrect font.
- RollPortalOutroCredits
- Start the Portal greenscreen outro credits.
- SetLogoLength !FGD
- Meant to be used with
ShowLogo, it sets the duration for the logo to stay on the screen. It will also show the HL2 logo on top of the Episode One logo.
Outputs
- OnCreditsDone
- Fired when HL2-style outro credits having finished rolling.
Bug:Portal-style credits do not cause this to fire.
Workaround:Use a delayed output (this is what the original game does). Unnecessary in Portal 2 as the game will return to the menu automatically.