Zeavon wrote:
>
> On Wed, 31 Mar 1999, Del wrote:
>
> > Is there a function to get the opposite direction of a movement?
> >
>
> sprintf(buf, "$n has arrived from %s%s.",
> (dir < UP ? "the " : ""),
> (dir == UP ? "below": dir == DOWN ?
> "above" : dirs[rev_dir[dir]]));
>
Thank you very much, this also helped me find out that the extra directions
snippet does not account for rev_dir, so those of you using extra
exits/directions. Make sure your rev_dir[] accounts for them!!
Plus I didn't think about directions up and down being in the equation, I
modified the above slightly to add in directions for ne se sw and nw.
sprintf(buf, "$n has arrived from %s%s.",
(dir < UP || dir > DOWN ? "the " : ""),
(dir == UP ? "below": dir == DOWN ?
Again, Thanks!
+------------------------------------------------------------+
| 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