Changing the walking animation
#8
Found an old script by Yeyinde floating around my hard drive:

Code:
#==============================================================================
# ** Miniscript: Character Animation
#------------------------------------------------------------------------------
#  By Yeyinde (August 14, 2006)
#  This is just a little script that changes the way a characterset animations
#  plays.  It makes the first frame an 'idle pose', and uses the next three
#  frames as the animation (Much like in RM2K).
#
#  Insert the code above Main:
#
#==============================================================================


#==============================================================================
# ** Game_Character
#------------------------------------------------------------------------------
#  This class deals with characters. It's used as a superclass for the
#  Game_Player and Game_Event classes.
#==============================================================================

class Game_Character
  alias old_initialize initialize
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    old_initialize
    @pattern_count = 0
  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 > 18 - @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
        @pattern_count = 0
      # If stop animation is ON when moving
      else
        # Update pattern
        @pattern_count = (@pattern_count + 1) % 4
        case @pattern_count
        when 0
          @pattern = 2
        when 1
          @pattern = 1
        when 2
          @pattern = 2
        when 3
          @pattern = 3
        end
      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
  end
end

Enjoy
Reply }


Messages In This Thread
Changing the walking animation - by shadow040 - 01-08-2010, 09:57 PM
[Resolved] Changing the walking animation - by DerVVulfman - 01-20-2010, 01:44 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
   Animation Action justpassingby 16 17,904 11-06-2017, 01:59 AM
Last Post: justpassingby
   Atoa Custom Battle System CTB animation while cast Noctis 6 10,719 01-04-2016, 03:05 PM
Last Post: Noctis
   [Brainstorming] Pallete Changing. MechanicalPen 6 7,761 02-14-2014, 09:46 PM
Last Post: DerVVulfman
  Changing Window Styles in Game JackMonty 8 11,011 03-22-2013, 11:54 PM
Last Post: JackMonty
   Help with changing background music volume JackMonty 7 9,461 12-10-2012, 10:59 AM
Last Post: JackMonty
   Help editing Animation Resizer MechanicalPen 3 5,979 11-22-2012, 08:39 PM
Last Post: MechanicalPen
   Auto-play Character animation Taylor 0 3,083 05-30-2012, 11:56 AM
Last Post: Taylor
   [Atoa SBS] Changing the command window font MegaPowerNinja 3 8,323 04-12-2011, 10:23 PM
Last Post: Victor Sant
   changing stat effects for the defualt batle system? corpsegirl 13 17,499 10-25-2010, 08:15 PM
Last Post: corpsegirl
   XAS Battle System, changing Leader pez 6 9,516 09-17-2009, 06:28 PM
Last Post: Legacy



Users browsing this thread: 2 Guest(s)