Smart(er) Followers

Neon Black

The Classy Prostitute
Veteran
Joined
Mar 17, 2012
Messages
1,149
Reaction score
374
First Language
Sarcasm
Primarily Uses
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!
 
Last edited by a moderator:

cabfe

Cool Cat
Veteran
Joined
Jun 13, 2013
Messages
2,353
Reaction score
2,549
First Language
French
Primarily Uses
RMVXA
Great script!

The followers seem to move more naturally now, contrary to the caterpillar default.
 

Dalph

Nega Ralph™ (RM Tyrant)
Veteran
Joined
Jul 15, 2013
Messages
7,769
Reaction score
19,642
First Language
Italian Curses
Primarily Uses
RMMZ
May God bless you, I also hate followers like the pest, but I may consider changing my tastes with this thing.
 

cabfe

Cool Cat
Veteran
Joined
Jun 13, 2013
Messages
2,353
Reaction score
2,549
First Language
French
Primarily Uses
RMVXA
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.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
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.
 

cabfe

Cool Cat
Veteran
Joined
Jun 13, 2013
Messages
2,353
Reaction score
2,549
First Language
French
Primarily Uses
RMVXA
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.
 

Neon Black

The Classy Prostitute
Veteran
Joined
Mar 17, 2012
Messages
1,149
Reaction score
374
First Language
Sarcasm
Primarily Uses
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.
 

Nosleinad

Storyteller
Veteran
Joined
Dec 12, 2012
Messages
351
Reaction score
29
First Language
Portuguese
Primarily Uses
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/
 

Neon Black

The Classy Prostitute
Veteran
Joined
Mar 17, 2012
Messages
1,149
Reaction score
374
First Language
Sarcasm
Primarily Uses
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. >:
 
Last edited by a moderator:

Candacis

Pixel Pusher
Restaff
Joined
May 2, 2012
Messages
1,652
Reaction score
2,547
First Language
German
Primarily Uses
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!
 

sokita

Crawling back to the surface
Veteran
Joined
Apr 27, 2014
Messages
198
Reaction score
29
First Language
Indonesian
Primarily Uses
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.
 

Lakaroth

Veteran
Veteran
Joined
Dec 9, 2014
Messages
274
Reaction score
132
First Language
English
Primarily Uses
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

#==============================================================================
# ** 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 !@character.dash?
      @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
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,049
Members
137,570
Latest member
fgfhdfg
Top