ID:159010
 
Hello again. I am trying to make a teleport system. Here is what i need to do:

user is in front of a portal. user steps on portal. user goes to wherever.

What i am trying to do is to find out when the user has stepped on the portal, and then teleport him to the desired location.
I'm not quite sure what you're asking but the locate() proc takes x, y, and z coordinates as parameters and returns the turf at that location.

var/turf/cornerTurf = locate(1,1,1) //cornerTurf is set to the turf at 1,1,1; the bottom left turf of the 'first' map.


Still, though, I'm not sure if I answered your question since you're acting as though the player has already moved and you're wanting some AI to find them. Possibly you already know about locate() from your unclear, "I already know how to move unit's."
In response to Vermolius
Sorry. Yes, i know how to use locate. Heres what i really meant:

user is in front of a portal. user steps on portal. user goes to wherever.

What i am trying to do is to find out when the user has stepped on the portal, and then teleport him to the desired location.
In response to Neos300
locate() the player somewhere on turf/Entered().
In response to Mysame
thank you
In response to Mysame
I am not quite sure what you mean. Where do i put the entered code? i put it under mob but it's not working for me.
In response to Neos300
The turf in question that teleports you is the one you're entering.
The mob is the one getting on the turf.

turf/Entered(mob/M).

But really, you have an awful lot of questions, why don't you take a look at this.
In response to Mysame
I did read that. Thanks for the tip.