Checking Event Direction With a Script Call.

As the title says, I want to check an event or players direction using a Script Call.

I tried.

$gameMap.event(1).directionand it returned

function(){  return this._direction; }I was hoping for a numerical value. like 2,4,6, or 8.

No, I don't want to use the event branch.

Could someone help? 
Game_Event.direction is a function, so you need to actually call it (unlike older RM version, which were programmed in Ruby):

Code:
$gameMap.event(1).direction();
Thank you Sir or Ma'am 🙂

One more question. im not much of a programmer, but the logic im seeing is that "direction();" is a function, and "direction;" is not.

Does the "()" indicate that this is a function?
It's both a function but without the parens it returns the actual function and with parens it actually calls the function ^^
I see, once a gain thank you.
A function is a first class object in Javascript, and can be assigned to variables.

Code:
var x = function () {    return "Hello World!"}; console.log(x) //writes the function itself.console.log(x()) //calls the function and writes the return value

Original thread: https://forums.rpgmakerweb.com/threads/checking-event-direction-with-a-script-call.53694/