msg_character

Settable:
no
Arguments:
(1) character, string
(2) character, string, character
(3) character, string, object
(4) character, string, character, object
Return Value:
none

This function sends a text string to the specified character. The string can be just a plain string,

   msg_character(%a,'You fall and hit your head.')

or can be more complicated, including the names of other characters and/or objects. Certain sequences of characters have special meanings inside the string. These sequences start with $. In the table below, "actor" means the first character argument, "victim" means the second character argument if present, and "object" means the object argument if present. Here are the special sequences:

Special Control Codes
CodeGrammatical form Entity
$nnameactor
$ehe, she, it, theyactor
$shis, her, its, theiractor
$mhim, her, it, themactor
$Nnamevictim
$Ehe, she, it, theyvictim
$Shis, her, its, theirvictim
$Mhim, her, it, themvictim
$pnameobject

Say that a creature, %c, suddenly shrank into a stone figurine of itself. If the figurine is %1, and you want to tell %a that this happened, you would say

   msg_character(%a,'$N suddenly collapses into $Mself, leaving $p!',%c,%1)

Notice how the $N and $M both refer to the second character, %c, instead of %a, because they are capitalized. $n and $m would in this case have referred to %a.