Aaaand I can't get the load function to work and I'm not sure what I'm accidentally leaving out. I have the quit from the game over screen working but the load is being elusive. 😠 There are save files to choose from so it's not a lack of those. I've tried it without the close command in the scene load but that made no difference (not sure if it really would have but I figured it was worth a shot). 😢
Trying to get load on gameover script to work [ace]
RGSSx Script SupportThis is how I did mine, maybe you can take it as a reference
Code:
class Window_EDGameover < Window_Command
def initialize
super(0,0)
update_pos
set_handlers
self.openness = 0
open
end
def update_pos
self.x = (Graphics.width - width) / 2
self.y = (Graphics.height * 1.6 - height) / 2
end
def set_handlers
set_handler(:title, method(:to_title))
set_handler(:load, method(:to_load))
end
def make_command_list
add_command("To title", :title)
add_command("Load Game", :load, !$game_system.save_disabled)
end
def to_title
SceneManager.goto(Scene_Title)
end
def to_load
SceneManager.call(Scene_Load)
end
end
class Scene_Gameover
alias ed_start_go start
def start
ed_start_go
@window = Window_EDGameover.new
end
def play_gameover_music
RPG::BGS.stop
RPG::BGM.new("rmid-selow",100,110).play #<-- gameover BGM. You can ignore this
end
def update
super
end
end
Moved to: RGSSx Script Support
Woops, sorry Kes. Thought I had it in the right place. 😩
Aside from a different way to call the command window I don't really see what I'm doing wrong... If it has SceneManager.call(scene_load) attached to te load command it should open right? 😅Or can I not use the continue thing and have to rename it in the script for it to work, since I still just used the command continue.😐
Aside from a different way to call the command window I don't really see what I'm doing wrong... If it has SceneManager.call(scene_load) attached to te load command it should open right? 😅Or can I not use the continue thing and have to rename it in the script for it to work, since I still just used the command continue.😐
You forgot to overwrite the def update
You gave the continue command a wrong handler symbol.
It should be:
And yeah, the scene's update method will cause the scene to go to the title scene if the confirm key is pressed, so you should overwrite the update method to prevent that from happening (if it even happens, the window command triggers should happen before that line, so it might not even trigger).
Btw, why is it easier to upload 2 different pictures than copy/paste the code lines instead? 😀
It should be:
Code:
add_command(Vocab::continue,:continue)
And yeah, the scene's update method will cause the scene to go to the title scene if the confirm key is pressed, so you should overwrite the update method to prevent that from happening (if it even happens, the window command triggers should happen before that line, so it might not even trigger).
Btw, why is it easier to upload 2 different pictures than copy/paste the code lines instead? 😀
Thank you Sixth for the newb friendly explanation. 😢Aaaaaand I may have not been able to figure out how to post the code without it taking up the whole post when I made this thread... 😅
Thank you both so much for the help, now it works! 👋
Thank you both so much for the help, now it works! 👋
Original thread: https://forums.rpgmakerweb.com/threads/trying-to-get-load-on-gameover-script-to-work-ace.90669/