Move Route Command: Turn towards Event[EventID]

Description of the Feature:
  • In RPG Maker MV, the move route is awesome, but I always feel like it lacks a feature. It has the ability to make the event turn towards the Player, turn away from the player, but nothing for Turning Towards/Away from a certain Event.
  • It would be as simple to use as a Turn Towards Player Command, but you'd get a little dropdown to choose an event to turn towards

Code for Implementation:
If a programmer, you can add some code on how it will be applied in the core scripts.

Mockups:


Why is this feature good?
This feature is great because of the following:
  • It makes Move Routes simpler and easier to create especially when dealing with interactions between events.
  • You could even use it to have events always looking at another event, like NPCs who continually stare at something. (it creates lots of possibilities)

Possible issues with this feature?
Issues that might arise from this feature:
  • Hard to Implement? I'd assume not because it'd be very similar to the Turn Towards/Away from Player command, but maybe.
  • There's no space on the Move Route input thingy, it's full:
I've always though that when eventing.

Not hard to implement at all,
Hundred of programmers have added that in.
that moment when you realize you know how to open and search .js files....
Code:
Game_Character.prototype.moveTowardCharacter = function(character) {
    var sx = this.deltaXFrom(character.x);
    var sy = this.deltaYFrom(character.y);
    if (Math.abs(sx) > Math.abs(sy)) {
        this.moveStraight(sx > 0 ? 4 : 6);
        if (!this.isMovementSucceeded() && sy !== 0) {
            this.moveStraight(sy > 0 ? 8 : 2);
        }
    } else if (sy !== 0) {
        this.moveStraight(sy > 0 ? 8 : 2);
        if (!this.isMovementSucceeded() && sx !== 0) {
            this.moveStraight(sx > 0 ? 4 : 6);
        }
    }
};

Game_Character.prototype.moveAwayFromCharacter = function(character) {
    var sx = this.deltaXFrom(character.x);
    var sy = this.deltaYFrom(character.y);
    if (Math.abs(sx) > Math.abs(sy)) {
        this.moveStraight(sx > 0 ? 6 : 4);
        if (!this.isMovementSucceeded() && sy !== 0) {
            this.moveStraight(sy > 0 ? 2 : 8);
        }
    } else if (sy !== 0) {
        this.moveStraight(sy > 0 ? 2 : 8);
        if (!this.isMovementSucceeded() && sx !== 0) {
            this.moveStraight(sx > 0 ? 6 : 4);
        }
    }
};

(........since VX)
This could be as simple as changing the following commands to allow a character selection:

Move toward Player
Move away from Player
Turn toward Player
Turn away from Player

Instead of the player, it would give a drop-down selection where you could choose Player, This Event, or a specific event - the same kind of drop-down that you get in the top left corner of a Set Movement Route command.
You can use this if you don't want to use scripting.
code.png

Original thread: https://forums.rpgmakerweb.com/threads/move-route-command-turn-towards-event-eventid.74984/