Smart(er) Followers

Smart(er) Followers​
Created by Neon Black​

What is it?

This script extends follower movement to make them properly follow the player when the player moves straight, diagonal, or jumps.  It also causes the followers to match the player's facing direction during movements (for strafing as an example).  This script DOES NOT allow you to control followers and via scripts and such.

How can I use it?

Place this script below "materials" and above "main" in the script editor.  The script's only config option is the displacement between each character which is explained in the script.

What does it work with?

If the other script does anything with followers, most likely this script will not work with it.  If you're trying to use a follower control script, don't.  You'll have to use events instead.

How can I get the code?

Version 1.0a (base script, 1.24.2014) is available from my pastebin account here.

I would like to use this code.


This work is licensed under a Creative Commons Attribution 4.0 International License.

Author's Disclaimer:

First thing first.  I HATE followers.  Now that that's out of way....  The main reason I really hated the followers is that they looked so stupid and you couldn't really do fancy sprite movements while you had them following the hero.  So I created this script.  It makes the followers slightly less painful to look at.  I'm almost certain there will be issues with this and I almost get the feeling I'm going to throw this one out, but hey, I could be wrong.  As always, enjoy!
Great script!

The followers seem to move more naturally now, contrary to the caterpillar default.
May God bless you, I also hate followers like the pest, but I may consider changing my tastes with this thing.
I think I've found a bug...

The events set to Player touch no longer get activated when walked on.

I tried deactivating your script and my test event re-worked.
I noticed the same thing as cabfe, except I discovered that if you sort of inched up towards it then it would work.  Otherwise nothing (it was a transfer event on the ground), you would just walk on over it.
Thanks to Ksjp17's observation, I got it working by changing the order of line 58

move_by_input 
and putting it under line 61

update_nonmoving(last_moving) unless moving?like this

update_scroll(last_real_x, last_real_y) update_vehicle update_nonmoving(last_moving) unless moving? move_by_input @followers.updateI can't guarantee it is bug free, my knowledge of scripting is limited.
We'll have to wait for an answer by Neon Black himself.
Ah ha, wasn't sure if the order of those methods actually mattered. I'll update it in just a few hours with a fix.
Hello Neon,

The only thing that is impeding me to add visual followers is the fact that i am using victor character control sprite, which i use to change the running poses of the party leaderr, but it doesn't work with the followers. The question is, is it to hard to make them compatible regarding changing the poses for everyone not just the party leader?

 Here's the link to the victor's character control script: http://victorscripts.wordpress.com/rpg-maker-vx-ace/utility-scripts/character-control/
Thanks to Ksjp17's observation, I got it working by changing the order of line 58 and putting it under line 61.

I can't guarantee it is bug free, my knowledge of scripting is limited.

We'll have to wait for an answer by Neon Black himself.

This is the fix I went with.  It was an oversight since I forgot to check how touch events worked.  Believe it or not, the change to that method actually does very little, just makes the player movement less jittery since there's 1/60 of a second every step that the player is standing still.

Anyway, updated this script to 1.0a.  You can get the fix from the main post or here.

EDIT: Also, Nosleinad.  Sorry but I don't work with Victor scripts. >:
I just wanted to say, I love this script!

It is very useful for my own game, where I have one follower and it is essential that she is seen as well. Thanks for doing this!
Hi, Neon Black. I've tried this script and I've got a question. How to make my followers jump together at a time to desirable position when the maps are divided by a river (or something that non-passable) into two areas? I mean, I made an event that my team must jump/leaping a wide river together. But when I playtested it, they jumps one by one instead. I've tried with passable tiles and it worked perfectly.

Sorry for my grammar and thank you for your answer.
Awesome script!
I have a question, i use a RUN script who change graphics at my hero when he run.

But wit this script, the party members run without change graphics.

The run script is this, how can i fix it?
Thank you

Spoiler
#==============================================================================
# ** Sprite_Character
#------------------------------------------------------------------------------
#  This sprite is used to display characters. It observes an instance of the
# Game_Character class and automatically changes sprite state.
#==============================================================================

class Sprite_Character < Sprite_Base
  #--------------------------------------------------------------------------
  # * OVERWRITE Update Transfer Origin Bitmap
  # Still "works" if this was aliased instead but the sprite graphic
  # would flash, since it would change to the default/non prefixed graphic
  # then back to the the one with the prefix.
  #--------------------------------------------------------------------------
  def update_bitmap
    update_dash
    if graphic_changed?
      @tile_id = @character.tile_id
      @character_name = @character.character_name if [email protected]?
      @character_index = @character.character_index
      if @tile_id > 0
        set_tile_bitmap
      else
        set_character_bitmap
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Adds "_dash" prefix to sprite if dashing
  #--------------------------------------------------------------------------
  def update_dash
    return unless @character.moving?
    return unless @character.dash?
    @character_name = @character.character_name + "_run"
  end
end
What about TDS followers control?, it does the same thing as victor, but I think it works different.

Original thread: https://forums.rpgmakerweb.com/threads/smart-er-followers.22847/