Character index change when running

I found this script that changes the character when dashing, but I have two issues with it.
The first is, it will change the character filename, but what I wanted was it to change the character index; specifically, for it to jump 2 indexes like this:
upload_2019-8-18_21-16-11.png


The other issue is that it will only affect the party leader, and I wanted it to affect all party members (including those on reserve/off-battle)
Simply change this line
Code:
@character_name = @character.character_name + "_dash"
to this line
Code:
@character_index = @character_index + N
# set N to be the distance between the current and the next sprite
# Sprites Index:
# 0 1 2 3
# 4 5 6 7

The second issue can be solved by telling the engine that the followers are dashing as well. You can do it using this:
Code:
class Game_Follower < Game_Character
  def dash?
    $game_player.dash?
  end
  def real_move_speed
    $game_player.real_move_speed
  end
end
This way followers will retain the dash flag if the player has is dashing.

EDIT
Party members that are not followers do not have a sprite. As such, you cannot change their sprite, not in the game map at least, unless you completely modify how the Game_Followers class works.
I forgot to mention that I'm using a script that shows 4 characters in formation, but only 3 will be in battle 😛

Anyway, I tried to do that, but for some reason it won't change.
While the issue with this particular script is not solved, I managed to edit Galv's Character Animations to fill my needs, so here's the modifications if anyone wants it:

Spoiler
Comment out lines 81, 85-92 and 121

And change lines 94-107 with this:

Code:
def move_anim
    c = $game_party.leader.character_index
    if $game_player.dash?
      if c != [2,6]
        $game_party.members.each { |m| m.set_g(2) } if c = 0
        $game_party.members.each { |m| m.set_g(6) } if c = 4
        $game_player.refresh
      end
    else
      if c != [0,4]
        $game_party.members.each { |m| m.set_g(0) } if c = 2
        $game_party.members.each { |m| m.set_g(4) } if c = 6
        $game_player.refresh
      end
    end
    @idletime = 0
  end

This will remove the idle animation though.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/character-index-change-when-running.112324/