On Fri, 7 Jun 1996, Brian Menges wrote: > I want to set up a special procedure so that whenever a player gets > flagged (either thief or killer) a mobile called a bounty hunter will be > created and will hunt the fugitive down. I'm not sure exactly how to go about > doing this. I noticed there is a function in graph.c called hunt_victim() but > it doesn't seem to be used anywhere. There is also a variable under > char_special_data for setting who is hunting the player. > These two pieces of code seem to be a good launching point for creating > a bounty hunter special procedure. My plan is to do the following: Use the > variable under char_special_data to remember the player who the mob should be > hunting and then call hunt_victim() to track the player. My question is how do > I make it so that mob will move every PULSE? How often are the special > procedures called for a mobile? If I just place hunt_victim(hunting) under the > special procdure for my bounty hunter mobile will this work? Is there anything > else I am missing that I should know of? You dont even need a special for this. First, ya just need to set who the mob is hunting... something like: HUNTING(ch) = victim; then, in mobact.c where it says something like, "Add new mobile actions here" just add a line like this: if (HUNTING(ch) && GET_POS(ch) == POS_STANDING) hunt_victim(ch); And yer set. mobacts are called just as often as specials, which are called from the top of mobile_activity() anyways, and having it in mobact lets all mobs hunt, so if say some angry mort pisses ya off, you can just have a command to set any mob you load up to hunting the poor guy. -Sky
This archive was generated by hypermail 2b30 : 12/18/00 PST