Commentary auto: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(updates)
(Fixed a few inaccuracies and added an example)
Line 1: Line 1:
{{lang|Commentary auto}}
{{lang|Commentary auto}}
{{ent not in fgd|nolink=1}}
{{ent not in fgd|nolink=1}}
{{base point ep1|commentary_auto}} Similar to {{ent|logic_auto}}, this entity fires outputs for when the developer commentary system is loaded. It is not in any FGDs, and placing it directly in a map seems to not work correctly. See [[Commentary Editor]] for instructions on using the system.
'''commentary_auto''' is a [[point entity]] available in all games with the [[Commentary System]] implemented, including [[Half-Life 2: Episode One]] and [[Team Fortress 2]]. This entity is similar to {{ent|logic_auto}}'s role in firing outputs when the map is loaded, firing outputs when the developer commentary system is loaded. It will only function when used inside of a commentary file, but it does not appear to be available in the Commentary Editor directly and it is not available in any FGDs. The only known way to implement it is by directly defining it in the commentary file via a text editor. See [[Commentary System]] for more information on how this system works.
==Example==
entity
{
"classname" "commentary_auto"
"origin" "0 0 1024"
"connections"
{
"OnCommentaryNewGame" "remove_in_commentary,Kill,,0,-1"
"OnCommentaryMidGame" "remove_in_commentary,Disable,,0,-1"
"OnCommentaryMidGame" "remove_in_commentary,TurnOff,,0,-1"
}
}


==Inputs==
==Inputs==

Revision as of 08:44, 19 September 2018

English (en)Translate (Translate)
Icon-NotInFGD.png
This entity is not in the FGD by default.
It should not be put directly in a map.

commentary_auto is a point entity available in all games with the Commentary System implemented, including Half-Life 2: Episode One and Team Fortress 2. This entity is similar to logic_auto's role in firing outputs when the map is loaded, firing outputs when the developer commentary system is loaded. It will only function when used inside of a commentary file, but it does not appear to be available in the Commentary Editor directly and it is not available in any FGDs. The only known way to implement it is by directly defining it in the commentary file via a text editor. See Commentary System for more information on how this system works.

Example

entity
{
	"classname" "commentary_auto"
	"origin" "0 0 1024"
	"connections"
	{
		"OnCommentaryNewGame" "remove_in_commentary,Kill,,0,-1"
		"OnCommentaryMidGame" "remove_in_commentary,Disable,,0,-1"
		"OnCommentaryMidGame" "remove_in_commentary,TurnOff,,0,-1"
	}
}

Inputs

MultiplayerSpawned
Tell the OnCommentaryMultiplayerSpawn output to fire, for if the game is multiplayer.

Outputs

OnCommentaryNewGame
Fired when a new game is started with commentary enabled.
OnCommentaryMidGame
Fired when commentary is enabled in the middle of a map.
OnCommentaryMultiplayerSpawn
Fired when MultiplayerSpawned is sent to this entity.