Event Followers
This script allows events to designate a “leader” that another character will
follow. This could be the player, the current event, or any other event.
Any characters following a leader will follow that leader until they are told to stop following.
Download
Script: download here
Installation
Place this below Materials and above Main
Usage
The following method call is defined in Game_Character.
follow(event_id) stop_follow
This can be called by any character object such as players or events.
In a move route, if you make a script call and just say
follow(event_id)
Then the event specified by the move route will follow that character.
You can also say things like
$game_player.follow(event_id) $game_map.events[3].follow(event_id)
If the event_id is -1, then the character will follow the player.
otherwise, it will follow the specified event on the current map.
To stop following a character, use the script call
stop_follow
Again, remember from whose perspective the script is being called from.
Sorry,I’m kinda new when it comes to scripts so I don’t know how to make an event follow the player. Can someone help me out?
Hi, sorry this is years since you’ve created this script but I’m using your script in my school project as a way to transition my cutscene into gameplay seamlessly, where my characters go from talking to in a party, but using your “follow(-1)” for them to follow me, they all teleport in front of my player? is there any way for them to stay behind me? just as it is odd watching them all teleport and stack in front of eachother
I love the possibilities presented in this script. When I tested it out, I tried to get around the problem that an event follower does not carry over to another map. I had limited success. Using a common event, I was able to have the game check it the ‘event follower’ was in the party and for it to trigger the new event on the new map to appear and follow the player. All of that worked beauitfully. Where I ran into problems is where the new event follower/party member traveled up and away from the player character for every step taken. Not sure what I did, how to fix this or if that was the inherit tracking problem of this script. Has any one else encountered this? Is there a way to fix it? I was trying to create an interactable group with this.
Im a bit lost. sorry for the noob question but how exactly do I install this plugin? i tried putting it in the plugins folder, JS folder and my project folder but it doesnt seem to work at all
Hey can you help me? In the game, when it is the “follow” queue, the alert “Reference Error follow is not defined”. Is it because I am using it on MV? If it is, is there a script for MV? Thank you so much!
Is there any possible way we can have it so the events do follow the player to other maps? I really really need this to work this way and I’m counting on this script for a party system in my game where you can talk to party members interactively.
This script does not provide support for moving events from map to map. If there was a script that provided such functionality I could write a plugin. The main issue with such events is that it becomes a bit more complicated for eventing since the ID’s are no long known beforehand.
Hey, I’m having this issue when it is first calling the script to work. The popup is this:
https://www.dropbox.com/s/ckfqq2ehr7z9djq/EventFollowersIssue.jpg?dl=0
I’ve put the follow script command in the move route of the events I want to follow the player. I’ve copied the script in just as is, no modifications.
It looks like you have a script that adds something called “Fake Followers” that seems to be causing compatibility issues.
I keep getting an error saying:
Script ” line 98: NoMethodError occurred.
undefined method ‘move’ for nikNilClass
Something like that…
This script only supports the script calls in move routes.
‘Scuse me, I’m getting a strange error:
Script ‘Game_Interpreter’ line 14411: NoMethodError occurred.
undefined method ‘follow’ for #
Can you show a screenshot of how are you calling follow?
Did I send it?
I forgot if I did or not. :/
http://oi58.tinypic.com/3462pux.jpg
Yes, that’s a good screenshot as it shows what you’re doing that’s causing the problem.
The “follow” script call must be made as a script call in the “move route” command, though I could probably update the script to support regular script calls (not sure why I didn’t before)
Thank you. I must have missed that somewhere .
THat helps alot.
Thank you very much!
I must have missed that it was required through move route. 🙂
Hi again Tsukihime. Is there a way to have this code make the event follower follow diagonally like the normal followers?
I copied the code that normal followers use. Do they not follow diagonally? What happens when you move diagonally?
They wait for you to move straight again before they start following. I tested in a blank project with a normal follower to make sure. This is what I got:
http://img.photobucket.com/albums/v312/Yinyamina/Followers_zpsdxkpkfjc.gif
The real follower follows even when moving diagonal while the other one stops.
Which diagonal movement script are you using?
I’ve updated event followers to support diagonal movement. If you’re using my eight-dir movement script that has been updated as well so event followers move properly.
Thanks! 😀 That test was done with a blank project, so I was not using any diagonal movement scripts.
Now the diagonal works for events following the players, but not for the player following events. Otherwise, it seems to be working as intended!
I may have spoken too soon, events following other events also do not follow diagonally, just like the player following events.
Try it now
Thank you sooo much! It’s working perfectly now!
Wonderful, It works perfectly as far as I can tell now! Thank you!
Whenever I load a save file that’s on a map with my event follower, the event flies away diagonally instead of following the player.
Can you reproduce that in a new project and then send it to me?
I have an event follower the player, and then I save the game. Then I load the game, and the event is still following the player.
After adding the script (in the correct location, of course) whenever I launch my game I get this error:
Script ‘Event Followers’ line 96: NoMethodError occurred.
undefined method ‘move’ for nil:NilClass
This is line 96, but I lack the skill to diagnose the issue:
@event_followers.move if passable?(@x, @y, d)
I have the entire script and haven’t modified it in any way. I’ll try linking an image in case it helps:
http://i.imgur.com/RUDB8Qj.png
Did you start a new game or load a save file?
I loaded a save file.
All right, I started a new game, and it works beautifully now! Thanks!
Hi, I installed it between Materials and Main Process, but whenever I try to start playing it just says
“Script ” line 2: SyntaxError occurred.
unexpected ‘=’
= end”
What am I missing?
The first line of the script should be =begin. If it’s not there you have missed a bunch of lines or you have deleted the header.
Is there a way to disable the "Through" setting in this script without having to create an entirely new parallel process to get around it? I want to be able to have an NPC follow the PC around and also have them to be able to be "talked to" with the action button (similar to an RPG like Rune Factory).
I see the run speed settings have been fixed since last year though, awesome! 🙂
(Sorry if this posted twice. if this doesn't show again, I'm assuming there is a pre-approval setting for comments to post.)
Is there a way to disable the "Through" setting in this script without having to create an entirely new parallel process to get around it? I want to be able to have an NPC follow the PC around and also have them to be able to be "talked to" with the action button (similar to an RPG like Rune Factory).
(Ah, my apologies, please delete these two embarrassed Darn browser refresh issue..)
Hello,
I have a problem with this script and I don't know why.
If the player is in the map when the game starts, the event has no problem following it, however if I change map with an event and create a new event to follow the player on the new map, the follow behavior just continuous going up diagonally no matter the direction the player is moving.
Does anyone know why this might happen?
Does this occur in a new project with only event followers?
Sorry, I kind give up hope on this one, but this is really what :s
It works in a new project, however I comment all the other scripts and the problem is still there on my game.
Consider adding each script one by one to the new project. It's possible that you might have events set up that may also conflict with it (which would be strange but possible I guess)
Ok this stops happening if i remove the event from the previous map. When I remove the event that follows from the map and transferred the player to the next map with the new event that follows, the behavior stops happening. Maybe that helps figuring out what the problem might be…
If I remove the event from the initial map the second one on the other map works perfectly… Maybe that can give you a clue on what the problem might be.
Ummmmm…. I know this is late but I just started learning how to make games, I'm still pretty new to this stuff, what does this mean?
Script " line 84: NameError occurred.
uninitialized constant Object::Game_CharacterBase
I'm lost.
Are you installing it according to the instructions provided?
really nice script, and found a bug, in the function move_behind_leader, the y's(y+=1, y-=1) are in reverse,
it should be:
def move_behind_leader
x = @leader.x
y = @leader.y
case @leader.direction
when 2
y -= 1
when 4
x += 1
when 6
x -= 1
when 8
y += 1
end
x = [[1, x].max, $game_map.width-1].min
y = [[1, y].max, $game_map.height-1].min
moveto(x, y)
end
That does look kind of funny. I've edited the script as you have suggested. Thanks for catching that.
I’ve incountered an error, that i’ve solved, and another that i can’t solve. The first error is that in line 94 is defined a “event_followers.move” instead of “event_followers_move”. The second problem is: this script is ok with rpg maker ace? I cant use on it
This script is only for Ace.
The script won’t seem to work- It says something like “undefined method ‘move’ for nil:NilClass ( http://i.imgur.com/OpGj4Fb.jpg )
I have no idea what this means- My deadline is in a couple of days so I probably won’t have time to wait- I’ll just do something else here. Thought I’d let you know though..
This script is only 310 lines long your error message refers to line 347.
Ahh yeah I have other script before that…
That script is causing the event following to crash?
Probably is that, I dunno- I just opted to use a different method anyway-
this program makes my brain hurt sometimes….
thanks anyway :>
Wow, if I knew about this script earlier! XD Great job.
Script updated to correct all follower behavior when following another character.
Script has been updated to correctly match event follower speeds with the leader’s speed under any circumstances.
The event doesn’t seem to match speeds with the player when it runs. Do I have to set something manually to make it work? I set a custom move route to an event with only the script follow(-1) added, and the event just keeps walking even when I push A (shift) to run.
The event followers aren’t really perfect sometimes and I’m not really sure why. I’ll look into it at some point.
Will they follow the player to other maps too?
No, since events cannot transfer.