MV Horizontal Command Window Not Activating

Hey folks,

So i'm having a bit of trouble configuring my command windows.

I can get the window to appear with the commands and an outline, but I can't get it to activate to be able to select through the command options.

Perhaps I'm doing something wrong?

Here is what I have.

Levels_Menu.prototype.create = function() { Scene_Base.prototype.create.call(this); this.createBackground(); this._titleWindow = new Title_Window(0, 0, Graphics.boxWidth, Graphics.boxHeight / 8); this.addChild(this._titleWindow); this._skillWindow = new Skills_Category(0, Graphics.boxHeight / 7); this._skillWindow.activate(); this._skillWindow.setHandler('command1', this.command1.bind(this)); this._skillWindow.setHandler('command2', this.command2.bind(this)); this._skillWindow.setHandler('command3', this.command3.bind(this)); this.addChild(this._skillWindow); }
I think we need to see more of your code. It's a little unusual to activate a window within the function that is creating a window. Typically, a scene will create a bunch of windows and then activate them through other functions based on context.

Also, ._skillWindow is a term used by the default engine in various scenes, so its activation state may be being overridden by default code.

I would suggest updating your post with some details explaining what you are trying to accomplish. It's difficult to make suggestions with only a single function as the context.
I think we need to see more of your code. It's a little unusual to activate a window within the function that is creating a window. Typically, a scene will create a bunch of windows and then activate them through other functions based on context.

Also, ._skillWindow is a term used by the default engine in various scenes, so its activation state may be being overridden by default code.

I would suggest updating your post with some details explaining what you are trying to accomplish. It's difficult to make suggestions with only a single function as the context.
Yes, that's fair.

Here is the entirety of the code for the Scene_Menu.

Input.keyMapper["83"] = "skillsMenu"; _alias_scene_map_update = Scene_Map.prototype.update; Scene_Map.prototype.update = function() { _alias_scene_map_update.call(this); if(Input.isTriggered("skillsMenu")) SceneManager.push(Levels_Menu); } function Levels_Menu() { this.initialize.apply(this, arguments); } Levels_Menu.prototype = Object.create(Scene_Base.prototype); Levels_Menu.prototype.constructor = Levels_Menu; Levels_Menu.prototype.initialize = function() { Scene_Base.prototype.initialize.call(this); }; Levels_Menu.prototype.create = function() { Scene_Base.prototype.create.call(this); this.createBackground(); this._titleWindow = new Title_Window(0, 0, Graphics.boxWidth, Graphics.boxHeight / 8); this.addChild(this._titleWindow); this._skillWindow = new Skills_Category(0, Graphics.boxHeight / 7); this._skillWindow.activate(); this._skillWindow.setHandler('command1', this.command1.bind(this)); this._skillWindow.setHandler('command2', this.command2.bind(this)); this._skillWindow.setHandler('command3', this.command3.bind(this)); this.addChild(this._skillWindow); } Levels_Menu.prototype.createBackground = function() { this._backgroundSprite = new Sprite(); this._backgroundSprite.bitmap = SceneManager.backgroundBitmap(); this.addChild(this._backgroundSprite); } Levels_Menu.prototype.update = function() { if(!this.drawnWindows) { this._titleWindow.drawTitle(); this.drawnWindows = true; } if(Input.isTriggered("escape")) SceneManager.push(Scene_Map); } Levels_Menu.prototype.command1 = function() { return; } Levels_Menu.prototype.command2 = function() { return; } Levels_Menu.prototype.command3 = function() { return; } Levels_Menu.prototype.cancel = function() { SceneManager.push(Scene_Map); } function Title_Window() { this.initialize.apply(this, arguments); } Title_Window.prototype = Object.create(Window_Base.prototype); Title_Window.prototype.constructor = Title_Window; Title_Window.prototype.initialize = function(x, y, width, height) { Window_Base.prototype.initialize.call(this, x, y, width, height) this.drawTitle(); } Title_Window.prototype.drawTitle = function() { this.contents.clear(); this.drawText("Gathering Levels", 0, 0, 500, 'right'); } function Skills_Category() { this.initialize.apply(this, arguments); } Skills_Category.prototype = Object.create(Window_HorzCommand.prototype); Skills_Category.prototype.constructor = Skills_Category; Skills_Category.prototype.initialize = function(x, y) { Window_HorzCommand.prototype.initialize.call(this, x, y); } Skills_Category.prototype.windowWidth = function() { return Graphics.boxWidth; }; Skills_Category.prototype.update = function(){ Window_HorzCommand.prototype.update.call(this); } Skills_Category.prototype.makeCommandList = function() { var parameters = PluginManager.parameters("NSS-Gathering_System"); var action1Name = String(parameters['Action 1 Name']); var action2Name = String(parameters['Action 2 Name']); var action3Name = String(parameters['Action 3 Name']); this.addCommand(action1Name, "command1"); this.addCommand(action2Name, "command2"); this.addCommand(action3Name, "command3"); }

Essentially all I want to do is be able to go between the 3 commands and select one to open an additional window with infomation.
Can you add some screenshots? Any additional context would help.

Your command functions currently do nothing:

JavaScript:
    Levels_Menu.prototype.command1 = function() {
        return;
    }
    Levels_Menu.prototype.command2 = function() {
        return;
    }
    Levels_Menu.prototype.command3 = function() {
        return;
    }

But your original post makes it sound like you're just having trouble getting the command window to actually activate. However, your code doesn't include any reference to a command window.

So, again... What are you actually trying to accomplish here?
Okay, after work I will rewrite it to have more detail and add the explanations of what I would like it to do.
JavaScript:
    Levels_Menu.prototype.update = function() {
        if(!this.drawnWindows) {
            this._titleWindow.drawTitle();
            this.drawnWindows = true;
        }
        if(Input.isTriggered("escape")) SceneManager.push(Scene_Map);
    }

It looks to me like when you made the "update()" function of the scene you never re-implemented the original functionality of Scene_Base or called the original version from the Scene_Base prototype.

Scene_Base's update() function is what is used to update all the children of the object - in this case, the Windows that are attached to it.

Needless to say, if you're not updating your Windows you're not going to see any movement from them whatsoever.
So I've spent the past day or so racking my brain to try and figure out a way to explain what I'm trying to do.

Ideally I would like it set up like an encyclopedia of sorts. You select a command and the display window shows your current level in the skill, how much exp you have as well as how much you need for the next level, or the chance to get the next level depending on what option you select, and various info about the skill.

I've tried building up the commands portions but I'm stuck on how to actually implement that info.

Ideally a scrollable window but for now just a window with said information in it.

As for the command window I have that declared as Skills-Category function.

Seems to be I'm missing a step somewhere. I've adjusted the activation of the horzCommand window to be in the update function of the entire script.

That still doesn't seem to be working. I will post the code itself with some screen shots when I get home from work.

Original thread: https://forums.rpgmakerweb.com/threads/horizontal-command-window-not-activating.134697/