ID:2023998
 
(See the best response by Nadrew.)
So I'm trying to compare location between my player and certain turf locations. I would assume that since I can do usr.client.mob.x and src.x that I would also be able to do [turfname].x or [fullpath].x However those do not work.
Best response
You'd use the locate() proc to grab the turf at the specified coordinates.

var/turf/my_turf = locate(x,y,z)
if(my_turf)
src << "Found [my_turf.name] at the specified location!"
else
src << "Odd, there's no turf there, probably invalid coordinates!"
Hmmm, how do I put icon states into that? Or would I just be better off putting if(icon_state=="n")?
What are you asking? Do you want to check the icon_state or set it?
I was wondering if it's possible to set the icon state, but going off on the first line. I'm somewhat wondering if I should name each of the tile that I use of a specific turf. Then have a loop through all of them to check if their location is left or right of the player. I already tried

if(outerwall.x>usr.client.mob.x)

but that doesn't seem to actually be working.
You can use get_dir() to determine the direction one thing is from another.

var/turf/my_turf = locate(x,y,z)
if(my_turf)
var/direction_to = get_dir(src,my_turf)
src << "[my_turf.name] is [dir2string(direction_to)] of you"

proc/dir2string(direction)
if(direction&NORTH) . += "north"
if(direction&SOUTH) . += "south"
if(direction&EAST) . += "east"
if(direction&WEST) . += "west"
Ah, and here I was thinking that something like get_step was going to be the thing for me. lol Awesome. Then I would need one more thing with this. I looked a bit, and I'm not sure. What I have in mind would be something where icon_size is set to half the character's height, and then probably have something similar where it would equal the room height. Reading the f1 source, it would seem that bound is what I need as opposed to something like step_size. So probably var/bound_width=bound_x(src,room_number)?
I looked a bit, and I'm not sure. What I have in mind would be something where icon_size is set to half the character's height, and then probably have something similar where it would equal the room height.

I'm not sure what you mean. What's your use-case?
Um, the bound var? So I guess imagine any Metroid handheld game. You go into a new room, there's a different set of height and width. Sometime there will only be an odd shape instead of a rectangular shape. What I'm trying to do with the bound would be either just set which side of the room the player is closer to or I suppose something else that escaped my mind for the moment.
I know what all of those words mean. Still no clue what you are asking, though.

As for odd shaped bounds, you can't do that. BYOND only supports bounding boxes.

If you are looking to detect whether someone is in a room, I'd suggest areas for that. They are much better suited to that.

Bounding boxes define the box that an individual object covers on the map. This is used for density calculations mostly. Rooms are not individual objects. They are a collection of tiles and objects, so it doesn't really make sense to make each room an individual object, but rather to define it as an abstract collection of objects and turfs... Which is exactly what /areas are.
Hmm, not a bad idea. I'll check it out when I wake up! As for the odd shaped bounds, I was imagining to treat it as a box that would be only partially used, if that make sense. Small boxes in a big box to stimulate the odd shape.
Nadrew I'm wondering, when you used the . after the direction conditional statements, does that mean the parent or base term being used? So I could used direction in place of .?
In response to Ash Abe Add
In this case . is the return value of the current proc.

When he does this "[dir2string(direction_to)]" that becomes the return value of dir2string().

For example, let's say this line occurs in dir2string():
if(direction&NORTH) . += "north"

The value that will be in "[dir2string(direction_to)]" will be "north".
I'm getting a proc definition is not allowed inside another proc on the conditional statement for checking which direction each of the direction_to var is at.
I don't have it finished yet, but another portion that will be working along side this is related to a turf/slopes/Entered(). I am trying to make Entered() loop until the pattern ends or the player exit. I would have figured that ..() might have worked or using a while(Entered()). However the only time that I get a result, the Entered() get spammed and the player spawn at the start instead of the desired location. I'm not sure why the player is spawning at the start though, but it keep spawning at the start as opposed to various locations.