Hello, I know that this question has been asked many times, and that this is upon the plugin developer to provide such function.
However, since the plugin is absolutely short, it should be really easy to give it the possibility to be turned off... or better said, make that when Switch number is ON, plugin uses the changed code, and when switch number is OFF, plugin uses the unchanged code.
This plugin is to make that character only uses Left and Right sprites in Map, but I want to use this feature only under specific cases while in map.
Here's the code:
As you see, the code is really short, so it shouldn't be a problem to make that it takes effect when a switch is ON/OFF.
I assume that the normal code is this one (not sure):
Thanks in advance.
However, since the plugin is absolutely short, it should be really easy to give it the possibility to be turned off... or better said, make that when Switch number is ON, plugin uses the changed code, and when switch number is OFF, plugin uses the unchanged code.
This plugin is to make that character only uses Left and Right sprites in Map, but I want to use this feature only under specific cases while in map.
Here's the code:
JavaScript:
//-----------------------------------------------------------------------------
// 2D Fixed Direction (Horizontal)
/*:
* @plugindesc Only allows player to face left or right (even when moving up or down). Example uses Platformer or Brawler/Beat'em Ups.
* @author Quasi Site: http://quasixi.com
* @help This plugin does not provide plugin commands.
*/
(function() {
var Alias_Game_CharacterBase_setDirection = Game_CharacterBase.prototype.setDirection;
Game_CharacterBase.prototype.setDirection = function(d) {
if (d === 4 || d === 6) {
Alias_Game_CharacterBase_setDirection.call(this, d);
}
};
}());
As you see, the code is really short, so it shouldn't be a problem to make that it takes effect when a switch is ON/OFF.
I assume that the normal code is this one (not sure):
JavaScript:
Game_CharacterBase.prototype.setDirection = function(d) {
if (!this.isDirectionFixed() && d) {
this._direction = d;
}
this.resetStopCount();
};
Thanks in advance.