I Wanna Community
Fangames => Game Design => Programming Questions => Topic started by: MatthewRPG on March 28, 2015, 09:57:30 AM
-
It appears as if every single time I press 'R' in my fangame, I reset to where the "playerStart" object is, no matter where I saved. (in the first room, at least.)
"playerStart"'s "Room Start" Code:
if(!instance_exists(player)){
instance_create(x+17,y+23,player);
}
Which I did not change in the slightest. So I honestly have no idea what's going on.
-
That's the same code that I have for my playerStart object, it sounds like the problem is that the room keeps restarting instead of just the game. Look in the world's Press R event and tell me what is in there.
-
That's the same code that I have for my playerStart object, it sounds like the problem is that the room keeps restarting instead of just the game. Look in the world's Press R event and tell me what is in there.
if(room != rInit && room != rMatthewRPG && room != rTitle){
sound_stop_all();
loadGame();
}
"rMatthewRPG" is the intro screen, by the by.
Oh, and I'm using Minwa engine, in case you were wondering.
-
What's in your loadGame script?
-
What's in your loadGame script?
var f;
if !instance_exists(player){
instance_create(0,0,player);
}
f = file_bin_open("temp",1);
file_bin_write_byte(f,global.savenum);
file_bin_close(f);
saveExe();
tempExe();
-
And in your tempExe script?
-
And in your tempExe script?
var f;
f = file_bin_open("temp",0);
global.savenum = file_bin_read_byte(f);
file_bin_close(f);
saveExe();
(Sorry for the late response, internet kinda died.)
-
Okay. For whatever reason, the Player object was not persistent. The problem is now resolved. Sorry for wasting your time. :FailFish: