Detecting if an event is moving or not with script call

I'm looking for a way similar to $gamePlayer.isMoving() but for an event.

I've tried $gameMap.event(this._eventId).isMoving(), but it always returns false, and the script call list mentions $gameMap.events()[eventId].isMoving() (I tried replacing eventId by this._eventId), but it crashes the game)

Am I doing something wrong here? I can't find any working solution around. (Which makes me wonder if what I'm trying to do is even possible?)
Where are you putting the script call? Please show a screenshot of your event, with the whole event window visible.
Here's a screenshot to it
I tried cleaning it up a little and commenting on it in case you needed to understand things, sorry if it's still a bit messy, it's mostly a test I've been poking at the entire day haha
Are you sure it's returning false? How do you know that?

You have a custom autonomous move route set up, and you've also got a Set Move Route command in the event commands, so you're executing two different movement routes on the same event. They're no doubt interfering with each other. And your event is parallel process.

Perhaps you should explain what you're trying to achieve here, as there is probably a better way to go about it.
Are you sure it's returning false? How do you know that?

You have a custom autonomous move route set up, and you've also got a Set Move Route command in the event commands, so you're executing two different movement routes on the same event. They're no doubt interfering with each other. And your event is parallel process.

Perhaps you should explain what you're trying to achieve here, as there is probably a better way to go about it.
The custom autonomous move route is set in the event itself so it has a random delay between the steps. The event movement route isn't actually doing anything, that probably slipped oops.

I know it's returning false because I did a console.log($gameMap.event(this._eventId).isMoving()); in order to see what was going on, and it always returns false for some reason.

I did try explaining in the comments of the picture, but I guess I wasn't specific. Basically, the first event command is just to set it to have a movement route (so the latter wait script call delays it randomly), then a script block sends the event ID and "charType" to a variable for the common event to execute footsteps. After that, it executes the common event, then another script block waits for a random amount of frames, then repeat.

P.S.: I've just tried setting the default movement route to fixed, it doesn't seem to make any difference., as when it moves by the independent move route it still returns to false. However, when using the event specific move route, it does return true (taking out the independent one, I mean). But this isn't an ideal solution, as that means I have to execute the event often to detect when it is moving, which means too many events per second...

[EDIT] Okay, I found the issue (finally) by pure luck. I had to make it wait at least 1 frame after the movement route started. I assume it is because it was executing the check right during the beginning of the movement, which probably meant the movement hasn't started yet, so one frame afterwards I guess it already applied the movement? Either way, this was a stupid problem, lol. I hope if anyone else has a similar problem this post can help them a little. 🙂
Thread closed IgnoreMe

Original thread: https://forums.rpgmakerweb.com/threads/detecting-if-an-event-is-moving-or-not-with-script-call.105545/