Skip to main content

scripted_sentence

scripted_sentence icon
Point entity

A scripted_sentence makes a monster or another entity speak a sentence from sound/sentences.txt.

Attributes​

The entity also has these common keys:

KeyDescriptionDefault
Sentence Namesentence

Sets 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.

Speaker Typeentity

Names the speaker, as a monster's name or class name. A func_button, a func_rot_button or a cycler can also speak.

Sentence Timeduration

Sets 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.

Default 3
Search Radiusradius

When 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.

Default 512
Delay Before Refirerefire

Sets how many seconds after the Sentence Time pass before the sentence can be spoken again.

If you leave this key empty, it is 0.

Default 3
Listener Typelistener

Names 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.

Volumevolume

Sets 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.

Default 10
Sound Radiusattenuation

Sets 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)
Default Small Radius (0)
Follow actionfollow_action

Sets 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)
Default Nothing (0)
Fire after speakingfire_after

Fires this target Sentence Time seconds after the sentence starts, plus Delay before fire after.

Delay before fire afterfire_after_delay

Sets how many seconds after the sentence pass before Fire after speaking fires.

Listener search radiuslistener_radius

Sets how far the listener is looked for.

If you leave this key empty or set 0, it is the Search Radius.

Allow useallow_use

With Yes, players can still press the use key on the speaker while it says this sentence.

  • No (0)
  • Yes (1)
Default No (0)
Search originsearch_origin

Sets 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 Once

The entity removes itself after the sentence is spoken once. This flag is set by default

2Followers Only

Only a monster that follows a player speaks it

4Interrupt Speech

The speaker says it also when it is busy, if it is alive. This flag is set by default

8Others stop talking

Other monsters around the speaker stop talking when the sentence starts. Without this flag, they keep talking

See also​

Changes since 1.38​

  • A func_button, a func_rot_button or a cycler can 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