How do I pop a common event menu back to main menu?

winkr7

Veteran
Veteran
Joined
Oct 27, 2015
Messages
54
Reaction score
10
First Language
english
Primarily Uses
N/A
Hello;

I am using yanfly's common event menu. It runs fine off the main menu using main menu core from yanfly. If I hit the escape key I want it to go back to the main menu like any other main menu selection. But when I hit escape it goes to the map. I think I have to pop back or something similar to scene push? How is this done?

thanks for your time
yours
Winkr7
 

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
14,661
Reaction score
8,092
First Language
English
Primarily Uses
RMMV

I've moved this thread to Plugin Support. Please be sure to post your threads in the correct forum next time. Thank you.

 

ozubon

surströmming?
Veteran
Joined
Oct 16, 2018
Messages
178
Reaction score
165
First Language
English
Primarily Uses
RMMV
Find this part of YEP_CommonEventMenu.js
it's the part that handles what happens on cancel
Code:
Scene_Base.prototype.onCommonEventMenuCancel = function() {
    this.closeCommonEventMenuWindows();
    var id = $gameSystem.getCommonEventMenuCancel();
    this.commonEventMenuSetupList(id);
};
And add this scene push as the last thing before the };
Code:
SceneManager.push(Scene_Menu);
And that should look like
Code:
Scene_Base.prototype.onCommonEventMenuCancel = function() {
    this.closeCommonEventMenuWindows();
    var id = $gameSystem.getCommonEventMenuCancel();
    this.commonEventMenuSetupList(id);
    SceneManager.push(Scene_Menu);
};
Did it work? :LZSproud:
 

winkr7

Veteran
Veteran
Joined
Oct 27, 2015
Messages
54
Reaction score
10
First Language
english
Primarily Uses
N/A
Thankyou ozubon;

I appreciate the help but didn't want to change the js code directly. If I set up a common event with
just the call SceneManager.push(Scene_Menu) and then reference that event with the plugin
SetCommonEventMenuCancel #ofevent
it work.

This always makes cancel return me to the main menu and I can hotkey the menu too. In that case I want to go to the map scene. I can't tell how I got there so I really want to do some kind of pop back to whereever I was. I think I need something like SceneManager.pop().

Anyway, your suggestion got me to thinking and I appreciate your help.

yours
Winkr7
 

Kuro DCupu

Trust me, I'm a veteran RMer
Veteran
Joined
Jul 6, 2014
Messages
386
Reaction score
1,293
First Language
Bahasa
Primarily Uses
RMMV
What about just directly open menu scene from the common event itself?
 

Fernyfer775

Veteran
Veteran
Joined
Oct 6, 2013
Messages
1,315
Reaction score
815
First Language
English
What about just directly open menu scene from the common event itself?
This is possible, but there's a small frame where you will see the common event close and the menu open again. It works, but it looks sloppy.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Kes
Came up with a good name for something. Checked on internet - device trademark filed in India 2017. Back to the drawing board.
I want to see the Features of the new RPG Maker.. NOW!!
Can't wait for it!
KDS
Check out some gameplay of a game iam working on :)
Me : "Wearing glasses is annoying."
*put out glasses*
Also me : "Keep mistaking 0, 6 and 8."
oh god, a new version of RPG Maker is coming soon already....

Forum statistics

Threads
98,126
Messages
949,495
Members
129,408
Latest member
songhuong
Top