Hi. I have my player character on the left side of the screen, with the enemy placed on the right side. It feels more natural to me. To reposition the player character, I use SVActorPosition, which I believe comes with MV. To perfectly position the enemy, I use MrTSEnemyPositions. However, both plugins merely allow the repositioning of the entities, they are still facing the wrong directions. The player is looking left, the enemy is looking right. Now, for the player, I have this script I got from a reddittor (I don't remember who :T):
It fixes the issue of the player facing left. The player starts the battle facing the enemy, who is sitting on the right corner of the screen. That doesn't work for the enemy, though. The enemy ALWAYS start the battle looking to the right, they only turn to the left after the first turn.
So, is there any simple piece of code I could add to the code above to fix the issue with the enemy?
Thank you!
JavaScript:
var _leftSide_Sprite_Actor_createMainSprite = Sprite_Actor.prototype.createMainSprite;
Sprite_Actor.prototype.createMainSprite = function() {
_leftSide_Sprite_Actor_createMainSprite.call(this);
this.scale.x = -1;
};
Sprite_Actor.prototype.updateTargetPosition = function() {
if (this._actor.isActing()) {
this.stepBack();
} else if (this._actor.canMove() && BattleManager.isEscaped()) {
this.retreat();
} else if (!this.inHomePosition()) {
this.stepForward();
}
};
It fixes the issue of the player facing left. The player starts the battle facing the enemy, who is sitting on the right corner of the screen. That doesn't work for the enemy, though. The enemy ALWAYS start the battle looking to the right, they only turn to the left after the first turn.
So, is there any simple piece of code I could add to the code above to fix the issue with the enemy?
Thank you!