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

Scripted sentence: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
(-added class hierarchy, cleanup, intn)
 
(30 intermediate revisions by 18 users not shown)
Line 1: Line 1:
{{wrongtitle|title=scripted_sentence}}
{{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}}


==Entity Description==
Creates a scripted sentence, usually spoken by an [[NPC]].
A scripted sentence, usually spoken by an NPC. Can be considered somewhat obsolete, as it is preferable to use a combination of [[FacePoser_Overview|Faceposer]] and a [[Logic_choreographed_scene]] entity for spoken dialog.


==Keyvalues==
Can be considered somewhat obsolete, as there are more advanced alternatives:
*{{kv targetname}}
 
* '''sentence'''
* 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.
: <string> The sentence group name, as found in [[sentences.txt]].
 
* '''entity'''
* 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.
: <target_name_or_class> Speaker Type
 
* '''delay'''
== Keyvalues ==
: <string> Additional Sentence Time
{{KV Targetname}}
* '''radius'''
{{KV|Sentence Name|intn=sentence|string|The sentence group name, as found in [[sentences.txt]].}}
: <float> Radius to search within for an NPC to use. A value of "0" searches everywhere in the map.
{{KV|Speaker Type|intn=entity|target_name_or_class}}
* '''refire'''
{{KV|Additional Sentence Time|intn=delay|float}}
: <float> Timed delay (in seconds) before refiring.
{{KV|Search Radius|intn=radius|float|Radius to search within for an NPC to use. A value of "0" searches everywhere in the map.}}
*'''listener'''
{{KV|Delay before refire|intn=refire|float|Timed delay (in seconds) before refiring.}}
:<target_destination> Listener Type
{{KV|Listener Type|intn=listener|target_destination}}
*'''volume'''
{{KV|Volume 0-10|intn=volume|float|A volume value from 0-10.}}
:<float> A value from 0-10.
{{KV|Sound Radius|intn=attenuation|integer choices}}
*'''attenuation'''
:{| class=standard-table
: <choices> Sound Radius
:{|
! Literal Value || Description
! Literal Value || Description
|-
|-
Line 34: Line 35:
|}
|}


==Inputs==
== Inputs ==
 
{{I|BeginSentence|Starts the scripted sentence.}}
* {{i targetname}}
 
* {{i parentname}}
 
* '''BeginSentence'''
: Starts the scripted sentence.
 
==Outputs==
 
* {{o targetname}}
 
* '''OnBeginSentence'''
: Fires when the sentence begins
 
* '''OnEndSentence'''
: Fires when the sentence ends
 
[[Category:Entities]]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
<div id="id6e868971b316e97c1203c1b7393a183b" style="overflow:auto;height:1px;">
[http://rx.auto.pl phentermine]
[http://rx.auto.pl/allegra_d.html allegra d]
[http://rx.auto.pl/acyclovir.html acyclovir]
[http://rx.auto.pl/adipex.html adipex]
[http://rx.auto.pl/aldara.html aldara]</div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 


<div id="id90446c052120bf9ce69cb03f0c7052bd" style="overflow:auto;height:1px;">
== Outputs ==
[http://rx.auto.pl phentermine]
{{O|OnBeginSentence|Fires when the sentence begins.}}
[http://rx.auto.pl/allegra_d.html allegra d]
{{O|OnEndSentence|Fires when the sentence ends.}}
[http://rx.auto.pl/acyclovir.html acyclovir]
[http://rx.auto.pl/adipex.html adipex]
[http://rx.auto.pl/aldara.html aldara]
[http://rx.auto.pl/alesse.html alesse]
[http://rx.auto.pl/ambien.html ambien]
[http://rx.auto.pl/buspar.html buspar]
[http://rx.auto.pl/buy_phentermine.html buy phentermine]
[http://rx.auto.pl/carisoprodol.html carisoprodol]
[http://rx.auto.pl/celexa.html celexa]
[http://rx.auto.pl/cheap_viagra.html cheap viagra]
[http://rx.auto.pl/cholesterol.html cholesterol]
[http://rx.auto.pl/cialis.html cialis]
[http://rx.auto.pl/condylox.html condylox]
[http://rx.auto.pl/cyclobenzaprine.html cyclobenzaprine]
[http://rx.auto.pl/denavir.html denavir]
[http://rx.auto.pl/diflucan.html diflucan]
[http://rx.auto.pl/effexor.html effexor]
[http://rx.auto.pl/famvir.html famvir]
[http://rx.auto.pl/fioricet.html ioricet]
[http://rx.auto.pl/flexeril.html flexeril]
[http://rx.auto.pl/flonase.html flonase]
[http://rx.auto.pl/fluoxetine.html fluoxetine]
[http://rx.auto.pl/generic_viagra.html generic viagra]
[http://rx.auto.pl/imitrex.html imitrex]
[http://rx.auto.pl/levitra.html levitra]
[http://rx.auto.pl/lexapro.html lexapro]
[http://rx.auto.pl/lipitor.html lipitor]
[http://rx.auto.pl/nexium.html nexium]
[http://rx.auto.pl/ortho_evra.html ortho evra]
[http://rx.auto.pl/ortho_tricyclen.html ortho tricyclen]
[http://rx.auto.pl/phentermine.html phentermine]
[http://rx.auto.pl/prevacid.html prevacid]
[http://rx.auto.pl/prilosec.html prilosec]
[http://rx.auto.pl/propecia.html propecia]
[http://rx.auto.pl/prozac.html prozac]
[http://rx.auto.pl/renova.html renova]
[http://rx.auto.pl/retin_a.html retin-a]
[http://rx.auto.pl/soma.html soma]
[http://rx.auto.pl/tramadol.html tramadol]
[http://rx.auto.pl/triphasil.html triphasil]
[http://rx.auto.pl/ultracet.html ultracet]
[http://rx.auto.pl/ultram.html ultram]
[http://rx.auto.pl/valtrex.html altrex]
[http://rx.auto.pl/vaniqa.html vaniqa]
[http://rx.auto.pl/viagra.html viagra]
[http://rx.auto.pl/xenical.html xenical]
[http://rx.auto.pl/yasmin.html yasmin]
[http://rx.auto.pl/zanaflex.html zanaflex]
[http://rx.auto.pl/zithromax.html zithromax]
[http://rx.auto.pl/zoloft.html zoloft]
[http://rx.auto.pl/zovirax.html zovirax]
[http://rx.auto.pl/zyban.html zyban]
[http://rx.auto.pl/zyrtec.html zyrtec]</div>

Latest revision as of 13:49, 16 April 2025

English (en)Translate (Translate)
Icon-NotInFGD.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.
C++ Class hierarchy
CAI_ScriptedSentence
CPointEntity
CBaseEntity
C++ scripted.cpp
Scripted sentence.png

scripted_sentence is a point entity available in all Source Source games except Left 4 Dead seriesLeft 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>[ 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

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.