Yanfly MainMenu ActorBind

Hi, I tried to create a new function that should be called from YANFLYs MainMenu System from the ActorBind. It is really important for this script that I have selected an actor first. So I did this in the Parameters:

Menu Name: "Do Something"
Menu Symbol dosomething
Menu Show true
Menu Enabled true
Menu Ext
Menu Main Bind this.commandPersonal.bind(this)
Menu Actor Bind this.doSomething.bind(this)

For simplicity the content of the doSomething function is for now:

Scene_Menu.prototype.showUnitShop = function() {
this.popScene();
};

However after I select the actor, the scene is not popped but the gameoverlay freezes (fps stay at 60, commands like F2 still work, no output on debug console). The prototype function is correctly loaded into js.

I really do not know why my function is not executed. Do you have some hints for my what I have to change? Just writing this.doSomething() in the actorBind parameter will execute the function but even BEFORE $gameParty._menuActorId will be set.

Thanks in advance!
Moved to: JS Plugin Support
Hi, I just took forever figuring this out!!!
The actor you're looking for is: $gameParty.members()[Scene_Menu._statusWindow._index]


And to stick it into the Yanfly MainMenu plugin, you just need to add these two lines.

Scene_Menu.prototype.onPersonalOk = function() {
var symbol = this._commandWindow.currentSymbol();
var actorBind = this._actorBinds[symbol];
if (!actorBind) return;
var actor = $gameParty.members()[this._statusWindow._index];
$gameParty.setMenuActor(actor);

eval(actorBind);
};
Whoa, I did not expect an answer here. Thanks I will try it out. Looks much better than my current "solution".

Original thread: https://forums.rpgmakerweb.com/threads/yanfly-mainmenu-actorbind.88271/