ID:155868
 
It recently came to my attention that, for a project I'm developing with a friend, we require a code that moves players who step onto a certain tile to be moved a tile or two over/up. Now, I've created a diagram of what I'm trying to explain.

http://oi53.tinypic.com/9s8mk1.jpg

Player One needs to move from Point A, the red circle, up the stairs to point B, the blue circle. My knowledge of coding is very, very basic, so I was wondering if there was a way to make it so that the player can move to point B simply by moving into the stairs. I don't really want to resort something that looks like a teleport but I will if needed, however I'd still love for anybody kind enough to make a code to make it so that it looks as if the player is progressing up the stairs. Thank you.
Why can't the player just walk up the steps?
In response to Moussiffer
The second tier that the steps lead to are facing east/west, and are at least a tile "above" the player when he walks into the actual stair icons.
This isn't perfect, but it should give you an idea of where to start. Descending stairs are high on the left side and low on the right, and ascending stairs are the opposite of that.

The most useful proc for what you want to do is the turf/Entered() proc. It gets called once an object successfully moves into a turf. So a player successfully moves onto a stairs turf, Entered() checks to see where they should go next, and then it moves them there.

This example has stairs turfs placed along a 45 degree diagonal line, going from top-left to bottom-right.

turf
stairs
icon = 'stairs.dmi'
descending
icon_state = "stairs_descending"

Entered(atom/movable/A, atom/OldLoc)

var/turf/OldTurf

if(isturf(OldLoc))
OldTurf = OldLoc
else
return // didn't move here from somewhere on the map

var/todir
var/fromdir = get_dir(src, OldTurf) // what direction did the object come from?

// object came from the left or directly above us
if(fromdir in list(SOUTHWEST, WEST, NORTHWEST, NORTH))
todir = SOUTHEAST // so go down the stairs
// object came from the right or directly below us
else if(fromdir in list(SOUTHEAST, EAST, NORTHEAST, SOUTH))
todir = NORTHWEST // so go up the stairs
else return

// find the turf in the direction we want the object to go to
var/turf/NextTurf = get_step(src, todir)
// If the next turf diagonally is not part of this set of stairs,
// then choose the turf directly to the left/right instead
if(!istype(NextTurf, /turf/stairs/descending))
NextTurf = get_step(src, todir&(EAST|WEST))

spawn(3) // delay movement so that going up/down stairs is visible
/* you'll want to put some kind of movement-restriction code here
otherwise the player/object could move on its own, even teleport somewhere else
while on the stairs, and then be moved back once this code gets run */

if(A.loc == src) // make sure player hasn't moved
A.Move(NextTurf) // move the object to the next location