At the create actor, (the tile actor), I have it set where it stores the X and Y and the animpos of the tile like so:
- Code: Select all
if(!load) {
animpos=creator.animpos;
cAnim[cloneindex]=animpos;
cX[cloneindex]=x;
cY[cloneindex]=y;
Created++;
}
if(load) {
x=cX[cloneindex];
y=cY[cloneindex];
}
Created represents how many are there for the load script. These variables are stored in "Save".
When I load, no tiles get created but when you go to place a tile, the tiles position stamps its self to the saved location. The script for loading is here:
- Code: Select all
int i;
loadVars("MapSave.map", "Save");
load=1;
for(i=0;i<Created;i++) {
ChangeAnimation("clone", "anims", STOPPED);
}
For some reason this doesn't create the actors. I haven't the tiniest clue why
EDIT
WOW lol I'm such a derp! This is what I get for not sleeping properly. I had ChangeAnimation.