I need to be able to launch a plugin command from within a Game_Actor function. I figure the easiest way is simply setting up the parameters as Game_Interpreter would arrange them, and then call the interpreter's pluginCommand function.
The problem is, there are many interpreters, and I would need to be able to identify and access which one initiated the Game_Actor function. Game_Troop has an interpreter, as does Game_Map, Game_Common_Event, and every Game_Event object that's currently active. Any one of them could have called the Game_Actor function. Is there a way to identify which one it was?
I could say "if I'm in battle, then I'll use $gameTroop's interpreter, otherwise I must be on the map so I'll use $gameMap's interpreter"? I think that would work, but if the plugin being called referred to anything within the interpreter context (like the event id), and I ran the command from the wrong interpreter, it would not work. This means it would limit what plugins could be used, so I'd rather not go that way if possible.
The problem is, there are many interpreters, and I would need to be able to identify and access which one initiated the Game_Actor function. Game_Troop has an interpreter, as does Game_Map, Game_Common_Event, and every Game_Event object that's currently active. Any one of them could have called the Game_Actor function. Is there a way to identify which one it was?
I could say "if I'm in battle, then I'll use $gameTroop's interpreter, otherwise I must be on the map so I'll use $gameMap's interpreter"? I think that would work, but if the plugin being called referred to anything within the interpreter context (like the event id), and I ran the command from the wrong interpreter, it would not work. This means it would limit what plugins could be used, so I'd rather not go that way if possible.