ID:149669
 
Im making a random combat code for one player and i have every thing done but one thing, thats when they enter into the battle. I cant seem to get the usrs location to be saved
so when the battle is over i can load it and he goes back there
if you need me to post the code please ask
Thanx
did you check in the demos, tutorials, and libraries section of the site. I always go there before I post.
That's easy enough, just give the mob that's moving three new variables, oldx, oldy, and oldz. Then, right before you move them to the new location, do this:

oldx = x
oldy = y
oldz = z

Then, when you are through and want to move them back to their previous location, just relocate them to their saved location like this:

loc = locate(oldx,oldy,oldz)