using a condition to check if player is moving diagonally.

Hello. I'm using Galv's Diagonal Movement plugin. I want to set a condition to check if the player is facing diagonally. In the Conditional Branches "Script" field, to check if the player is facing down, I'm using:

Code:
$gamePlayer.direction() == 2

That works, no problem. But if I use a diagonal value, like:

Code:
$gamePlayer.direction() == 3

it doesn't work. If I'm facing down-left or down-right, it thinks I'm just facing down. It seems like this would be doable, since RMMV has built-in commands for moving diagonally. Is there a way to do this?

Thanks!
JavaScript:
$gamePlayer.diagonal() === 3
should work!
@ozubon No, that doesn't do anything, at least for me, same behavior as before. However, I did figure out that I could just use:

forum.png


and that works just fine. Didn't need any script calls after all. Thanks anyway!
Oops, you're right. diagonal() is for victor engine's diagonal plugin, not galv's!
Thread closed a

Original thread: https://forums.rpgmakerweb.com/threads/using-a-condition-to-check-if-player-is-moving-diagonally.121210/