scripted_sentence

A scripted_sentence makes a monster or another entity speak a sentence from
sound/sentences.txt.
Attributes
The entity also has these common keys:
- Naming and triggering: Name, Target, Delay before trigger and KillTarget
sentenceSets the sentence to speak. A sentence name with a ! in front plays that sentence, and a name without ! plays a random sentence of that group.
entityNames the speaker, as a monster's name or class name. A func_button, a func_rot_button or a cycler can also speak.
durationSets how many seconds the speaker counts as talking. The next sentence can start after this time plus Delay Before Refire.
If you leave this key empty, it is 0.
3radiusWhen Speaker Type is a class name, sets how far from this entity the game looks for the speaker, in units. It also sets how far from the speaker the game looks for the listener, unless you set Listener search radius.
If you leave this key empty, it is 0, so the game doesn't find a speaker given by its class name. It also doesn't find a listener given by its class name, unless you set Listener search radius.
512refireSets how many seconds after the Sentence Time pass before the sentence can be spoken again.
If you leave this key empty, it is 0.
3listenerNames the entity that the speaker looks at while it talks, by its name or class name. player is the nearest player.
If you leave this key empty, the speaker looks at nobody.
volumeSets how loud the sentence is, from 1 for very quiet up to 10 for full volume. 0 or less, or a value that isn't a number, gives full volume.
10attenuationSets how far away players hear the sentence.
- Small Radius (0)
- Medium Radius (1)
- Large Radius (2)
- Play Everywhere (3)
- Larger Radius (4)
- Huge Radius (5)
Small Radius (0)follow_actionSets what the speaker does when it starts the sentence. A monster that was attacked never follows.
- Nothing (0)
- Start following (1) - It follows the nearest player, but a Cop only does this as a player ally with a Followage policy set
- Stop following (2)
Nothing (0)fire_afterFires this target Sentence Time seconds after the sentence starts, plus Delay before fire after.
fire_after_delaySets how many seconds after the sentence pass before Fire after speaking fires.
listener_radiusSets how far the listener is looked for.
If you leave this key empty or set 0, it is the Search Radius.
allow_useWith Yes, players can still press the use key on the speaker while it says this sentence.
- No (0)
- Yes (1)
No (0)search_originSets where the game looks for the speaker when Speaker Type is a class name, as a locus position.
If you leave this key empty, it is this entity.
Flags
1Fire OnceThe entity removes itself after the sentence is spoken once. This flag is set by default
2Followers OnlyOnly a monster that follows a player speaks it
4Interrupt SpeechThe speaker says it also when it is busy, if it is alive. This flag is set by default
8Others stop talkingOther monsters around the speaker stop talking when the sentence starts. Without this flag, they keep talking
See also
scripted_sequence- plays an animation on a monsterspeaker- plays announcements at random times- scripted_sentence on TWHL - the Half-Life entity
Changes since 1.38
- A
func_button, afunc_rot_buttonor acyclercan be the speaker, but in SBO 1.38 only monsters could speak - A Volume that isn't a number gives the default volume. In SBO 1.38 such a value could stop or hang the server
- You can use the new keys Follow action, Fire after speaking, Delay before fire after, Listener search radius, Allow use and Search origin