Re: [CODE] Using die() in mob specials

From: Jared Buckley (jaredb@TI.COM)
Date: 08/27/97


John Evans wrote:
[snip]
> When the sun comes up, loop through the character list and if you find a
> mob that is flagged MOB_SHADOW do:
>
> act("$n screams and fades away as the sun hits $e!",
>     FALSE, ch, 0, 0, TO_ROOM);
> char_from_room(ch);
> extract_char(ch);

You can't call extract_char right after calling char_from_room,
because extract char will error out, complaining about extracting
a character from NOWHERE:

SYSERR: NOWHERE extracting char. (handler.c extract_char)

I'd also like to isolate this to a special procedure, rather
than setting a bit for all mobs.  When I call die(), raw_kill(),
or extract_char() on the mob in the room, it causes the mud to
crash.  I'm having trouble though, seeing how this is different
from when a mob dies in battle.  (And that works ok)  Obviously
I'm missing something, as combat works, but this proc doesn't.
Anyone tried to have a spec_procs mob destroy itself?

Jared


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/08/00 PST