Point commentary node: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (removed {{DISPLAYTITLE}}, covered by the ep1 point template)
(fixed poor formatting)
Line 3: Line 3:
== Entity description ==
== Entity description ==
The core entity used in the [[Commentary System]]. It appears as a floating speech bubble for the player to +USE, which then starts the commentary playing. This entity is typically placed with the [[Commentary Editor]].
The core entity used in the [[Commentary System]]. It appears as a floating speech bubble for the player to +USE, which then starts the commentary playing. This entity is typically placed with the [[Commentary Editor]].
Unlike most entities, the point_commentary_node is often hand-edited into the [[Commentary System|commentary files]], and as a result, there are some extra keys listed here that [[Hammer]] would normally fill in automatically for you.
{{clr}}
{{clr}}


== Keyvalues ==
== Keyvalues ==
Unlike most entities, the point_commentary_node is often hand-edited into the [[Commentary System|commentary files]], and as a result, there are some extra keys listed here that [[Hammer]] would normally fill in automatically for you.
* {{KV Targetname}}
* {{KV Targetname}}
* {{KV Parentname}}
* {{KV Parentname}}
* '''start_disabled'''
{{KV|start_disabled|boolean|Start disabled.}}
: {{boolean}} Start disabled
{{KV|origin|vector|The origin of this entity within the map.}}
* '''origin'''
{{KV|angles|angles|The orientation of this entity within the map.}}
: <vector (X,Y,Z)> The origin of this entity within the map.
{{KV|commentaryfile|sound|The commentary sound file that should be played when this node is used by the player.}}
* '''angles'''
{{KV|commentaryfile_nohdr|sound|The commentary sound file that should be played when this node is used by the player. If the player has HDR turned off, this file will be used instead of the '''commentaryfile'''. If this entry is not specified, the base '''commentaryfile''' entry will still be used.}}
: <[[angles]]> The orientation of this entity within the map.
{{KV|speakers|string|The name of the speakers of the commentary sound file(s). Will be displayed in the HUD while the commentary sound file is playing.}}
* '''commentaryfile'''
{{KV|precommands|string|A semi-colon delimited list of commands that should entered into the console when the commentary file starts playing. e.g. <code>ai_disable 1;mat_wireframe 1</code>}}
: <sound> The commentary sound file that should be played when this node is used by the player.
{{KV|postcommands|string|A semi-colon delimited list of commands that should entered into the console when the commentary file finishes playing. e.g. <code>ai_disable 0;mat_wireframe 0</code>}}
* '''commentaryfile_nohdr'''
{{KV|viewposition|string|The [[targetname]] of an entity to which the players view should move while the commentary file is playing. When the commentary file finishes, the players view will move back to the place it was when the commentary started.}}
: <sound> The commentary sound file that should be played when this node is used by the player. If the player has HDR turned off, this file will be used instead of the '''commentaryfile'''. If this entry is not specified, the base '''commentaryfile''' entry will still be used.
{{KV|viewtarget|string|The [[targetname]] of an entity that the players view should track while the commentary file is playing. The player will not be able to control their view while the commentary file plays.}}
* '''speakers'''
{{KV|prevent_movement|boolean|If true, the player will not be able to move while the commentary sound file is playing.}}
: <string> The name of the speakers of the commentary sound file(s). Will be displayed in the HUD while the commentary sound file is playing.
* '''precommands'''
: <string> A semi-colon delimited list of commands that should entered into the console when the commentary file starts playing. e.g. <code>ai_disable 1;mat_wireframe 1</code>
* '''postcommands'''
: <string> A semi-colon delimited list of commands that should entered into the console when the commentary file finishes playing. e.g. <code>ai_disable 0;mat_wireframe 0</code>
* '''viewposition'''
: <target_destination> The [[targetname]] of an entity to which the players view should move while the commentary file is playing. When the commentary file finishes, the players view will move back to the place it was when the commentary started.
* '''viewtarget'''
: <target_destination> The [[targetname]] of an entity that the players view should track while the commentary file is playing. The player will not be able to control their view while the commentary file plays.
* '''prevent_movement'''
: {{boolean}} If true, the player will not be able to move while the commentary sound file is playing.


