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:
Code | Grammatical form | Entity |
$n | name | actor |
$e | he, she, it, they | actor |
$s | his, her, its, their | actor |
$m | him, her, it, them | actor |
$N | name | victim |
$E | he, she, it, they | victim |
$S | his, her, its, their | victim |
$M | him, her, it, them | victim |
$p | name | object |
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.