How to make actors escape in the other direction in combat?

I've got my sideview actors on the left side of the screen during combat instead of the right that is default. The problem is that when players Escape from combat, the actors move to the right, but with them being on the left, that means they just move into the enemies before finishing their escape.

Is there code or something somewhere I can edit so they move in the other direction while escaping?
.
In the default system, the retreat animation is handled in rpg_sprites.js, line 892-894

JavaScript:
Sprite_Actor.prototype.retreat = function() {
    this.startMove(300, 0, 30);
};

The format is "Horizontal pixels", "Vertical pixels", and "Length of animation in frames", set 300 to a negative number to have them flee in the opposite direction.
Thanks. That works on a fresh project but not in my current one. I guess another plugin is messing it up so I'll have to play around.

Cheers for pointing me in the right direction though.
Thanks. That works on a fresh project but not in my current one. I guess another plugin is messing it up so I'll have to play around.

Cheers for pointing me in the right direction though.
Your other plugin is probably overriding the retreat function. Try saving the code in a .js file and adding it as a plugin at the bottom of your plugin manager?
Your other plugin is probably overriding the retreat function. Try saving the code in a .js file and adding it as a plugin at the bottom of your plugin manager?

All good. I found a similar function in the BattleEngine core Yanfly plugin that was overriding it with it's own values. Changing it there got it working!

Thanks for the help!

Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-actors-escape-in-the-other-direction-in-combat.149966/