Make Follower walk sideways?

Hi all,

I have an actor in my team who is basically a crab, so I'd like to have him walk sideways. Unfortunately, I can't just edit the charset graphic, since it will be mirrored to events in cutscenes dynamically. So he would face into wrong directions there.

Is there a way, like a small plugin, to change the used directions for Actor 56 only if is a follower in my party?

I would need the top row of the charset to be used, when he's walking East and West,
The second row, when he's facing North.
And the third row, when he's facing South.
Forth row not in use.

Thanks!
Maybe something like this.

JavaScript:
Sprite_Character.prototype.characterPatternY = function() {
    var chara = this._character ,direction=chara.direction();
    if (chara._characterName=='Crab' && chara.isMoving() && chara.hasWalkAnime()){
        //turn left 90 deg
        direction*=2;
        direction%=10;
    }
    return (direction - 2) / 2;
};

Edit*
There are still some problems.
1. You need to use a separate sprite sheet for the crab. So when it appears as an event or follower you only need to check character name.
2. It only works when the character is moving. So when it stops it will still face foward. This can be a problem because followers have a slight delay between steps.

So I guess a better solution is to edit the sprite sheet to have that effect, but change the character's image when you want to play a cutscene?

Edit2*

This is another version, make a one-second count down when the character moves. So when the character stops, it will still face sideway for a second。
JavaScript:
Sprite_Character.prototype.characterPatternY = function() {
    var chara = this._character ,direction=chara.direction();
    if (chara._crabDelay>0||(chara._characterName=='Crab' && chara.isMoving() && chara.hasWalkAnime())){
        //turn left 90 deg
        direction*=2;
        direction%=10;
        if(chara.isMoving()) chara._crabDelay=60;
    }
    chara._crabDelay--;
    return (direction - 2) / 2;
};
Thank you, I'll give it a try!

Original thread: https://forums.rpgmakerweb.com/threads/make-follower-walk-sideways.172643/