Set the move route of followers

As the title suggests. I've tried using other people's plugins, but for whatever reason, they cause the game to lag. I have typed out a script, but I'm unsure if the script was typed correctly because it worked at first, then I made some kind of edit, which I don't remember what I tweeked. Maybe someone who knows more than I could help me identify the issue within my script or provide me with a new one that works better?

I did use Google to try and find answers, but this is a more specific issue regarding the uploaded photo with my script.

Did I miss something in my scripts?
These kind of answers can be usually found easily with search engines.

$gamePlayer.followers().follower(f).setDirection(d);

where f is a number representing the follower's position (0 being the first follower, 1 being the second, etc.) and d is a number representing the direction: 2 Down, 4 Left, 6 Right, 8 Up
These kind of answers can be usually found easily with search engines.

$gamePlayer.followers().follower(f).setDirection(d);

where f is a number representing the follower's position (0 being the first follower, 1 being the second, etc.) and d is a number representing the direction: 2 Down, 4 Left, 6 Right, 8 Up
Yeah unfortunately I did already try that. I would not be here if I found the answer on Google now would I? Please, I just need to know how to properly use the "move route" script so I can dictate facing as well as movement. I apologize, if there was any confusion.

To make it more clear, I've uploaded a photo to represent what I mean. The image with the x and y variables determine follower's movement route.

Also the reason why I do not want a plugin is because I've already tried them and all they do is cause the game to lag at 1 or 2 fps.

Is there anything I missed in this script?
If your title and post asks how to set the facing direction of followers, then people are going to answer that, not anything else going on in your mind. And the script I posted above works for me. You can find the move route scripts in the script call list (EDIT: Don't know if they will help you with your new question though. I think I've only seen follower move routes made with plugins).
To make it more clear, I've uploaded a photo to represent what I mean. The image with the x and y variables determine follower's movement route.

Also the reason why I do not want a plugin is because I've already tried them and all they do is cause the game to lag at 1 or 2 fps.

Is there anything I missed in this script?
Is this AI generated?
I'd like to use a script, not a plugin
There's no difference.

A plugin is a file with JavaScript in it. You putting it into events via the Script box is no functionally different than typing it into a plugin file and calling the function.

In fact, it's slightly worse because the interpreter has to first parse the contents of the Script box from text into code, and then run it.

This:
I've already tried them and all they do is cause the game to lag at 1 or 2 fps.
doesn't make any sense.

I would not be here if I found the answer on Google now would I?
You also gave zero indication that you had already found and tried anything in your first post, so it makes complete sense for @rpgLord69 to suggest it.

The entire script you posted does not appear to have anything to do with what you said you're trying to do.

So maybe take a step back, take a deep breath, and try to explain more thoroughly from the beginning exactly what you want to achieve. Do you want the followers to always be facing a certain direction? Only under certain circumstances?
Dollars to donuts the OP's game lagged hard because he tried to use a pathfinding script on multiple followers at once.

Even just one event pathfinding can lag the game. Pathfinding is expensive on system resources.
Dollars to donuts the OP's game lagged hard because he tried to use a pathfinding script on multiple followers at once.

Even just one event pathfinding can lag the game. Pathfinding is expensive on system resources.
No my game lagged hard because of the plugins I was using. I had to remove them and just make my own scripts for the move route. No lag.

Is this AI generated?

The plugins I was using or do you mean the script I typed out? My scripts were hand-typed manually. As for the plugins, since I did not make them, I do not know.
No my game lagged hard because of the plugins I was using. I had to remove them and just make my own scripts for the move route. No lag.
Ok, great problem fixed then. Thread can be closed.
Ok, great problem fixed then. Thread can be closed.
Excuse me, I'm the OP of this thread. I will decide when it's solved, thank you kindly. Thread can stay open until further notice from me personally. Thank sir or mam or whatever you are.
The script you posted has multiple red flags suggesting AI made it. But hey, you says it works and fixed all your lag so sounds like problem solved to me.
The script you posted has multiple red flags suggesting AI made it. But hey, you says it works and fixed all your lag so sounds like problem solved to me.
In the above description, which is now updated, I've explained the issue the best I could. I never said anything about the problem being fixed. I asked if there was anything wrong with the script I typed out.
I was going to try helping you but to be honest the attitude you've displayed towards people trying to do that has put me off entirely. Good luck sorting it out!
Close thread

I was going to try helping you but to be honest the attitude you've displayed towards people trying to do that has put me off entirely. Good luck sorting it out!
You know what, you can close this thread then since no one knows a thing about what I'm talking about.
Thread closed.
I'll give this one more go.

I'm not going to try to puzzle through and test the code that you typed out - it looks overly complex and you still haven't described how you want it used at all.

I will offer these things:
- The typical, easy way to do this is to turn followers off via event command, turn on event pages that have the images of your party members, and move those events.

- The plugin, easy way to do this is with something like Tyruswoo's Follower Control plugin, which gives you move route commands to control each follower. The plugin does not make a game lag, using the commands correctly does not make a game lag.

The fact that you jumped directly to this instead of trying to troubleshoot or get help with your unnamed plugins seems odd to me. But you do you.
Thanks, ATT_Turan. I'll try it your way. I agree. That scripting stuff can be a bit overwhelming tbt. Thank you all for those who actually attempted to help.
I'll give this one more go.

I'm not going to try to puzzle through and test the code that you typed out - it looks overly complex and you still haven't described how you want it used at all.

I will offer these things:
- The typical, easy way to do this is to turn followers off via event command, turn on event pages that have the images of your party members, and move those events.

- The plugin, easy way to do this is with something like Tyruswoo's Follower Control plugin, which gives you move route commands to control each follower. The plugin does not make a game lag, using the commands correctly does not make a game lag.

The fact that you jumped directly to this instead of trying to troubleshoot or get help with your unnamed plugins seems odd to me. But you do you.

Now, I think it's safe to close this thread. Thank you again.
This thread is now closed due to being solved. Make sure to report threads in the future for closure. I’ve also merged three double posts. Thank you!

Original thread: https://forums.rpgmakerweb.com/threads/set-the-move-route-of-followers.163852/