Hi, I'm somewhat new to programming. I'm messing with mouse commands on MV, but I'm altering direct on the rpg_xx.js files, and there are changes that I even don't remember which line was. HAhaha.
Well, how can I create a plugin that my function totally overwrite the original function (on rpg_xxxx files)?
Example:
I want to change the whole function in my plugin file, how I can do this? Is there like an equivalent to the way that works on RGSS
Well, how can I create a plugin that my function totally overwrite the original function (on rpg_xxxx files)?
Example:
Code:
Game_Player.prototype.triggerTouchActionD1 = function (x1, y1) {
if ($gameMap.airship().pos(x1, y1)) {
if (TouchInput.isTriggered() && this.getOnOffVehicle()) {
return true;
}
}
this.checkEventTriggerHere([0]);
return $gameMap.setupStartingEvent();
};
I want to change the whole function in my plugin file, how I can do this? Is there like an equivalent to the way that works on RGSS
Code:
alias :my_method :method
def method
my_method // if I remember this call the base method, I don't want to execute anything from the original JS function, just overwrite it.
do_additional_stuff
end