Re: Triggers

From: Thomas Arp (t_arp@stofanet.dk)
Date: 02/23/03


From: "Kevin Dethlefs" <Demortes2004@aol.com>
> %actor% just gives the ID number....

Not really.

Example:
Welcor. idnum 1.

%actor.id% -> "1"
%actor% -> "{unprintable UID_CHAR}1"
%actor.name% -> '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
clients.
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
changed
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'
to
#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.

Welcor

[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: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



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