Copying and tweaking the EX_CLOSED check should work from the looks of
it.
if (IS_SET (pexit->exit_info, EX_CLOSED)
&& (!IS_AFFECTED (ch, AFF_PASS_DOOR)
|| IS_SET (pexit->exit_info, EX_NOPASS))
&& !IS_TRUSTED (ch, ANGEL))
Change EX_CLOSED to EX_HIDDEN
Change AFF_PASS_DOOR to AFF_DETECT_HIDDEN
Take out the ex_nopass line unless you want to make a NO_DETECT flag or
something to use. *shrug*
And that should work. Change the messages below of course and you're
there.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Matt
Foltz
Sent: Tuesday, October 22, 2002 3:28 PM
To: [email protected]
Subject: Hidden exits
Maybe I'm just brain dead right now, but I can't
figure out the problem with this code. It's pretty
self explanatory, you flag the exit with EX_HIDDEN and
if you don't have detect hidden on you can't see it or
go that way. Here's what I did:
added:
bool can_see_exit( CHAR_DATA *ch, EXIT_DATA *pExit )
{
if (IS_SET(pExit->exit_info, EX_HIDDEN )
&& !IS_AFFECTED(ch, AFF_DETECT_HIDDEN ) )
return FALSE;
return TRUE;
}
then in move_char:
if ( !can_see_exit( ch, pexit ) )
{
send_to_char("Alas, you cannot go that way.\n\r",
ch);
return;
}
It's pretty simple. Except that I can walk through
hidden exits without detect hidden. And if I change
the line to can_see_exit instead of !can_see_exit
(hoping I had a backwards true/false statement
somehow), if I CAN see the exit, I CAN'T walk through
it. So it does go through the check, it's just not
checking right. Any ideas?
-Matt Foltz
__________________________________________________
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/
--
ROM mailing list
[email protected]
http://www.rom.org/cgi-bin/mailman/listinfo/rom