ID:137501
Nov 1 2001, 6:42 pm
|
|
Would changing the values of the NORTH, SOUTH, etc. directional macros potentially screw up any of the built-in movement stuff? The exponential system is handy, but for some purposes it would be more useful to have different numerical directions assigned.
|
In response to Spuzzum
|
|
NORTH = 1
NORTHEAST = 2 EAST = 3 var/random = rand(1,3) step(usr,random) I'm bored, This probably has nothing to do with anything. |
I'm used to direction as an angular value, since I usually used directions from 0-7 (or 1-8) in the games I made before coming to BYOND. Incrementing or decrimenting the direction by 1 would turn the object 45 degrees (or an appropriate value depending on the number of directions available. I was very surprised to see the values used for directions in BYOND.
I'd recommend using a list or pair of procs to convert from your system to the built in dir system and back again. I doubt BYOND will allow you to change the internal constants and if you can, it could lead to unexpected results (especially for directional icons). I use a list to convert BYOND dirs to a value in degrees for Tanks. |
In response to Spuzzum
|
|
Spuzzum wrote:
Leftley wrote: Very much depends on the game I'm working on. If you're not sure about how the various directions work, they are, from what I know, all just stand-ins for numerical values, right? NORTH is equal to 1, SOUTH=2, WEST=4 and EAST=8, and the diagonals are then simply combinations of those. Although it's generally not difficult to convert between these and other ways of numbering directions (such as for lists), it would still be nifty if you could reassign these to other numerical values directly. |
In response to Leftley
|
|
If you're not sure about how the various directions work, they are, from what I know, all just stand-ins for numerical values, right? NORTH is equal to 1, SOUTH=2, WEST=4 and EAST=8, and the diagonals are then simply combinations of those. Although it's generally not difficult to convert between these and other ways of numbering directions (such as for lists), it would still be nifty if you could reassign these to other numerical values directly. Ah, I see. You can look at and modify stddef.dm for the constants, but that doesn't necessarily help you much, especially considering you're working on more than one game. |
In response to Leftley
|
|
Changing the NORTH, SOUTH, ... constants would not have any effect on the internal workings of BYOND. For example, atom/movable/var/dir would still show up with the same numerical values as it always has. I would not recommend changing the built-in constants. If you need to use some other angular coordinate, can't you just do that without worrying about the built-in system? By the way: turn() can be used to convert an angle (in degrees) into a cardinal direction. --Dan |
Not sure what you mean there...
I think I understand. As it stands, NORTH + EAST = NORTHEAST, but you want NORTHEAST to be != to NORTH + EAST, right?