Re: Non-cardinal directions.

From: Michael Scott (scottm@dns.workcomm.net)
Date: 05/11/96


On Sat, 11 May 1996, David E. Case wrote:

> Date: Sat, 11 May 1996 11:56:04 -0400 (EDT)
> From: David E. Case <dcase@adams.berk.net>
> To: circle@pvv.unit.no
> Subject: Non-cardinal directions.
> 
> Hi. One last little thing with northeast, etc. I've changed many many things
> and they seem to work great. The ex command shows them fine, "l southeast"
> does what it's supposed to. But when I try to move in any of the new
> directions it brings me to vnum #0. Any idea why?

	This could be for more than one reason.
- Did you update the NUM_OF_DIRS variable to 10.
- Does the room actually lead to somewhere viable..
- in do_move all it does to see what direction you are going is subtract 
1 from the cmd number which called it.  if you didnt add your movement 
commands right at the beginning of the cmd_info list then that would make
some direction like 200 .. which doesnt exist.

this is the part of the code im referring to:

ACMD(do_move) {
  /* [comment snipped] */
  perform_move(ch, cmd-1, 0);
}


> 
> And this is a little morre complicated. How do I tell it that ne is
> northeast, without going through and adding more keywords and such? Is there
> an easy way to change the abbreviation method? Thanks.
> -- 
> dcase@bcn.net - http://www.bcn.net/~dcase - Greenfield, MA
> "Jesus, save me from your followers..."
> 

to solve this problem i added 4 more commands before the "northeast",
"northwest", (right after "down") commands, and they were "ne" , 
"nw" , "se" and "sw" (same as their respective commands)
but you also need to update the do_move command  to look like this, if 
you do so:

ACMD(do_move) {
  /* [comment snipped] */
  if (cmd > 10)
    perform_move(ch, cmd-5, 0);
  else
    perform_move(ch, cmd-1, 0);
}

                                  Michael Scott aka Manx!
			       FLAMES == scottm@workcomm.net



This archive was generated by hypermail 2b30 : 12/18/00 PST