Okay so I wanted to do a common event, bound to a key (using yanfly plugin) that would optimize the entire party's equipment when the button is pressed. Like Drifty did in his game Legend of Driftwood. I even looked at a "tutorial" where he shows the code snippet used in that common event and I'm positive I've written it just like he has - but it doesn't seem to work for me.
The video tutorial can be found here (watch from ~19:32 and you get right to where drifty talks about the code):
Thank you for for reading.
var length = $gameParty.allMembers().length;
for (var i = 0; i < length; ++i) {
var actor = $gameParty.allMembers();
If (actor) actor.optimizeEquipments();
}
for (var i = 0; i < length; ++i) {
var actor = $gameParty.allMembers();
If (actor) actor.optimizeEquipments();
}
The video tutorial can be found here (watch from ~19:32 and you get right to where drifty talks about the code):
Thank you for for reading.

