じ☆ve冰风 发表于 7 天前

Yanfly Row Formation modifications (3 front / 3 back)

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:
                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?


本贴来自国际rpgmaker官方论坛作者:Khali处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/yanfly-row-formation-modifications-3-front-3-back.181178/
页: [1]
查看完整版本: Yanfly Row Formation modifications (3 front / 3 back)