Scripted sentence: Difference between revisions
Jump to navigation
Jump to search

mNo edit summary |
(-added class hierarchy, cleanup, intn) |
||
(32 intermediate revisions by 19 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{LanguageBar}} | ||
{{TabsBar|main=gs|base=scripted_sentence}} | |||
{{Ent not in fgd}} | |||
{{CD|CAI_ScriptedSentence|file1=1}} | |||
{{This is a|point entity|sprite=1|name=scripted_sentence|except=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_Overview|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 == | |||
{{KV Targetname}} | |||
{{KV|Sentence Name|intn=sentence|string|The sentence group name, as found in [[sentences.txt]].}} | |||
{{KV|Speaker Type|intn=entity|target_name_or_class}} | |||
{{KV|Additional Sentence Time|intn=delay|float}} | |||
{{KV|Search Radius|intn=radius|float|Radius to search within for an NPC to use. A value of "0" searches everywhere in the map.}} | |||
{{KV|Delay before refire|intn=refire|float|Timed delay (in seconds) before refiring.}} | |||
{{KV|Listener Type|intn=listener|target_destination}} | |||
{{KV|Volume 0-10|intn=volume|float|A volume value from 0-10.}} | |||
{{KV|Sound Radius|intn=attenuation|integer choices}} | |||
:{| class=standard-table | |||
:{| | |||
! Literal Value || Description | ! Literal Value || Description | ||
|- | |- | ||
Line 43: | Line 35: | ||
|} | |} | ||
==Inputs== | == Inputs == | ||
{{I|BeginSentence|Starts the scripted sentence.}} | |||
== Outputs == | |||
{{O|OnBeginSentence|Fires when the sentence begins.}} | |||
{{O|OnEndSentence|Fires when the sentence ends.}} |
Latest revision as of 13:49, 16 April 2025


![]() |
---|
CAI_ScriptedSentence |
![]() |

scripted_sentence
is a point entity available in all Source games except
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>[ Edit ]
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g.
parentname
ortarget
).
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.