[RMXP] How to call the load menu with scripts

Status
Not open for further replies.

NardBruh

Villager
Member
Joined
Jun 2, 2021
Messages
12
Reaction score
0
First Language
Portuguese
Primarily Uses
Other
Title is self explanatory, how can I call the load menu using a script call in a event, in a similar way to SceneManager.push from RPG Maker MV and such?
 

KK20

Just some XP Scripter
Veteran
Joined
Oct 11, 2018
Messages
372
Reaction score
144
First Language
English
Primarily Uses
RMXP
The default load scene is only meant to be accessible from the title screen. You'll have to make a couple changes for it to be used from the map.

Make the following edits to the Scene_Load script
Code:
  def initialize(from_map = false)
    @from_map = from_map
    # Remake temporary object
    $game_temp = Game_Temp.new
    # Timestamp selects new file
    $game_temp.last_file_index = 0
    latest_time = Time.at(0)
    for i in 0..3
      filename = make_filename(i)
      if FileTest.exist?(filename)
        file = File.open(filename, "r")
        if file.mtime > latest_time
          latest_time = file.mtime
          $game_temp.last_file_index = i
        end
        file.close
      end
    end
    super("Which file would you like to load?")
  end
Code:
  def on_cancel
    # Play cancel SE
    $game_system.se_play($data_system.cancel_se)
    # Switch to title screen
    $scene = @from_map ? Scene_Map.new : Scene_Title.new
  end
Then you should be able to call it via
Code:
$scene = Scene_Load.new(true)
That 'true' bit is absolutely required.
 

NardBruh

Villager
Member
Joined
Jun 2, 2021
Messages
12
Reaction score
0
First Language
Portuguese
Primarily Uses
Other
Oh my! Thank you so much, it works perfectly!
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
8,748
Reaction score
5,767
First Language
Dutch
Primarily Uses
RMXP

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Latest Threads

Latest Profile Posts

Why keyboards don't sleep? Because they have two shifts.
I realized a while ago my game was toooo big in scope. even now I wonder am I trying to do too much by myself. and that's after completely changing the format of the game.
Last week at SLC. Cali awaits. TBH I love SLC more than SF.
Back home now. I had a good time, but I had a checkup this morning so I had to come home for that. Now I'm just waiting for my therapist meeting tomorrow...
Decided to work on Wishful Wanda today. Since it's a BFB spinoff game, I decided to make the Huang brothers
Easter eggs! I'm actually pitching this to the BFDI team, btw.
I'm a bit perturbed that my two week project in a different engine is already shaping up to be far better than anything I've done in this one. It really calls into question my future plans. :kaoswt:

I guess I'll release whatever patches I made for Poppet Quest, then abandon it for my new project. I mean unless it somehow wins (I doubt it but hey sure). I'm not sure about And Remember Tomorrow.

Forum statistics

Threads
113,932
Messages
1,078,509
Members
148,041
Latest member
FernanPro312
Top