ID:933804
 
Problem description: Is there a way to have it automatically save all mob variables? I don't want to take the time to invidually tell it write every single mob variable.

Write() (Which is called when you send a mob to a savefile) automatically writes all variables. The exceptions are:

tmp variables - these are never saved.
const variables - these never change from their default value, so they aren't saved.
And any variable that hasn't changed from it's default value. For example:
mob
var
_x = 1
_y = 2

If _x doesn't change from the default value (1) or from the value assigned by Read(), it won't be saved.

static variables I'm not sure about.
Thanks very much. I assume that x,y,and z cooridnates are temp variables. Now how would I tell it to save it? would I just do like F["last_x"] << src.x
Yes. And when you access the savefile for loading, just do:
F["last_x"] >> src.x
In response to Albro1 (#3)
If you're loading from a null location, you'll need to set the loc, not the individual variables. What I've done in my most recent project is save a list:
 
var pos[] = list(x, y, z)
s["saved_loc"] << pos

//and to load,
var pos[]
s["saved_loc"] >> pos
loc = locate(pos[1], pos[2], pos[3])
// would be nice to use arglist, but
// it doesn't play nice with built-in procedures