scripted_sentence

From Sven Co-op
Jump to navigation Jump to search
scripted_sentence
Type

point

Status

supported

 


Allows any monster to speak a preassembled sentence or a custom audio file. Does automatic lip-syncing based on the file contents. If sentence have no given name, it will be activated on map start or when search radius is reached.

1 Keyvalues

Sentence Name : sentence

Name of sentence from "sentences.txt" or sound file to play. Lip syncing is automatic when sound file is typed. To use sound file write '+' symbol and then filename with path (e.g. if you want to set file located in "svencoop/sound/mymap/bell1.wav", type '+mymap/bell1.wav'.

Speaker Type : entity

Name OR classname of monster who will "speak" this sentence. If classname is specified, the search radius is used (sentence is activated when monster with specified classname reach radius). Click HERE for the list of monsters classnames.

Sentence Time : duration

Duration of monster speaking, in seconds. Best value is a sound file duration.

Search Radius : radius

Radius, in units, in which to search for a valid target monster. This will only work if you specified a monster classname for 'Speaker Type'. Disables direct triggering. Set to 0 to disable.

Delay Before Refire : refire

Time interval between sentence refiring. When sentence have a name this feature is disabled.

Listener Type : listener

The name of entity the monster will look at when "speaking" a sentence.

Volume : volume

Audibility of speaker.

Sound Radius : attenuation

Custom sound radius (just like radius flags in ambient_generic).

2 Flags

1 : Fire once

Can be activated only once.

2 : Followers only

Speak only if this monster is following player (by 'USE' follow command).

4 : Interrupt Speech

Override current speech on affected monster (including default ones). Still some monsters interactions  can break this sentence.

8 : Concurrent

This sentence cannot be played among other sentences (pick random sentence from those which are called at the moment). Also override any other sentences (like interrupt speech but works globally) except default sentences of other monsters.

3 Notes

Sound files are precached automatically (unlike sentences in monster classes).