>From: Jason Beeland <jbeeland@speedfactory.net> >Reply-To: Circle Discussion List <CIRCLE@post.queensu.ca> >To: CIRCLE@post.queensu.ca >Subject: object procs >Date: Thu, 9 Dec 1999 21:56:43 -0500 > >Hi all, i was wondering if any of you could point me to an existing >example, >or give me a tip for this problem. >I want to make a weapon that will do something special when a pc kills a >mob >with it. Like maybe >cast an animate dead spell on the corpse. And then if it hasn't killed >anything in a while, it would moan about being hungry. >I figure I'll just use the GET_OBJ_TIMER(weapon) member to count down till >it complains about being hungry, but I'm >not sure how to make it reset the timer when it kills a creature, and I'm >also not sure how to make it cast the effect. >I figure i could make a special case check for it in fight.c in the >damage() >function, but i'd really rather find a better >way to do it if one exists. Thanks for the help. > >Veritus Silverun >silverun.dynip.com port 7777 >(still in extremely early stages, stock zones, but lots of code stuff in) > IMO the best way to do it is the similar to mob programs and dg scripts. simply make a 'on_death' function and stick in the die function. then on_death checks for special cases like a re animate weapon or 'ghost' deaths. ---------------- Daniel Staudt <dstaudt@hotmail.com> ~* I Don't Build I Re-Build *~ ICQ UIN# <14148959> <http://www.geocities.com/ResearchTriangle/5404/> ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com +------------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | +------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST