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

point_commentary_node

From Valve Developer Community
Jump to: navigation, search
Commentary bubble
class hierarchy
CPointCommentaryNode defined in CommentarySystem.cpp
CBaseAnimating
CBaseEntity

point_commentary_node is a point entity available in all Source Source games.

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.

For a commentary node to be able to be activated by a player (+use while looking at the node), the player must have commentary set to 1 and the map must have a <map name>_commentary.txt file in the same directory as the BSP [1]. This file may be empty and/or embedded in the BSP.

If a map with a point_commentary_node is being played in multiplayer only the first player to join will be considered the 'commentary player'. As such only their view will be ray traced to determine the active commentary node [2]

Although not explicitly stated, this entity may use fields from the RenderFields base class. The render options selected will affect the speech bubble model of the node.

Note.pngNote:This is a preserved entity in Day of Defeat: SourceTeam Fortress 2.
  • On a new round, its properties including its position will intentionally not reset. You can use logic_auto to emulate resetting it.
  • Killing it removes it forever, as it is not respawned on a new round.
  • It cannot be spawned with a point_template.
  • Parenting this with non preserved entities may have undesirable effects.
Note.pngNote:In Team Fortress 2 Team Fortress 2, if this entity is spawned without any properties, the following side effects will apply as long as the entity exists:
  • Player join, team change and disconnect messages are not shown in chat
  • Convars with FCVAR_NOTIFY will not print changes to chat
  • The scoreboard is blocked from appearing
  • Some objective panels, such as the CTF/PD panel, will not appear


Keyvalues


Targetname:
Name (targetname) <string>
The targetname that other entities refer to this entity by.
start_disabled <boolean>
Start disabled.
origin <vector>
The origin of this entity within the map.
angles <angles>
The orientation of this entity within the map.
commentaryfile <sound>
The commentary sound file that should be played when this node is used by the player.
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.
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.
synopsis <string>
A short synopsis of the contents of the commentary.
precommands <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 <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 <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 <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 <boolean>
If true, the player will not be able to move while the commentary sound file is playing.

Inputs

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.

EnableDisable:

Enable
Disable
Enable/disable this entity from performing its task. It might also disappear from view.

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