Could I second this, I've been looking around $gameInterpreter for this.
I believe Game_Interpreter does not need the global var $gameInterpreter because it specifically handles event commands, so when you use a script call it's local to the Game_Interpreter class. I have never tried using the plugin command function inside a script call before but logically it should be as simple as doing any script call, depending on plugin of course.
Thisi s the main function here, and it is aliased over and over again with each plugin that uses it.
JavaScript:
Game_Interpreter.prototype.pluginCommand = function(command, args) {
// to be overridden by plugins
};
so something like this would make sense. Right? I'd assume so lol
JavaScript:
this.pluginCommand(command, arguments);
So if you want to use plugin command as a script call try this format with the plugins command, whatever that may be nd fill in the arguments properly. In order to fil in the arguments properly you will need to take a look at how the event command 'Plugin Command" works.
JavaScript:
// Plugin Command
Game_Interpreter.prototype.command356 = function() {
var args = this._params[0].split(" ");
var command = args.shift();
this.pluginCommand(command, args);
return true;
};
As you can see above it puts a full string into the args variable then splits it with a space, so you will need to do the same format if you want to do a script call instead of the actual plugin command. I did an example of my Window Pop plugin below.
This is the script call I could use for my Window Pop plugin instead of the plugin command it provides.
JavaScript:
var args = 'WPOP left 18 Hello'.split(" ");
var command = args.shift();
this.pluginCommand(command, args);
I hope this helps you out a bit.
Alternatively you could make it shorter without the variables and do something like this.
JavaScript:
this.pluginCommand('WPOP', 'left 18 Hello'.split(" "));