Indie Dev

Hello Guest!. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, sell your games, upload content, as well as connect with other members through your own private inbox!

Some Script commands Help please

Axel

Villager
Xy$
0.00
Hey guys, I was trying to create a menu where an event "askes" the system if there is any saved game using this command:

DataManager.isAnySavefileExists()

assigned to a variable called Save_Exists.

Then I call Save_Exists value to create a conditional derivation.

But when the game tries to do it it shows me this error

dadsad.png

How do I fix it??


Other Question--- How do I tell the system to show a Game Load Screen and an Options Window, both from a respective event???

I publish this here because I think a tutorial about this kind of commands/Scripts could be pretty useful.
 

Boy Who Codes

Praised Adventurer
Xy$
0.00
Reason why the first problem happens is because you're calling a non-public / accessible variable. Do something like this:

(In a new plugin)

JavaScript:
var _Game_System_initialize = Game_System.prototype.initialize;
Game_System.prototype.initialize = function() {
    _Game_System_initialize.call(this);
    this.saveExist = DataManager.isAnySavefileExists();
}

Game_Interpreter.prototype.saveExist = function() {
    return $gameSystem.saveExist;
}
You can now push a conditional event like this:



For your second question, you can do load screen with a script call like this:

SceneManager.push(Scene_Load);

SceneManager.push(Scene_Options);
 

Axel

Villager
Xy$
0.00
Reason why the first problem happens is because you're calling a non-public / accessible variable. Do something like this:

(In a new plugin)

JavaScript:
var _Game_System_initialize = Game_System.prototype.initialize;
Game_System.prototype.initialize = function() {
    _Game_System_initialize.call(this);
    this.saveExist = DataManager.isAnySavefileExists();
}

Game_Interpreter.prototype.saveExist = function() {
    return $gameSystem.saveExist;
}
You can now push a conditional event like this:



For your second question, you can do load screen with a script call like this:

SceneManager.push(Scene_Load);

SceneManager.push(Scene_Options);

Thanks Soul. I'm going to try it.
[doublepost=1472931233,1472929920][/doublepost]
Reason why the first problem happens is because you're calling a non-public / accessible variable. Do something like this:

(In a new plugin)

JavaScript:
var _Game_System_initialize = Game_System.prototype.initialize;
Game_System.prototype.initialize = function() {
    _Game_System_initialize.call(this);
    this.saveExist = DataManager.isAnySavefileExists();
}

Game_Interpreter.prototype.saveExist = function() {
    return $gameSystem.saveExist;
}
You can now push a conditional event like this:

Man it's not working. Same error :( .

dadsad.png event.PNG plug.PNG plugs.PNG

My RPG MAKER is in spanish 'cause that's my natal language.
[doublepost=1472956372][/doublepost]HEY!! ITS VERSION 1.2 NOT 1.3.... WHEN I GET 1.3 IN SPANISH I'LL UPDATE MY RPG MAKER... MAYBE THAT'S THE PROBLEM
[doublepost=1472956468][/doublepost]The other 2 scripts (Scene_Load and Scene_Options) are working perfectly in other project I made to test them
[doublepost=1473091330][/doublepost]@Soul hey man could you help me?? its just what I need to update the game and have some other bugs fixed.
 

LTN Games

Master Mind
Resource Team
Xy$
0.01
You could probably skip the Game_Interperter function you've created and simply use $gameSystem.saveExist; Unless there is another issue present, because even the Game_Interperter function you created should work find. Could you show the console log?
 

Axel

Villager
Xy$
0.00
You could probably skip the Game_Interperter function you've created and simply use $gameSystem.saveExist; Unless there is another issue present, because even the Game_Interperter function you created should work find. Could you show the console log?
@LTN Games how do I do that??

could you point where the "Game_Interperter" is??
[doublepost=1473128941,1473126018][/doublepost]Here is the Error LOg... i thinkproblem.png
 

LTN Games

Master Mind
Resource Team
Xy$
0.01
Okay just heading off to bed now but that error is coming from hime works choice display mode plugin you should update that plugin to get it working again. Though you should test it first by turning it off.
 

Axel

Villager
Xy$
0.00
Okay just heading off to bed now but that error is coming from hime works choice display mode plugin you should update that plugin to get it working again. Though you should test it first by turning it off.
SOLVED!!!!!!!!! I JUST HAD TO INSERT A MENSSAGE BECAUSE THE "SHOW OPTION" EVENT WASN'T "FINDING" WHERE TO SHOW THE OPTIONS
 

LTN Games

Master Mind
Resource Team
Xy$
0.01
If you update the plugin you won't have to worry about that anymore, your still using the very first release of that plugin which is also incompatible with MV 1.3. Glad you got it working though, cheers.
 
Top