Modifying this script to suit my needs but I ran into an issue, I originally took information from this thread.
This was a good start, but doesn't really work for what I need because once the 3 party members are set the rows are locked and can't be adjusted again, so I instead play the buzzer at 4 instead of 3. Works great, except, now you can leave the menu with 2/4 or 4/2, but I want to lock it to 3/3. So on line 2465 I added:
I also changed the handler from popping the scene to calling this function on line 2461:
The scene pops if 3/3 is set, but freezes the game if 2/4 or 4/2 is set. There's no update function in this scene, so I added:
Still freezes. Okay... Maybe the window is the issue because it has no update function? So I added:
Still freezes. Not sure where to go from here? In my custom menus I've been making, calling the original update function has solved this problem. Any ideas?
This was a good start, but doesn't really work for what I need because once the 3 party members are set the rows are locked and can't be adjusted again, so I instead play the buzzer at 4 instead of 3. Works great, except, now you can leave the menu with 2/4 or 4/2, but I want to lock it to 3/3. So on line 2465 I added:
Code:
Scene_Row.prototype.closeWindow = function () {
if (($gameParty.rowSize(1) != 4) && ($gameParty.rowSize(2) != 4)) {
this.popScene();
}
else {
SoundManager.playBuzzer();
}
};
I also changed the handler from popping the scene to calling this function on line 2461:
Code:
this._rowFormationWindow.setHandler('cancel', this.closeWindow.bind(this));
The scene pops if 3/3 is set, but freezes the game if 2/4 or 4/2 is set. There's no update function in this scene, so I added:
Code:
Scene_Row.prototype.update = function () {
Scene_MenuBase.prototype.update.call(this);
};
Still freezes. Okay... Maybe the window is the issue because it has no update function? So I added:
Code:
Window_RowFormation.prototype.update = function () {
Window_Selectable.prototype.update.call(this);
}
Still freezes. Not sure where to go from here? In my custom menus I've been making, calling the original update function has solved this problem. Any ideas?