Smart(er) Followers

Neon Black

The Classy Prostitute
Member
Joined
Mar 17, 2012
Messages
1,149
Reaction score
371
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,337
Reaction score
2,505
First Language
French
Primarily Uses
RMVXA
Great script!

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

Dalph

Nega Ralph™ (Overlord of Memes)
Veteran
Joined
Jul 15, 2013
Messages
7,780
Reaction score
19,559
First Language
Italian Curses
Primarily Uses
RMMV
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,337
Reaction score
2,505
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
21,999
Reaction score
11,309
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,337
Reaction score
2,505
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
Member
Joined
Mar 17, 2012
Messages
1,149
Reaction score
371
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
Member
Joined
Mar 17, 2012
Messages
1,149
Reaction score
371
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,485
Reaction score
2,054
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
272
Reaction score
130
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:

Oriceles

0 + a.atk * 4 - b.def * 2
Veteran
Joined
Apr 4, 2012
Messages
384
Reaction score
70
First Language
English
Primarily Uses
N/A
What about TDS followers control?, it does the same thing as victor, but I think it works different.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Newest RPG Maker drops: hey fellas, get on the MZ train to somewhere

Me: Building my VX Ace lego tower, blissfully unaware of time moving forward
When you are trying to make progress in your game. But something is stopping your motivation. Like come on mind! Let me do what I want! :<
Tfw everyone is trying their hardest to brainstorm about unique ideas and game mechanics, here I am just going: "How am I gonna event conversations with busts" everyday. :kaoswt2:
Comedy is third person, tragedy is first person.
Man. A historic 130 year old church nearby had all of its windows broken out with bricks last night. Such a shame, it wasn't generic stained glass patterns either but had beautifully crafted murals depicting various parts of the gospels.

Forum statistics

Threads
99,320
Messages
964,136
Members
130,928
Latest member
LadyElselin
Top