talkntext

Module: talkntext — environment_talk_and_text.lua

What it does

Delivers a text message into the game world as an in-character chat line, routing it to different speakers depending on the pos field. Messages are queued so rapid-fire events are processed one per tick rather than all at once.

Trigger type

talkntext

Parameters

Parameter Type Default Valid Values Description
type string required "talkntext" Must exactly match the module name.
message string required Any non-empty string The text content to deliver in-game. Leading and trailing whitespace is trimmed.
pos string "" (weighted random) "", "zombie", "tv", "radio" Controls which entity speaks the message. Omit or leave empty for the weighted random distribution.
viewer string "" Any string Name displayed as the speaker prefix. Takes priority over user if both are present.
user string "" Any string Fallback name prefix if viewer is absent or empty.
sep string ": " Any string Separator inserted between the name prefix and the message. Ignored if no name prefix is present.

Examples

Simple message routed to a random speaker
{ type="talkntext", message="The dead walk among us." }
Viewer shout-out delivered through the nearest zombie
{ type="talkntext", viewer="ChaosViewer99", message="Braaaaains!", pos="zombie" }
Emergency broadcast over the nearest TV with a custom separator
{ type="talkntext", user="WKRZ News", sep=" - ", message="All residents must evacuate immediately.", pos="tv" }