> What is the process for making sure that if a PC (or NPC) is hidden, that > in "look" (and its alternate subroutines) the player (PC/NPC) *cannot* be > seen when someone looks at the room? check out all of the macros that make up the CAN_SEE macro..i think the HIDDEN stuff is part of the INVIS_OK, but i'm not really sure since i changed all that.. > Was also thinking, is it possbile to say, make a piece of equipment > *hidden*? That is, instead of the old trick of making a blank long_desc, > is it *easily* possible to make a piece of equipment load somewhere, but > not have the players see it without sense_life? i added hidden objects and doors to my mud, as well as a perception stat and a search skill..what i ended up doing was making functions that said whether or not the char/obj/door was hidden, and use that function in the macro like so: #define INVIS_OK(sub, obj) \ ((!IS_AFFECTED((obj),AFF_INVISIBLE) || IS_AFFECTED(sub,AFF_DETECT_INVIS)) && \ (!is_hidden_char((sub), (obj)))) #define INVIS_OK_OBJ(sub, obj) \ ((!IS_OBJ_STAT((obj), ITEM_INVISIBLE) \ || IS_AFFECTED((sub), AFF_DETECT_INVIS)) && \ !is_hidden_obj((sub), (obj))) bool is_hidden_door (struct char_data *ch, struct room_direction_data *exit) { if (!IS_SET(exit->exit_info, EX_HIDDEN)) return FALSE; if (per_app[GET_PER(ch)] >= number(0, 101)) return TRUE; return FALSE; } bool is_hidden_obj (struct char_data *ch, struct obj_data *obj) { if (!IS_OBJ_STAT(obj, ITEM_HIDDEN)) return FALSE; if (per_app[GET_PER(ch)] >= number(0, 101)) return TRUE; return FALSE; } bool is_hidden_char (struct char_data *ch, struct char_data *vict) { if (!IS_AFFECTED(vict, AFF_HIDE)) return FALSE; if (IS_AFFECTED(ch, AFF_SENSE_LIFE)) return FALSE; if (per_app[GET_PER(ch)] >= number(0, 101)) return TRUE; return FALSE; } hrm..now that i think of it, i could probably do that with one function like is_hidden(ch, (void *) thing, MODE_OBJ)..shrug.. siv +------------------------------------------------------------+ | 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/15/00 PST