- Joined
- Jun 30, 2017
- Messages
- 42
- Reaction score
- 35
- First Language
- spanish
- Primarily Uses
- RMMV
Hi, I am working on a custom lighting/parallax plugin, currently the parallax is done via a simple PluginCommand in an autorun event. Now trying to trigger my plugin everytime a map is loaded instead of using a plugin command.
I tried with Game_map.prototype.setup()
But my plugin doesnt work here because SceneManager._scene._spriteset is not defined at that moment 
I am looking to something like Game_Map.onLoaded( not existing ) to inject my call when i am sure the map
is loaded.
I tried with Game_map.prototype.setup()
Code:
Game_Map.prototype.setupOld = Game_Map.prototype.setup;
Game_Map.prototype.setup = function(mapId){
console.log("mapId");
var r = this.setupOld.apply(this, arguments);
Game_Interpreter.prototype.pluginCommand('BlackLights');
return r
}
I am looking to something like Game_Map.onLoaded( not existing ) to inject my call when i am sure the map
is loaded.

