Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

RMXP - Loading a Save File Using a Call Script

Greetings everyone! I was looking for some assistance for my game that is using a Continue Screen. If the player dies, it takes them to a Continue Screen (teleports the player to a separate map), which will automatically load the last save file for you. My problem comes from when I try to load the save file through a call script, it's interfering with some other custom scripts. It works fine if I load from the actual Load Screen, but I'm trying to just load the save file with a call script, similar to this:

Scene_Load.new.on_decision('Save1.rxdata')

I was wondering if anyone had an suggestions, thanks in advance!
 
You could just set a global variable in Scene_Load which tells you which slot was selected - then you can call it anywhere you want to load the correct file.
As for your load code, it looks fine to me. That is literally just Scene_Load without the interface, and there's no real way to get any closer considering it runs the same important stuff Scene_Load runs natively.
If custom scripts are causing a problem, try having a look at any aliases / rewrites (hopefully none of those) of Scene_Load, and see if they're doing anything important.
 
Thanks for the quick responses guys!

coyotecraft":1m9m5ofo said:
Won't the game need to remember which save slot its using? Maybe an auto-save file?
Or you could just go to the load screen and let the player choose.
Great questions. I'm using a global variable to determine which save slot it needs to load. I'm only using 3 total, but as soon as you select a save file, that's the same file it'll save over the entire game, ala Zelda. What I'm trying to do does work if I refer the player back to the load screen, but I wanted it to automatically load the file without taking the player back to the file select screen.

ZenVirZan":1m9m5ofo said:
You could just set a global variable in Scene_Load which tells you which slot was selected - then you can call it anywhere you want to load the correct file.
As for your load code, it looks fine to me. That is literally just Scene_Load without the interface, and there's no real way to get any closer considering it runs the same important stuff Scene_Load runs natively.
If custom scripts are causing a problem, try having a look at any aliases / rewrites (hopefully none of those) of Scene_Load, and see if they're doing anything important.
It's strange, because when I go through Scene_Load and the player actually selects the file to load, I don't get the same bugs I get when using my call script. The call script is interfering with a fotz's pixel-based movement script (won't load the caterpillar actors on reload) and is also giving issues w/ Heretic's compass script, both of which alias Scene_Load. When I use
Scene_Load.new.on_decision('Save1.rxdata')
does it access the stuff that's been aliased from other scripts? If not, is there a way around this?
 
I'm not sure.
I'll have a look if you include f0tz' script in a post.

Could you tell me what the exact problem with the compass script is? I have Heretic's compass just here and from what I can see, it should work perfectly fine.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top