Env portal credits: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Added infotable)
No edit summary
 
(6 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{entity|env_portal_credits|type=e0|series=Portal}}
{{CD|CPortalCredits|file1=env_portal_credits.cpp}}
{{this is a|logical entity|name=env_portal_credits|series=Portal}} This entity controls the rolling credits for the {{portalseries|4}}. All of the credits data, including the names and song lyrics, is read from the file {{code|preset=3|scripts/credits.txt}}.


{{infotable
{{bug|If a save is reloaded during the {{portal|2}} credits, they will turn into regular {{hl2|2|nt=0}} style credits. {{portal2|2}} fixes this, but the credits will still restart and desync with the song.|hidetested=1}}
|env_portal_credits
|img=[[File:Env portal credits.png]]
|type=e0
|engine=2
|in={{Portal}}{{p2}}
}}
 
==Entity description==
This Entity controls the rolling credits for Portal & Portal 2.


== Keyvalues ==
== Keyvalues ==
Line 16: Line 8:


== Inputs ==
== Inputs ==
{{IO|RollCredits|Start the intro credits rolling.}}
{{I|RollCredits|Start the intro credits rolling.}}
{{IO|RollOutroCredits|Start the outro credits rolling.}}
{{I|RollOutroCredits|Start the outro credits rolling.}}
{{IO|ShowLogo|Show the HL2 logo.}}
{{I|ShowLogo|Show the {{hl2|2|nt=0}} logo.}}
{{IO|RollPortalOutroCredits|Start the Portal greenscreen outro credits.}}
{{I|RollPortalOutroCredits|Start the Portal greenscreen outro credits.}}
{{I Targetname}}
{{I|SetLogoLength|Meant to be used with {{code|preset=2|ShowLogo}}, it sets the duration for the logo to stay on the screen. It will also show the {{hl2|2|nt=0}} logo on top of the {{ep1|2|nt=1}} logo.|nofgd=1}}


== Outputs ==
== Outputs ==
{{IO|OnCreditsDone|Fired when the credits having finished rolling.}}
{{O|OnCreditsDone|Fired when the credits having finished rolling.}}
{{O Targetname}}

Latest revision as of 13:59, 2 June 2025

C++ Class hierarchy
CPortalCredits
CPointEntity
CBaseEntity
C++ env_portal_credits.cpp

env_portal_credits is a logical entity available in Portal series Portal series. This entity controls the rolling credits for the Portal series Portal series. All of the credits data, including the names and song lyrics, is read from the file scripts/credits.txt.

Icon-Bug.pngBug:If a save is reloaded during the Portal Portal credits, they will turn into regular Half-Life 2 HL2 style credits. Portal 2 Portal 2 fixes this, but the credits will still restart and desync with the song.

Keyvalues

Name (targetname) <string>[ Edit ]
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
Start the intro credits rolling.
RollOutroCredits
Start the outro credits rolling.
ShowLogo
Show the Half-Life 2 HL2 logo.
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 Half-Life 2 HL2 logo on top of the Half-Life 2: Episode One Episode One logo.

Outputs

OnCreditsDone
Fired when the credits having finished rolling.