this.pluginCommand(command, args); Use inside Script ?

Hello, I'd like a little help to know if anyone has used a plugin command inside a script.
I would like to make more dynamic control.


Here the basic plugin command: P_CALL_CE [Picture number] [Common event ID] [Trigger]


Example: P_CALL_CE 1 7 1


Now am trying to use inside script.


this.pluginCommand('P_CALL_CE', 1, 7, 1);


But not seem work !.


Here the line code inside plugin !


var _Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand;
Game_Interpreter.prototype.pluginCommand = function (command, args) {
_Game_Interpreter_pluginCommand.call(this, command, args);
var pictureId, commonId, trigger, variableNum;
switch (getCommandName(command)) {
case 'P_CALL_CE' :
case 'ピクチャのボタン化':
pictureId = getArgNumber(args[0], 1, $gameScreen.maxPictures());
commonId = getArgNumber(args[1], 1, $dataCommonEvents.length - 1);
trigger = getArgNumber(args[2], 1, 12);
$gameScreen.setPictureCallCommon(pictureId, commonId, trigger);
break;
.................. more CASE after.................


Someone would have an idea of what I'm doing wrong.


Tank you a lot Guys
Ok guys tank you, but is solved.


The solution i use .


$gameScreen.setPictureCallCommon(1, 7, 1);


And is work now
 

Original thread: https://forums.rpgmakerweb.com/threads/this-plugincommand-command-args-use-inside-script.63087/