I have a minor issue with your code. As written, the specproc may only
work with a single object (vnum 35) although it is of course possible
to ASSIGNOBJ() to multiple objects. Of course you can say "if I add a
new object, I just check for it's vnum too". Yes, this will work but it
is not clean. Instead of checking the vnum, just check to see if the
object has a specproc == invis_item.
Here's how i did just that in an object specproc:
SPECIAL(handgrenade)
{
...
/* make sure the object found has this as a specproc */
if (obj_index[obj->item_number].func != handgrenade) {
/* this is the wrong object */
do whatever
return;
}
+------------------------------------------------------------+
| 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