Changing the character animation speed

Status
Not open for further replies.

Pluto

(a dog)
Member
Joined
Nov 16, 2013
Messages
12
Reaction score
0
First Language
French
Primarily Uses
Hello everyone!

How is it possible to calibrate the framerate for an animated character?

For example I use the script line "@move_speed = ##" in the "Set Move Route" command to decide how quick a character will walk/run on the map.

So is there a simple line like "@animation_speed = ##" I could put in the script space of Move Route to resolve my animation problem?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
You are probably thinking of @move_frequency
 

Pluto

(a dog)
Member
Joined
Nov 16, 2013
Messages
12
Reaction score
0
First Language
French
Primarily Uses
: (

I've put "@move_frequency = ##" in the set move route script space and It doesn't do anything. 

Am I writing it in the wrong place?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Should work. Is your event actually moving? Do you have Walking Animation checked? I assume you just mean the speed at which the event's sprite itself changes as it's moving. If you're actually talking about an ANIMATION (as in the Show Animation) command, that's a different thing and is not really modifiable without changing the animation itself in the database tab.
 

Pluto

(a dog)
Member
Joined
Nov 16, 2013
Messages
12
Reaction score
0
First Language
French
Primarily Uses
Ahh that's a bummer.. Yes my goal is to only change the animation framerate of a character even if it's walking on place.

I've seen that there is a solution to my problem on this forum topic here but unfortunately all the links are dead.

Maybe this could be a clue..
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Here you go ... add this into a new script slot below Materials. This OVERWRITES the update_animation method of Game_CharacterBase, so it must go above any other scripts that alias that method.

Code:
class Game_CharacterBase  attr_accessor :anim_speed  alias shaz_animspeed_game_characterbase_init_public_members init_public_members  def init_public_members    shaz_animspeed_game_characterbase_init_public_members    @anim_speed = 18  end  def update_animation    update_anime_count    if @anime_count > @anim_speed - real_move_speed * 2      update_anime_pattern      @anime_count = 0    end  endend
In a Set Move Route command, do @anim_speed = x in a script call. x is 18 by default. Make it lower to speed up the animation, and higher to slow it down. Just changing it to 9 or 27 makes a huge difference.
 

Pluto

(a dog)
Member
Joined
Nov 16, 2013
Messages
12
Reaction score
0
First Language
French
Primarily Uses
This seems to be the right direction you are pointing to me!

But now I am doubtful,

does this piece of script works for RPGmaker XP?
 
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
ah, wish I'd seen that initially. Try this instead:

Code:
class Game_Character  attr_accessor :anim_speed  alias shaz_animspeed_game_character_initialize initialize  def initialize    shaz_animspeed_game_character_initialize     @anim_speed = 18  end  #--------------------------------------------------------------------------  # * Frame Update  #--------------------------------------------------------------------------  def update    # Branch with jumping, moving, and stopping    if jumping?      update_jump    elsif moving?      update_move    else      update_stop    end    # If animation count exceeds maximum value    # * Maximum value is move speed * 1 taken from basic value 18    if @anime_count > @anim_speed - @move_speed * 2      # If stop animation is OFF when stopping      if not @step_anime and @stop_count > 0        # Return to original pattern        @pattern = @original_pattern      # If stop animation is ON when moving      else        # Update pattern        @pattern = (@pattern + 1) % 4      end      # Clear animation count      @anime_count = 0    end    # If waiting    if @wait_count > 0      # Reduce wait count      @wait_count -= 1      return    end    # If move route is forced    if @move_route_forcing      # Custom move      move_type_custom      return    end    # When waiting for event execution or locked    if @starting or lock?      # Not moving by self      return    end    # If stop count exceeds a certain value (computed from move frequency)    if @stop_count > (40 - @move_frequency * 2) * (6 - @move_frequency)      # Branch by move type      case @move_type      when 1  # Random        move_type_random      when 2  # Approach        move_type_toward_player      when 3  # Custom        move_type_custom      end    end  endend
 
Last edited by a moderator:

Pluto

(a dog)
Member
Joined
Nov 16, 2013
Messages
12
Reaction score
0
First Language
French
Primarily Uses
Yipee!

Shaz! Thank you so much!

It is working perfectly!

This is going to change the quality of my project big time! I'll make sure to credit you in my game!

Have a good night Shaz! 
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
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.
 
Status
Not open for further replies.

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

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,853
Messages
1,016,986
Members
137,561
Latest member
visploo100
Top