That's a lot of extra work to have to add that to every single place there's a map transfer event which makes my programmer brain cry. It violates the DRY principle ("Don't Repeat Yourself").Does MV have common events? Then you won't need a plugin. Just make a common event that does whatever you'd like to happen on map change, and Call Common Event after the transfer command in each map transfer event.
alias_Game_Interpreter_command201 = Game_Interpreter.prototype.command201;
Game_Interpreter.prototype.command201 = function () {
if (this._params[1] !== $gameMap.mapId()) {
$gameTemp.reserveCommonEvent(1);
}
alias_Game_Interpreter_command201.call(this);
};
command ... 201?How about this?
alias_Game_Interpreter_command201 = Game_Interpreter.prototype.command201;
Game_Interpreter.prototype.command201 = function () {
$gameTemp.reserveCommonEvent(1);
alias_Game_Interpreter_command201.call(this);
};
Runs whenever you use the Transfer Player event command. Change 1 to the id of the common event.
It's just the transfer player command. I edited my post but here's a better solution for you again so you see it, it checks if the command is transferring the player to a new map instead of just another location in the currentcommand ... 201?
that certainly looks like exactly what I need, thank you, there is no way I would have ever found that on my own. It's getting late, so I'm probably not going to get this working tomorrow, but I'm gonna trust you & call this solved.