echo
echo <target> <string>
Send a line of text to a target. The target may be a single creature, a room, or every player in the owner's zone.
Arguments
<target>— one of:- a creature — the text goes to that creature only;
- a room — the text goes to everyone in that room;
- the string
"room"— shorthand for the owner's current room; - the string
"zone"— every player in the owner's zone.
<string>— the text to send. Build dynamic text with interpolation, e.g."Welcome, $actor."
Returns
null. Like the other action commands, a
successful echo in the handle phase suppresses the event's default
action.
Examples
after command (say) {
echo $actor "A cold draft raises the hair on your neck."
}
The actor — and only the actor — sees the line.
after command (laugh) {
echo "room" "The walls themselves seem to laugh with $actor."
}
Everyone in the owner's room sees this, with $actor replaced by the
actor's name.
See also
emit— act-style messages with$actor/victim grammar and per-observer phrasing.do— make the owner perform a command (which may itself produce output).- Strings and interpolation · Handlers, events, and phases