ID:175987
 
Quick question, When certain Procs of mine are called, how could i save the location of all player mobs, Send them all to a new place, then after say 5 seconds, send them all back to where they were?

all help will be appreciated

ETG
give em a var called last loc and then move em bak like..
mob/var/lastloc
proc/teleportall()
for(var/mob/M in world)
M.lastloc = M.loc
M.loc = locate(0,0,0)
then jsut teleport them back to their lastloc later
Just store the location in a temporary variable and return it later.

mob/proc/ThereAndBackAgain(turf/where, timer)
var/old_loc = loc
loc = where
spawn(timer) loc = old_loc
In response to Shadowdarke
But, I want to "save" the Old_location of each mob, then move them to another place, then return them to there old location, possibly a save file, that saves their old location then loads that info and relocates the people, I dont know if this is a good system, but every mob will be in different locations, and i want them all to go to the same place then after 5 seconds return to their each individual location.

mob/proc/ThereAndBackAgain(turf/where, timer)
var/old_loc = loc
loc = where
spawn(timer) loc = old_loc
would this do the job?
and what would i substitute Timer and where with? because where isnt a specific turf.

ETG
In response to Erdrickthegreat2
I want to "save" the Old_location of each mob, then move them to another place, then return them to there old location, possibly a save file, that saves their old location then loads that info and relocates the people, I dont know if this is a good system, but every mob will be in different locations, and i want them all to go to the same place then after 5 seconds return to their each individual location.

Could i save it to a var? I mean would the var live long enough to save each location i was thinking var/old_loc = Locate(src.x,src.y,src.z) or something along those lines.

ETG