env_introcredits

From Valve Developer Community
Jump to navigation Jump to search
Class hierarchy
CCreditEntity
CBaseEntity

env_introcredits is a logical entity available in Black Mesa Black Mesa. This entity is used to roll intro credits. You can set up your own intro credits in scripts/credits.txt file. In original campaign, this feature used in whole "Black Mesa Inbound" chapter.

Warning.pngWarning:The credits shows in the same place as the player's health and armor. It is not recommended to use this entity if player in suit, because the credits will be displayed under the HUD.
Example.

Keyvalues

Start Active (startactive) <choices>
Do we want to start the intro credits rolling on spawn ?
  • 0: Off
  • 1: On

Inputs

Activate <void>
Start the intro credits rolling.

Credits script

All intro credits are stored in IntroCredits body (line 17). Each map can have its own intro credits and total time for credits roll. This is example of intro credits script to make your credits properly working. The comments explain what each line does.

    "IntroCredits" //Into credits start here.
    {
        "map1" //The first map there we want to have credits.
	{
		"totaltime"		"90" //Total time (in seconds) we want to roll credits.
		"credits"
		{
			  "#Map1MyText1"              "#BLANK" //The first is the text that will be displayed, the second does nothing (even if you'll write here some already existing text).
			  "#Map1MyText2"              "#BLANK" //The second text that will be displayed.
			  "#Map1MyTextX"              "#BLANK" //The X text that will be displayed.
		}
	}

        "map2" //The second map there we want to have credits.
	{
		"totaltime"		"100" //Total time (in seconds) we want to roll credits.
		"credits"
		 {
			  "#Map2MyText1"              "#BLANK" //The first text that will be displayed.
			  "#Map2MyText2"              "#BLANK" //The second text that will be displayed.
			  "#Map2MyTextX"              "#BLANK" //The X text that will be displayed.
		 }
        "mapX" //The X map there we want to have credits.
	{
		"totaltime"		"X" //Total time (in seconds) we want to roll credits.
		"credits"
		 {
			  "#MapXMyText1"              "#BLANK" //The first text that will be displayed.
			  "#MapXMyText2"              "#BLANK" //The second text that will be displayed.
			  "#MapXMyTextX"              "#BLANK" //The X text that will be displayed.
		 }
	}
    }