point_commentary_node

From Valve Developer Community
Revision as of 15:32, 31 May 2019 by RandomCatDude (talk | contribs) (fixed poor formatting)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Commentary bubble

<Half-Life 2: Episode One> point_commentary_node is a point entity available in Half-Life 2: Episode One.

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

  • Targetname:

Name <string>
The targetname that other entities refer to this entity by.
Entity Scripts <scriptlist> (New with Left 4 Dead 2)
Space delimited list of VScript files (without file extension) that are executed after all entities have spawned. The scripts are all executed in the same script scope, later ones overwriting any identical variables and functions.
Script think function <string> (New with Left 4 Dead 2)
Name of a function in this entity's script which will be called automatically every 100 milliseconds (ten times a second) for the duration of the script. It can be used to create timers or to simulate autonomous behavior. The return value (if present) will set the time until the next call.
Note:Try to avoid expensive operations in this function, as it may cause performance problems.
  • 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 <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.
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

  • Targetname:

Kill
Removes this entity and any entities parented to it from the world.
KillHierarchy
Functions the same as Kill, although this entity and any entities parented to it are killed on the same frame, being marginally faster than Kill.
AddOutput  <string>
Evaluates a keyvalue/output on this entity. It can be potentially very dangerous, use with care.
Format: <key> <value>
Format: <output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire, -1 means infinite>
FireUser1 to FireUser4
Fire the OnUser outputs; see User Inputs and Outputs.
Use  !FGD
Same as a player invoking +use; may not do anything. Can also be invoked by creating an output that does not specify an input.
This input is not included in Valve's FGDs.
RunScriptFile  <script> (New with Left 4 Dead 2)
Execute a VScript file from disk, without file extension. The script contents are merged with the script scope of the receiving entity.
RunScriptCode  <string> (New with Left 4 Dead 2)
Execute a string of VScript source code in the scope of the entity receiving the input. String quotation may be needed when fired via console.
Bug: In <Left 4 Dead 2>, the code is executed in the script scope of the entity that fires the output, not the one receiving the input.
Warning: Never try to pass string parameters to a script function with this input. It will corrupt the VMF structure because of the nested quotation marks, which then must be removed manually with a text editor.
CallScriptFunction  <string> (New with Left 4 Dead 2) !FGD
Execute a VScript function in the scope of the receiving entity.
SetLocalOrigin  <coordinates> (New with Alien Swarm) !FGD
Send this entity to a spot in the map. If the entity is parented to something, it will be offset from the parent by this amount.
SetLocalAngles  <angles> (New with Alien Swarm) !FGD
Set this entity's angles.
  • Parentname:

SetParent  <string>
Move with this entity. See Entity Hierarchy (parenting).
SetParentAttachment  <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  <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

  • Targetname:

OnUser1 to OnUser4
These Outputs each fire in response to the firing of the like-numbered FireUser1 to FireUser4 Input; see User Inputs and Outputs.
OnKilled  (Only in the Left 4 Dead series)
This Output fires when the entity is killed and removed from the game.
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