How do I do this without causing a maximum call stack?
Context:
I'm creating a UI for a minigame and I don't want to use a mess of script inputs because I'll need to call it multiple times. I understand I can call it from Common Events, but I'd like to just put it all in a plugin and update text values as I go.
I feel like it should be this simple, as it would be in any other engine:
But this causes a maximum call stack, I assume because when the plugin is called it calls it 1 billion times. Any way to pull this off?
Context:
I'm creating a UI for a minigame and I don't want to use a mess of script inputs because I'll need to call it multiple times. I understand I can call it from Common Events, but I'd like to just put it all in a plugin and update text values as I go.
I feel like it should be this simple, as it would be in any other engine:
var _Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand;Game_Interpreter.prototype.pluginCommand = function (command, args) { _Game_Interpreter_pluginCommand.call(this, command, args); if (command === 'MyVariable') { MyVariable(); }};function MyVariable() { $gameScreen.showPicture(1, 'SomeImage', 0, 8, 8, 100, 100, 255, 0); // Other commands}But this causes a maximum call stack, I assume because when the plugin is called it calls it 1 billion times. Any way to pull this off?