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

scripted_sentence

From Valve Developer Community
Jump to navigation Jump to search
English (en)Translate (Translate)
Info.png
This entity is not in the Counter-Strike: SourceDay of Defeat: SourceTeam Fortress 2Counter-Strike: Global Offensive FGD by default.
See below for instructions on making it available.
Class hierarchy
CAI_ScriptedSentence
CPointEntity
CBaseEntity
scripted.cpp
Scripted sentence.png

scripted_sentence is a point entity available in all Source Source games except Left 4 Dead series Left 4 Dead series.

Creates a scripted sentence, usually spoken by an NPC.

Can be considered somewhat obsolete, as there are more advanced alternatives:

  • For sentences spoken by a visible NPC, you can add lip synch and gestures to the sentence by using a logic_choreographed_scene entity pointing to a VCD file made in the Faceposer editor.
  • For dialog spoken by a non-visible NPC, like over a radio or by combine forces, you can use a simple ambient_generic entity either pointing to a raw sample, a soundscript or a scripted sentence (consisting of a combination of several samples) in the sentences.txt file.

Keyvalues

Name (targetname) <string>
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

Sentence Name (sentence) <string>
The sentence group name, as found in sentences.txt.
Speaker Type (entity) <target_name_or_class>
Additional Sentence Time (delay) <float>
Search Radius (radius) <float>
Radius to search within for an NPC to use. A value of "0" searches everywhere in the map.
Delay before refire (refire) <float>
Timed delay (in seconds) before refiring.
Listener Type (listener) <targetname>
Volume 0-10 (volume) <float>
A volume value from 0-10.
Sound Radius (attenuation) <integer choices>
Literal Value Description
0 Small Radius
1 Medium Radius
2 Large Radius
3 Play Everywhere

Inputs

BeginSentence
Starts the scripted sentence.

Outputs

OnBeginSentence
Fires when the sentence begins.
OnEndSentence
Fires when the sentence ends.