Load a Save by common event RPGM-MV

Discussion in 'Javascript/Plugin Support' started by SoulSpark, Oct 3, 2019.

  1. SoulSpark

    SoulSpark Veteran Veteran

    Messages:
    45
    Likes Received:
    7
    First Language:
    English
    Primarily Uses:
    RMMV
    Somebody please haaalp!

    Firstly: I have an autosave slot in save slot 1 which saves the game every so often.

    Secondly: I would like to attach a keyboard button to a common event using yanfly's plugin (I already can do this) so that when I push the button, save file slot 1 will automatically load the saved game.

    I have searched the forums and found others ask the question about loading a save from a command and got answers but whenever I've tried to follow their instructions or copy and pasted their code I just get errors. I've tried many different things and I've lost hope. :(

    Could anyone here please paste me the code I need to write into a common event so that it loads save file 1 please? I'm no good at scripting at all but I didn't think it would be this hard to find the code just to load a saved game lol. :dizzy:

    I have tried StorageManager.loadFromLocalFile(1) which I found suggested somewhere else but this does not appear to do anything at all.
     
    Last edited: Oct 3, 2019
    #1
  2. Aloe Guvner

    Aloe Guvner Walrus Veteran

    Messages:
    1,626
    Likes Received:
    1,049
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    Loading can be complicated because it's slightly different if the player is on the same map or a different map than when they saved.

    I attempt to write how to do autoload in this snippet here.

    Try it and see if it works, if you have any issues try to post the error message or the situation here, and I'll try to suggest some tweaks.
     
    #2

Share This Page