Load/Return to Main Menu on 'Show Choices' event

Alipheese

Warper
Member
Joined
Aug 12, 2014
Messages
3
Reaction score
0
First Language
English
Primarily Uses
Hello and good day! I am fairly new to RPGMaker VX Ace, especially scripts. Right now I am making a short, decision-based game and I would like to ask some help in regards to the script used for loading and returning to the main menu.

What I want to do is, when the player 'dies', he/she doesn't get a game over screen and instead, they'll be greeted by the 'Show Choices' event. They can then choose to load a saved file or return to the main menu. I have tried searching for scripts similar to this but most of the scripts I found involved battles. I tried to fiddle around from a Game Over script by a guy named regendo on a different forum.

Edit: Since Hudell has been a big help, the only problem I have now is when players press X (cancel) when they are choosing a save file to load. I can't seem to figure out what script to use for it.

@>Show Choices: Load Game, Main Menu : When [Load Game]   @>Script: SceneManager.call(Scene_Load)   @> : When [Main Menu]   @>Script: SceneManager.goto(Scene_Title) : Branch EndEdit 2: Since my post hasn't been approved yet, thanks again Hudell. I tried to do a little bit of thinking and changed .call(Scene_Load) to goto(Scene_Title) and it worked fine for the other option. It may be little, but I'm kind of happy since I have no knowledge of this whatsoever. The only problem I have now is when players try to cancel after pressing 'Load Game'.
 
Last edited by a moderator:

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,545
Reaction score
3,715
First Language
Java's Crypt
Primarily Uses
RMMZ
When you call SceneManager.goto, you're replacing the current scene (Map) with the load scene, when you press the cancel button, the game will close because there's no more scenes open.

You could call this instead, it does the same thing but it won't close the map scene.

SceneManager.call(Scene_Load)
I'm not sure this won't cause another problem when you try to actually quit the game, I'll give it a try once I get home.
 

Alipheese

Warper
Member
Joined
Aug 12, 2014
Messages
3
Reaction score
0
First Language
English
Primarily Uses
When you call SceneManager.goto, you're replacing the current scene (Map) with the load scene, when you press the cancel button, the game will close because there's no more scenes open.

You could call this instead, it does the same thing but it won't close the map scene.

SceneManager.call(Scene_Load)I'm not sure this won't cause another problem when you try to actually quit the game, I'll give it a try once I get home.
Oh I see. Thank you very much Hudell, I'll take note of that.

Pressing the cancel button doesn't close the game anymore when I replaced 'goto' with 'call' as you told me. However, is there any way for it to go back to the 'Show Choices' event when the player presses the cancel button? They become stuck on the 'dead' screen and is unable to move if they cancel loading a save file (or we could just make them unable to cancel once they press load).

I've tried reading stuff up and make a script on my own for it but I know it just wouldn't work.

Code:
SceneManager.call(Scene_Load)Input.press?(:X)params = []choices = []choices.push("Load")choices.push("Main Menu")params.push(choices)params.push(1)setup_choices(params)
 

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,545
Reaction score
3,715
First Language
Java's Crypt
Primarily Uses
RMMZ
the "show choices" event is a parallel process? if it is, it should run again when the player comes back from the load screen.
 

Alipheese

Warper
Member
Joined
Aug 12, 2014
Messages
3
Reaction score
0
First Language
English
Primarily Uses
the "show choices" event is a parallel process? if it is, it should run again when the player comes back from the load screen.
Ah, you were right! I tried that before and it didn't work so I checked it again. Turns out I just have to make a separate event page for the 'Show Choices' event.

Thank you again so much Hudell for helping me solve all these problems.

Moderators, feel free to close this thread whenever.
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,864
Messages
1,017,056
Members
137,573
Latest member
nikisknight
Top