Re: Roving Exit Blockers

From: Alexander J Skrabut (skrabut@acsu.buffalo.edu)
Date: 07/11/94


> > I'm looking into the possibility of certain mobs, and possibly even PCs,
> > having the capability to exit block in ANY direction, although only one
> > direction at a time, regardless of their current location. I toyed around
> > with the possibility of basing this on the last_direction byte, but I
> > couldn't get it to work. Has anybody done this? Or do any of you have
> > any suggestions on what the best way to go about it would be?
> > Thanks for your input :)
> > Nino
> > 
> Felix this sounds like what we / you all used for Brassie, any ideas?
> 
> 							Phish
> 

Actually, this falls into the category of 'special spec_procs'.. What I'd 
do is, in the movement code, when it checks to see if an exit is 
legitimate, it will also see if any of the mobs in the room have a 
SPEC_PROC bit set (or whatever the flag is, I forget). If so, It'll jump 
to SPEC(random_blocker).. this will have a structure with the VNUMs of 
all the mobs that are random blockers, with the exits they block. For 
example: (My C may be wrong, but I just woke up, so.. =)

typedef struct {
	int	vnum;
	int	exits; /* this would be bitwise */
} mob_rand_blockers = {
	{1487,	(1 | 2 | 8)},	/* for example */
	{0,	0}
};

If you know anything about C, you'll recognize that and correct any 
errors I made =) But you get the point. You'll have mob_rand_blockers 
defined in your SPEC, and it'll check to see if the mob in question is a 
random blocker, and you code it to prevent a person going thru the exit.

-Adept



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