Window_MenuCommand example?

Joined
Jun 30, 2017
Messages
40
Reaction score
30
First Language
spanish
Primarily Uses
RMMV
Can someone show a source example about how to make a new scene with a list of choices?
I am not getting how to use Window_MenuCommand to create my own menu/callbacks.
 

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
1,705
Reaction score
562
First Language
Dutch
Primarily Uses
RMMV
check the rpg_scene file, its in there, but you also need window_base where also is something in it.
in case you want to alter the names on the menu list alone, maybe check YEP_MainMenuManager
and add stuff you want.

EDIT:
in rpg_scenes, you can find this line:
Scene_Menu.prototype.createCommandWindow = function()

thats where the menu command is written down,

this._commandWindow.setHandler('item', this.commandItem.bind(this));

that line is the command window, sethandler, "item" is the name in the menu
while "this.commandItem.bind(this)" is a function of :

Scene_Menu.prototype.commandItem = function() {
to tell what is happening.

but creating a menu isn't easy unless you know what you are doing.
 
Last edited:

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
2,931
Reaction score
3,959
First Language
English
Primarily Uses
RMMV

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

 

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

Latest Profile Posts

A mousefolk sprite I made, I think I did good.
Discovering math. functions for damage formulas was one of the greatest things for me.
It's very useful for balancing skills to work in a variety of possible circumstances.
For example if you have a skill that is supposed to work for both mages and warriors:
Code:
Math.max(a.atk * 2 - b.def, a.mat * 2 - b.mdf)
SpaceX: First-ever successful (manned) commercial spaceflight!! In these terrible and self-sabotaging times for the world, that's a ray of excitement and hope I needed badly.
GameDevJohn wrote on whtdragon's profile.
Hey I used you bunny and cat spritesheet for a game jam game. Thanks so much! You have really beautiful stuff here. I'll credit you at https://gamedevjohn.itch.io/bunny-boy

Forum statistics

Threads
98,018
Messages
948,575
Members
129,276
Latest member
abhikhurana
Top