Follower's Move Routes

Follower's Commands

(also known as Follower's Move Routes v.2.2)

​

Introduction

This little script is a new approach to my Follower's Move Routes that allows the usage of other event commands such as Show Animation, Show Balloon and Set Event Position, and of course, Set Move Route.

It also allows making the followers wait. (v.2.1)

You can also use the actor database name instead of following index. (v.2.2)

Features

- Easy to use.

- Compatibility friendly.

- Lemonade friendly.

Screenshots

Spoiler
scommands2.png


scommands1.png


lfmrnames.png
How to Use

Simple put a call script command before each event command that you want to direct to a follower.

The call script command should be like this →



Code:
$game_temp.lfmr_follower = index
Where index, the index of the follower. Example →



Code:
$game_temp.lfmr_follower = 1
You can also use the follower name, like this →



Code:
$game_temp.lfmr_follower = 'Natalie'
If you want to use the name, remember to put it inside '' or "".

To make the followers wait while the player is still able to move, use this command →



Code:
$game_temp.lfmr_wait = true
Replace true with false if you want to make the followers follow the player again.

Script

Spoiler
Code:
#==============================================================================
# ** Follower's Commands (also known as Follower's Move Routes v.2.2.1)
#------------------------------------------------------------------------------
# * This little script allows to use in followers any editor command designed
# to work with events, this includes Show Animation, Show Balloon Icon,
# Set Event Location and Set Move Route.
#------------------------------------------------------------------------------
# * To use it, simple put a script call with the following before each of the
# previously mentioned commands.
# $game_temp.lfmr_follower = follower index OR folower name
# Use $game_temp.lfmr_wait = true/false to make the followers wait/follow again.
# Example
# $game_temp.lfmr_follower = 1 OR 'Name' : $game_temp.lfmr_wait = true
#==============================================================================
#==============================================================================
# ** Game_Temp, Alias to initialize.
#------------------------------------------------------------------------------
# Adds variable to contain follower's index and to turn on/off following.
#==============================================================================
class Game_Temp
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :lfmr_follower ; attr_accessor :lfmr_wait
#--------------------------------------------------------------------------
# * Initialize Alias
#--------------------------------------------------------------------------
alias lemony_moveroute_initialize initialize
#--------------------------------------------------------------------------
# * Initialize
#--------------------------------------------------------------------------
def initialize
lemony_moveroute_initialize
@lfmr_follower, @lfmr_wait = nil, false
end
end
#==============================================================================
# ** Game_Interpreter
#------------------------------------------------------------------------------
# Alias to get_character to return the desired follower if an index was set.
#==============================================================================
class Game_Interpreter
#--------------------------------------------------------------------------
# * Get Character Alias
#--------------------------------------------------------------------------
alias lemony_moveroute_get_character get_character
#--------------------------------------------------------------------------
# * Get Character
#--------------------------------------------------------------------------
def get_character(param)
i, $game_temp.lfmr_follower = $game_temp.lfmr_follower, nil
fc = $game_player.followers[i] if i.is_a?(Integer)
fc ||= $game_player.followers.each {|f| return f if f.actor.name == i} if !i.nil?
i.nil? ? lemony_moveroute_get_character(param) : fc
end
end
#==============================================================================
# ** Game_Follower
#------------------------------------------------------------------------------
# Alias to chase_preceding_character for preventing the execution if a move
# route exist for this character or for the preceding one.
#==============================================================================
class Game_Follower < Game_Character
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_reader :move_route
attr_reader :original_move_route
#--------------------------------------------------------------------------
# * Chase Preceding Character Alias
#--------------------------------------------------------------------------
alias lemony_moveroute_chase_preceding_character chase_preceding_character
#--------------------------------------------------------------------------
# * Pursue Preceding Character
#--------------------------------------------------------------------------
def chase_preceding_character
p_c = @preceding_character if p_c.nil?
return if (@move_route != @original_move_route) || (p_c != $game_player &&
(p_c.move_route != p_c.original_move_route) || $game_temp.lfmr_wait)
lemony_moveroute_chase_preceding_character
end
end
Author's Notes

Free for use in commercial/noncommercial games, no credits needed.
lol....and Victor Saint made one last night that does this as well..... 😛

http://forums.rpgmak...lowers-control/

I was technically the last one in....so I guess I'll leave mine out, but what are the odds??? 🙂
Except that Victors requires his engine for every little thing, so i will be using this for sure! Great script!
This was what I've always been searching for even since woratana released a Caterpillar system script for RPG Maker VX. My RM life is now complete =w=)b Well done sir!
I'm glad you people like it.

I just released a new version that allows the usage of many event commands, with a different and more compatibility friendly approach .

Stay tunned for the topic!
hey man i'm getting an error with this 🙁

hmmm.png


this is my event:

hrmmmm2.png
hey man i'm getting an error with this 🙁
You have to put 'FMR 1' in single quotes in the Script command.
oh the quotes, thanks bro.
Hello everyone! Here is the new version, http://forums.rpgmakerweb.com/index.php?/topic/786-followers-commands-move-routes-and-much-more/
Hello everyone! Here is the new version, http://forums.rpgmak...-and-much-more/
Why did you create a new thread instead of simply updating this? hmmm
Why did you create a new thread instead of simply updating this? hmmm
Why did you post just to ask me that? I was planning on posting other system related to followers there but now that you mention it, it is logical to use this thread. Already updated it.
Why did you post just to ask me that? (...) it is logical to use this thread.
Exactly because of that... i just thought it was very odd to make another thread since it was an upgrade.
hey Lemony, i am attempting to use 1.0 of this script and found a problem.

if i try to control the player sprite and a follower at the same time, i get

Your script line 16: NoMethodError occured

"undefined method 'include?' for nil:NilClass"

i know this is because it doesnt have a 'Script: FMR #', but if 0 is the first follower how do you control the player sprite without it crashing?
Hi kalez! That doesn't happen in version 2.0, which has new features also. But I fixed it. The first post is updated.

Simply add this →



Code:
|| ''
To the end of line 15, (before the error one).
Bravo. Simple and effective, no engines needed and thus no incompatibility issues with other scripts. Thank you.
Hey there,

nice Script ^^

But I've got a little problem:

I want to move the player without the followers return behind him, but when I try to, they return.

Is there something I'm missing?
Hi everyone!

New version out, now you can make the followers stop following the player (and make them follow the player again, of course).

Yes, you can move the followers and treat them as if they were events while they are waiting (non following the player) as well.

mobychan said:
Hey there,nice Script ^^

But I've got a little problem:

I want to move the player without the followers return behind him, but when I try to, they return.

Is there something I'm missing?
Is this new wait feature what you were looking for?

Sly said:
Bravo. Simple and effective, no engines needed and thus no incompatibility issues with other scripts. Thank you.
You are welcome! Thanks for the kind words!
I'll try the new version right away, but it really seems it's what I wanted, thanks ^^

EDIT: Totally works!

It is exactly what I wanted ^^
I just want to make sure I'm understanding this - is follower = 1 Actor 001, or 002 as in the first follower.

Also, is there somewhere I need to define which is which? It seems to work some of the time for me but not every time, and I'm sure it's just user error.

Adding screenshot for clarification:

The first 2 move routes work as I want them to, and move the characters I would expect, Actor 001 and 003. The next move route, does not move Actor 003, and he just disappears from the next line of being removed. There is another one off-screen that is set to follower = 2, but instead both remaining actors (001 & 002) move.

Spoiler
EventError6.png
Hi mlogan!

0 = first follower, 1 = second follower, 2 = third follower.

That are the numbers of the followers in order, being 0 the closer to the player and 2 the last follower if four party members are visible in the map including the player.

You were using the database index for moving them, right? Tell me if you get it to work now!

Original thread: https://forums.rpgmakerweb.com/threads/followers-move-routes.737/