Changing the walking animation
#1
Hey I'm getting back into RPG maker after taking a couple of years of computing and I thought I'd try out some custom scripting, thing is I don't understand much about the language, but I'm sure over time I'll pick it up, it looks familiar.

Anyway onto my question, I've imported a character and assumed the first frame was the idle standing frame and the next three were walking frames, but this doesn't seem to be the case. Because of the way I have my character walking, by using the normal system he would have to be frozen mid-walking when he stopped.

In short: I want to make it so my characters only cycle through frames 2-4 while walking, preferably going 2-3-4-3-2-3-4-3 ect and only use frame 1 while standing.

Thanks in advance.
Reply }
#2
What i found out is that the walking cycle is standing right foot standing left foot and it goes through the cycle like normal .
Reply }
#3
jubhub731 Wrote:What i found out is that the walking cycle is standing right foot standing left foot and it goes through the cycle like normal .
But I'd like to code it so it didn't work like that, I want it to be in frame 1 while idle and then cycle through like 2-3-4-3-2 when moving, I want to know where about in the code to change that
Reply }
#4
You'll have an easier time having an "idle" script. It essentially calls for a different graphic sheet for the idle pose whenever the player isn't pushing the directional buttons. You can also have an animated idle pose with it. I'd offer the one I'm currently asking, but the author asked me to not distribute it. I can tell you that it's a fairly simple code snippet :)
Reply }
#5
Lunarea Wrote:You'll have an easier time having an "idle" script. It essentially calls for a different graphic sheet for the idle pose whenever the player isn't pushing the directional buttons. You can also have an animated idle pose with it. I'd offer the one I'm currently asking, but the author asked me to not distribute it. I can tell you that it's a fairly simple code snippet :)

Oh that sounds great, if you cant tell me it could you tell me the person to ask about it?
Reply }
#6
I'll see if I can get in touch with her. I talked with her on a different forum, but haven't seen her in a while.
Reply }
#7
I'm still looking for this if anyone could provide assistance
Reply }
#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 }
#9
DerVVulfman Wrote: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
Thank you so much, this really helps
Reply }


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



Users browsing this thread: 1 Guest(s)