ID:928829
 

area/Bank_Door
Enter(mob/O)
//save user coords here
O << "You have entered the bank"
O.loc = locate(5,5,2)
view() << "[O] has entered the bank"
return ..()


Alright, So I wanted to make a universal bank, where all the players could come and go. I wrote up this fairly simple enter proc (feel free to criticize)

My problem is , getting the player (O) back to the location they came from - Not all the same return location -

I need a refresher on temp saving players coords and then calling on them again to teleport the player back to them upon exiting.

Biggest problem for me is that the exit and enter are not going to be the same area (in the least) and I dont remember how to call something from another syntax...a little help?


mob/var/list/sendto=list(1,1,1)
mob/proc/Send_Back()
loc=locate(sendto[1],sendto[2],sendto[3])

Probaly a better way to do this.

But you would have to set a mob var as a list and set three co-ords into it(you can change it later by just using = list(1,2,3)). Then you use the list to find the location it refers to and send the player there.
I understand this , but I'm not sure if thats "exactly" what I was looking for.

arent x,y,z built in...if i'm not mistaken?




In response to Komuroto
getting the player (O) back to the location they came from - Not all the same return location -

I assumed that was your issue, you could make two seperate turfs, setting the location to the list uppon entering, then setting the list as the mob's location on the exit, resetting the sendto var. x,y,z are built in but you would have to set a variable one way or another to send them back where they entered from, unless you have a set location. In which I don't understand what the issue is.
I apologize, its just that I remember working with this before, and I was almost certain I had done it another way, or atleast a more in depth way- its just been so long.

More in-depth how?


I'm still not sure I fully understand your orriginal issue.