This article's documentation is for anything that uses the Source engine. Click here for more information.

Commentary auto: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Expanded article and clarified stuff)
m (Substituted IO templates)
 
(10 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:commentary_auto}}
{{lang|Commentary auto}}
{{ent not in fgd|nolink=1|because=you can add it with [[Commentary Editor]]|except={{TeamSpen}}}}
{{CD|CCommentaryAuto|file1=CommentarySystem.cpp}}
{{this is a|point entity|name=commentary_auto}} It's usable in all games with the [[Commentary System]] implemented, including {{hl2ep1|4}} and {{tf2|4}}. 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.
__NOTOC__


{{stub}}
==Example==
{{orphan}}
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"
}
}


'''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]].
==Inputs==
{{I|MultiplayerSpawned|Tell the <code>OnCommentaryMultiplayerSpawn</code> output to fire, for if the game is multiplayer.}}


==Entity Description==
Fires outputs based on how commentary mode has been activated. Unlike [[logic_auto]], an entity with a similar purpose, commentary_auto cannot read global states or remove itself after firing. This entity does not appear to be in any default FGD files of any of its games, nor does it appear to be an option in the [[Commentary Editor]].
==Outputs==
==Outputs==
* '''OnCommentaryNewGame'''
{{O|OnCommentaryNewGame|Fired when a new game is started with commentary enabled.}}
: Fires when a new game is started with commentary enabled.
{{O|OnCommentaryMidGame|Fired when commentary is enabled in the middle of a map.}}
* '''OnCommentaryMidGame'''
{{O|OnCommentaryMultiplayerSpawn|Fired when <code>MultiplayerSpawned</code> is sent to this entity.}}
: Fires when commentary is enabled midgame.
 
* '''OnCommentaryMultiplayerSpawn'''
== See Also ==
: {{todo}}
* {{ent|point_commentary_node}}
[[Category:Half-Life 2: Episode One Entities]]
 
[[Category:Team Fortress 2 Entities]]
[[Category:Commentary System]]
[[Category:Source Base Entities]]
[[Category:Point Entities]]

Latest revision as of 21:49, 19 April 2025

English (en)Translate (Translate)
Icon-NotInFGD.png
This entity is not in the FGD by default, except in TeamSpen's Hammer Addons.
It should not be put directly in a map because you can add it with Commentary Editor.
C++ Class hierarchy
CCommentaryAuto
CBaseEntity
C++ CommentarySystem.cpp

commentary_auto is a point entity available in all Source Source games. It's usable in all games with the Commentary System implemented, including Half-Life 2: Episode One Half-Life 2: Episode One and Team Fortress 2 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.

See Also