mob
verb
Test()
world << "[src.dir]"
That returns a number from 1-10 when clicked;What am I doing wrong?, I'm totally stumped.
Thanks in advance.
-Thorg
ID:170918
![]() Nov 30 2004, 8:48 am
|
|
mob That returns a number from 1-10 when clicked;What am I doing wrong?, I'm totally stumped. Thanks in advance. -Thorg |
Thanks, Did it allways work like that?, the F1 brought up help screen said it should output one of the directions in capitals.
-Thorg |
Yes, it's been like that since long before I came to BYOND. I looked at the reference and it is a little misleading the way it's presented. Those are the values dir is limited to, but it doesn't explain that those are constants for numerical values as I explained above. Here are a couple procs that might help.
sd_dir2text(dir as num) |
NORTH = 1
SOUTH = 2
EAST = 4
WEST = 8
Diagonals are the cardinal directions logically ORed together:
NORTHEAST = NORTH | EAST = 5
SOUTHEAST = SOUTH | EAST = 6
NORTHWEST = NORTH | WEST = 9
SOUTHWEST = SOUTH | WEST = 10