scripted_sentence
Last edited 1 week ago2024-10-26 12:40:34 UTC
- Wiki
- View Page
-
A
scripted_sentence
entity allows you to make a monster say something. Available sentence names can be found in the
sound\sentences.txt file.
Attributes
- Name (targetname) - Property used to identify entities.
- Target (target) - When an entity is activated, it triggers the entity with the name specified by Target.
- Delay before trigger (delay) - Usually the time in seconds before an entity should trigger its target (after being triggered itself).
- Kill Target (killtarget) - Event to be killed once the sentence has finished.
- Sentence Name (sentence) - Sentence to play (see notes).
- Speaker Type (entity) - This is the name of the entity that says the sentence. It can be a targetname of the specific monster or a classname (e.g.
monster_scientist
). Since the 25th anniversary update buttons and cyclers can be speakers as well.
- Sentence Time (duration) - The duration in seconds before the monster becomes available for usage by a player once the scripted sentence has started playing. This also affects the time duration of other speakers not being able to start new sentences (including talk monsters, human grunts and speaker entities). The game doesn't automatically calculate the duration of the sentence, so the mapper must make sure this value is big enough to cover the duration of the audio.
- Search Radius (radius) - If speaker type is set to the monster's classname (e.g.
monster_scientist
), the scripted_sentence
will try to find the monster only in this radius (in units, relative to the scripted_sentence
origin). The radius doesn't affect the search by a targetname. The same radius is used when searching for a listener. If listener is a player, then the value 4096 is used to find the player.
- Delay Before Refire (refire) - Delay before trying to find the appropriate monster again once the
scripted_sentence
is activated but failed to find the speaker (e.g. the monster is in combat or does not exist on the map yet).
- Listener Type (listener) - The name of the entity that the speaker will look towards while speaking.
- Volume (volume) - Range: 0 - 10.
- Sound Radius (attenuation) - Values:
- 0 - Small Radius
- 1 - Medium Radius
- 2 - Large Radius
- 3 - Play Everywhere
Flags
- Fire once (1) - The
scripted_sentence
will be removed from the game once the sentence has started playing on the affected monster.
- Followers only (2) - Once the
scripted_sentence
is activated, the sentence will play only when the speaker is in the state of following the player (via pressing +use on the talk monster who is not pre-disaster).
- Interrupt speech (4) - If enabled, the affected talk monster will speak the sentence even when in combat state or other speakers are talking. This flag is also required if you want to make a talk monster with Gag flag speak or if you want the monster to say the sentence even without player presented in PVS.
- Concurrent (8) - If enabled, when the scripted sentence is played on the affected talk monster, other talk monsters (barneys and scientists) will stop their speech (both regular and scripted sentences). The name of the flag is somewhat misleading and should be called "Shut up friends". Disabling this flag allows several talk monsters to speak at the same time.
Notes
- Enter
player
as Listener Type if you want the speaker to look at the player while talking.
- To use a specific sentence from sentences.txt (which is normally the case), add a
!
prefix to the sentence name e.g. !BA_LETMEOUT
plays the BA_LETMEOUT
sentence.
- To select a random sentence from a sentence group (i.e. one or more sentences that share an ID but with numbered suffixes), omit the above
!
prefix, and give the sentence group name as value to sentence. This allows you to make the monster speak a random sentence from a group on command e.g. HEV_E
can play one of HEV_E0
through HEV_E5
(chosen at random).
- The center of search radius is the
scripted_sentence
when finding the speaker, and at the found speaker when finding the listener.
See also
1 Comment
You must log in to post a comment.
You can login or register a new account.