== Inputs ==
== Inputs ==
Line 43: Line 33:
== Outputs ==
== Outputs ==
* {{O Targetname}}
* {{O Targetname}}
* '''OnCommentaryStarted'''
{{IO|OnCommentaryStarted|Fires when this commentary starts playing.}}
: Fires when this commentary starts playing.
{{IO|OnCommentaryStopped|Fires when this commentary stops playing. May be caused by the commentary file finishing, or by the player stopping it manually (if the node wasn't started with the <code>StartUnstoppableCommentary</code> input). If the node controls the players view with the <code>viewposition</code> key, then this input will be fired when the players view has finished returning to its original position.}}
* '''OnCommentaryStopped'''
: Fires when this commentary stops playing. May be caused by the commentary file finishing, or by the player stopping it manually (if the node wasn't started with the <code>StartUnstoppableCommentary</code> input). If the node controls the players view with the <code>viewposition</code> key, then this input will be fired when the players view has finished returning to its original position.


==See also==
==See also==

Revision as of 08:32, 31 May 2019

Commentary bubble

Template:Ep1 point

Entity description

The core entity used in the Commentary System. It appears as a floating speech bubble for the player to +USE, which then starts the commentary playing. This entity is typically placed with the Commentary Editor.

Unlike most entities, the point_commentary_node is often hand-edited into the commentary files, and as a result, there are some extra keys listed here that Hammer would normally fill in automatically for you.

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

Parentname:
Parent (parentname) <targetname>
Specifies a movement parent. An entity will maintain its initial offset from its parent. An attachment point can be added to the end of the name, separated by a comma.
start_disabled ([todo internal name (i)]) <boolean>
Start disabled.
origin ([todo internal name (i)]) <vector>
The origin of this entity within the map.
angles ([todo internal name (i)]) <angles>
The orientation of this entity within the map.
commentaryfile ([todo internal name (i)]) <sound>
The commentary sound file that should be played when this node is used by the player.
commentaryfile_nohdr ([todo internal name (i)]) <sound>
The commentary sound file that should be played when this node is used by the player. If the player has HDR turned off, this file will be used instead of the commentaryfile. If this entry is not specified, the base commentaryfile entry will still be used.
speakers ([todo internal name (i)]) <string>
The name of the speakers of the commentary sound file(s). Will be displayed in the HUD while the commentary sound file is playing.
precommands ([todo internal name (i)]) <string>
A semi-colon delimited list of commands that should entered into the console when the commentary file starts playing. e.g. ai_disable 1;mat_wireframe 1
postcommands ([todo internal name (i)]) <string>
A semi-colon delimited list of commands that should entered into the console when the commentary file finishes playing. e.g. ai_disable 0;mat_wireframe 0
viewposition ([todo internal name (i)]) <string>
The targetname of an entity to which the players view should move while the commentary file is playing. When the commentary file finishes, the players view will move back to the place it was when the commentary started.
viewtarget ([todo internal name (i)]) <string>
The targetname of an entity that the players view should track while the commentary file is playing. The player will not be able to control their view while the commentary file plays.
prevent_movement ([todo internal name (i)]) <boolean>
If true, the player will not be able to move while the commentary sound file is playing.

Inputs

Parentname:
SetParent <stringRedirectInput/string>
Move with this entity. See Entity Hierarchy (parenting).
SetParentAttachment <stringRedirectInput/string>
Change this entity to attach to a specific attachment point on its parent. The entity will teleport so that the position of its root bone matches that of the attachment. Entities must be parented before being sent this input.
SetParentAttachmentMaintainOffset <stringRedirectInput/string>
As above, but without teleporting. The entity retains its position relative to the attachment at the time of the input being received.
ClearParent
Removes this entity from the the movement hierarchy, leaving it free to move independently.
  • EnableDisable:
Enable / Disable
Enable/disable this entity from performing its task. It might also disappear from view.
  • StartCommentary
Force the commentary node to start.
  • StartUnstoppableCommentary
Force the commentary node to start, and don't allow the player to stop it in any way.

Outputs

OnCommentaryStarted
Fires when this commentary starts playing.
OnCommentaryStopped
Fires when this commentary stops playing. May be caused by the commentary file finishing, or by the player stopping it manually (if the node wasn't started with the StartUnstoppableCommentary input). If the node controls the players view with the viewposition key, then this input will be fired when the players view has finished returning to its original position.

See also