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

From: John Evans (evansj@HI-LINE.NET)
Date: 08/27/97

On Wed, 27 Aug 1997, Jared Buckley wrote:

> 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)

You're right about that. I wasn't paying attention to what I was doing...

Instead of calling act() and extract_char() from within a spec_proc do it
in weather.c in another_hour(). In 'case 5' of the
'switch (time_info.hours)' command do the loop through the character_list
and act() and extract() on mobs that are shadow mobs.

John Evans

I don't suffer from Insanity!  I enjoy every minute of it!

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | |

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