MZ Custom Menu Event (Visustella Main Menu Core)

Good morning, people who live in my computer. As you might have guessed, I'm trying to figure out how to run a simple common event from a custom button in the main menu. I'm using Visustella's Main Menu Core but I'm not sure how to make it do what I want it to do.

I added a button to the main menu (easy) by changing the commonEvent1 button JS: Show from return false to return true. I then renamed it. What I want it to do is to close the menu and show a simple text window when selected. I created a Common Event with the appropriate text window, and entered the ID of that event into JS: Run Code with the following string:

Code:
SceneManager._scene.commandCommonEvent(125);

None of the other lines in the plugin menu have been changed. Sadly, this does not seem to work, as when the new menu button is selected it simply closes the main menu without any further action. (Well, there is a momentary dip in FPS and the autosave goes off).

So, in summary, I want a button on the main menu to display a simple text box when selected and I'm not sure what to do.

Thanks in advance, now I'm going to finish this delicious muffin. Sadly, I do not have enough muffins to share with the class.
Heya! I just tested out what you described, and I think I was able to recreate what you were going for? So maybe something isn't configured right in your parameters? =0

I just used the "commonEvent1" spot that was already provided in the Main Menu Core, changed the STR: Text field so that the menu button would be named "Test", changed the JS: Show field to "return true;" and that was it! Then I set up my Common Event 1 to have the text box, and it all worked as intended! So maybe try comparing your parameters to the ones in my screenshot. ^^

In your case, if you were setting this for Common Event 125, you would also want to change the JS: Ext parameter to "return 125;". The 125 isn't required to be in the actual JS: Run Code. =)

If that's not it, then it might be a problem in the way your Common Event is set up, or it might be a plugin conflict somewhere.....

parameters.PNG common event.PNGmenu.PNG text box.PNG
Haha! Yes!

I said "It worked!" too loud and startled my dogs. I had the number of the Common Event in the JS: Run Code and not the JS: Ext.

Thank you very much, now I can add a helpful help window to the game. Treat yourself to a muffin next time you can, you have my permission.
Hooray! Glad I could be of assistance. 🙂
Hi!
Tryin' to do the same, but got a "SceneManager._scene.commandCommonEvent is not a function" error message. Does the event page need to be configured in any way? Mine only contains some scrolling text and a "Back to main title" command at the end.

@Fufi_Saintz, please refrain from necro-posting in a thread. Necro-posting is posting in a thread that has not had posting activity in over 30 days. You can review our forum rules here. Thank you.


Please make a new thread instead.

Original thread: https://forums.rpgmakerweb.com/threads/custom-menu-event-visustella-main-menu-core.160800/