emit

emit <type> <string> [actor] [victim]

Send an act-style message, rendered per observer with $-code grammar.

emit is the richer sibling of echo. Where echo sends one fixed line to a target, emit runs the message through the game's act system: each viewer sees the message phrased from their own point of view, with $-codes filled in from the actor and victim, and verbs and pronouns agreeing automatically. Use it for emotes and combat-style lines where "you" versus a third party's name matters.

Arguments

Returns

null. Like the other action commands, a successful emit in the handle phase suppresses the event's default action.

Act codes

The message text is filled in per observer: the same $n shows the actor's name to onlookers but reads as you to the actor themselves. The common codes are:

Examples

after command (say) {
  emit room '$n stirs the air with a slow, deliberate gesture.'
}

Everyone in the room sees the actor's name; the actor sees you. The message is single-quoted so $n reaches the act system unchanged.

Mix interpolation with literal codes by escaping the act $ in a double-quoted string:

after command (say) {
  emit room "\$n glances at [name $actor] and nods slowly."
}

Here [name $actor] is interpolated by the script while \$n is left for the act system to fill in per viewer.

See also