Game freezing from set handler bind -- YEP_Row Formation modifications help.

Jab-Punch

Warper
Member
Joined
Aug 29, 2016
Messages
2
Reaction score
0
First Language
English
Primarily Uses
Hello,


I am trying to modify the YEP_RowFormation plugin to better organize rows by adding a grid format that includes setting default rows and columns for each battler. I have successfully created the format for the battle phase and am now trying to fix the Row Menu to better adjust the actors in fixed positions. After creating a function for the cursor window to move without left/right/up/down without moving an actor, my next objective was to add a select feature to grab an actor and drag him/her along the cursor. Unfortunately, the rowFormationWindow.setHandler function is not cooperating with the system when I try to add an 'OK' trigger within the first argument. The primary issue is that the game keeps freezing whenever I press OK after entering the Row Menu. Does anyone know how to fix this issue? Perhaps there is another function within whatever rowFormationWindow is inheriting from that is interfering with the execution?


I have the file attached with the issue occurring at line 2701.


This is what I altered so far as well as the conditions I anticipated to work with the 'OK' set handler:


Scene_Row.prototype.createRowFormationWindow = function() {
    var wy = this._helpWindow.height;
    this._rowFormationWindow = new Window_RowFormation(wy);
    this._rowFormationWindow.setHelpWindow(this._helpWindow);
    this._rowFormationWindow.setHandler('ok',     this.onRowOk.bind(this));
    this._rowFormationWindow.setHandler('cancel', this.popScene.bind(this));
    this.addWindow(this._rowFormationWindow);
};


Scene_Row.prototype.onRowOk = function() {
    console.log("This is printed out!");
};

View attachment YEP_RowFormation_Up.js
 

Jab-Punch

Warper
Member
Joined
Aug 29, 2016
Messages
2
Reaction score
0
First Language
English
Primarily Uses
Seeing as how no one has answered yet, I have already located the issue. It turns out the function within the set handler requires the .activate() function to be called at the end in order to continue the game loop. I am not certain as to why this is a huge requirement though, so any explanation regarding activate() would be appreciated.
 

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

Latest Threads

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,867
Messages
1,017,062
Members
137,575
Latest member
akekaphol101
Top