MV Conditional branch for facing diagonal with QMovement

So, i'm trying to trigger animations based on the direction the player or actors are facing, but the only way to do it with diagonal is through script call. With Galv's diagonal movement i used "$gamePlayer._diagDir". how would i do it with QMovement?
Under...
JavaScript:
Game_CharacterBase.prototype.setDirection = function (d) {

Add...
JavaScript:
this.lastDirection = d;

Then you can call $gamePlayer.lastDirection (or $gameMap.event(#).lastDirection for events).
Of course you can replace lastDirection with whatever you like, I just like descriptive names.
Under...
JavaScript:
Game_CharacterBase.prototype.setDirection = function (d) {

Add...
JavaScript:
this.lastDirection = d;

Then you can call $gamePlayer.lastDirection (or $gameMap.event(#).lastDirection for events).
Of course you can replace lastDirection with whatever you like, I just like descriptive names.
You're a life saver, it works perfectly. thank you
Moved to: Plugin Support

Original thread: https://forums.rpgmakerweb.com/threads/conditional-branch-for-facing-diagonal-with-qmovement.140325/