Re: Triggers

From: Thomas Arp (
Date: 02/23/03

From: "Kevin Dethlefs" <>
> %actor% just gives the ID number....

Not really.

Welcor. idnum 1. -> "1"
%actor% -> "{unprintable UID_CHAR}1" -> 'name' field of the thing[1] with unique
                id (UID) 1. In this case; "Welcor"

The problem arises when dealing with output of %actor%. The UID_CHAR, which
is actually ASCII char 27 ('\x1b'), is handled differently by different
You may experience some strange behaviour when displaying %actor%
or similar UID vars, depending on the client implementation.
Some clients "glob" the first char following the UID_CHAR,
while others silently ignore it. In my current development copy, I've
the UID_CHAR to '}' to make it easier to debug. Since this is an altogether
internal char, it makes no difference, other than output. And it is a lot
easier to distinguish between "}1" and "1", than "1" and "1"[2]...

If you wish to make the same change, just alter the line in dg_scripts.h:

#define UID_CHAR '\x1b'
#define UID_CHAR '}'

Your other trouble relates to nohassle and wizinvis.
Remember to test with mortals. Immortals are not touched, if they
are invis or has nohassle on.


[1] I use "thing" here, because it can be virtually anything. Mobs,
    objects or rooms. A text variable, even, though it would generate
    an error, since texts don't have names. Come to think about it,
    neither do rooms.

[2] After all, the parser just checks if the first char in the variable
    is the UID_CHAR. If so, it finds a pointer to the correct object,
    mob or room. Otherwise it assumes it's text.

   | FAQ: |
   | Archives: |
   | Newbie List:   |

This archive was generated by hypermail 2b30 : 06/26/03 PDT