RGSS3 - Custom idle animation speed

ZirconStorms

Veteran
Veteran
Joined
Dec 22, 2014
Messages
359
Reaction score
111
First Language
English
Primarily Uses
RMVXA
(For Galv’s Character Animations V.2.1 https://galvs-scripts.com/galvs-character-animations/ )
How would someone set up a custom speed for the idle animation? (In my case, a slower animation speed).
Currently, the idle animation plays at whatever speed is set for the player's movement, which looks a bit awkward. This would be used with a regular 3-frame character sprite.
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,248
Reaction score
1,250
First Language
Spanish
Primarily Uses
RMVXA
you should modify Game_CharacterBase::update_animation, which is not in the script.
maybe in a requirement?
Code:
class Game_CharacterBase
  CHR_FPS = 8
  def init_private_members
    @original_direction = 2
    @original_pattern = 0
    @anime_count = 0
    @stop_count = 0
    @jump_count = 0
    @jump_peak = 0
    @locked = false
    @prelock_direction = 0
    @move_succeed = true
  end
 
  def update_animation
    update_anime_count
    if @anime_count > CHR_FPS - real_move_speed #* 2
      update_anime_pattern
      @anime_count = 0
    end
  end
 
  def update_anime_count
    if moving? && @walk_anime
      @anime_count += 1.5
    elsif @step_anime || @pattern != @original_pattern
      @anime_count += 1
    end
  end
 
  def reset_pattern
    @pattern = 1
  end
 
  def update_anime_pattern
    if !@step_anime && @stop_count > 0
      @pattern = @original_pattern
    else
      @pattern += 1
    end
  end
end
my mod, for a custom work.... not sure if it would suit you, but that's what you have to fix.
 

ZirconStorms

Veteran
Veteran
Joined
Dec 22, 2014
Messages
359
Reaction score
111
First Language
English
Primarily Uses
RMVXA
you should modify Game_CharacterBase::update_animation, which is not in the script.
maybe in a requirement?
Code:
class Game_CharacterBase
  CHR_FPS = 8
  def init_private_members
    @original_direction = 2
    @original_pattern = 0
    @anime_count = 0
    @stop_count = 0
    @jump_count = 0
    @jump_peak = 0
    @locked = false
    @prelock_direction = 0
    @move_succeed = true
  end
 
  def update_animation
    update_anime_count
    if @anime_count > CHR_FPS - real_move_speed #* 2
      update_anime_pattern
      @anime_count = 0
    end
  end
 
  def update_anime_count
    if moving? && @walk_anime
      @anime_count += 1.5
    elsif @step_anime || @pattern != @original_pattern
      @anime_count += 1
    end
  end
 
  def reset_pattern
    @pattern = 1
  end
 
  def update_anime_pattern
    if !@step_anime && @stop_count > 0
      @pattern = @original_pattern
    else
      @pattern += 1
    end
  end
end
my mod, for a custom work.... not sure if it would suit you, but that's what you have to fix.
Did some adjustments and it works great. Thank you!
 

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,047
Members
137,569
Latest member
Shtelsky
Top