Hi there. I am experiencing issues with certain plugin commands executing in javascript. To isolate external factors, I created a brand new game with no plugins and wrote this simple code:
When I execute the plugin command, all that happens is the console logs each call immediately without delay and no screens are faded in or out. I have tried executing a variety of code with the interpreter's wait() function but it just does not work from within the javascript. What am I missing here? Is there some other approach that will allow these types of commands to work? And just in case you're wondering: yes, this code must execute from within javascript files and not the RMMV editor, event editor, etc.
Thank you for your insight!
Code:
Game_Interpreter.prototype.pluginCommand = function(command, args) {
if (command === "testFadeOut") {
console.log('start test');
$gameScreen.startFadeOut(30);
this.wait(30);
$gameScreen.startFadeIn(30);
console.log('finish test');
}
};
When I execute the plugin command, all that happens is the console logs each call immediately without delay and no screens are faded in or out. I have tried executing a variety of code with the interpreter's wait() function but it just does not work from within the javascript. What am I missing here? Is there some other approach that will allow these types of commands to work? And just in case you're wondering: yes, this code must execute from within javascript files and not the RMMV editor, event editor, etc.
Thank you for your insight!