ID:266608
 
How do i make it so when a person steps on a tile they get teleported somewhere else
turf/dbzsucks
Enter()
usr << "you are so cool and are being taken to the ssj super kid zone!"
usr.loc = locate(x,y,z)//put your loc there
In response to Sariat
You could do that or you could:

turf/Teleporter
Entered()
usr<<"You are transported somewhere else!"
usr.loc=locate(x,y,z)

This way or Sariat's way ,either way works, lol.
In response to Loduwijk
Loduwijk wrote:
You could do that or you could:

turf/Teleporter
Entered()
usr<<"You are transported somewhere else!"
usr.loc=locate(x,y,z)

This way or Sariat's way ,either way works, lol.

You should not be using usr anywhere near Enter(),Entered(),Exit() and Exited(). Also, Enter() is not appropriate in this case since it is called when something tries to enter that turf not after it has already done so.

turf/Teleporter
Entered(atom/A)
if(!ismob(A))return 0
var/mob/M = A
M<<"You are transported somewhere else!"
M.loc=locate(x,y,z)


In response to tenkuu
Actually Enter() would be the choice, Entered() would teleport them after they Enter() and Exit() the turf.
In response to Nadrew
Nadrew wrote:
Actually Enter() would be the choice, Entered() would teleport them after they Enter() and Exit() the turf.

Entered() is called immediately after an atom successfully Enter()s a turf. It has nothing to do with Exit().
In response to Shadowdarke
Oh. I always figured it was called after the turf was Exit()ed and Enter()ed, thanks for the enlightenment.