Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
  • 0
Sign in to follow this  
Bigace360

walking animation in the menu

Question

I couldn't figure out the snippet to add to the Main menu to give characters a walking animation instead of just in there standing image. Hopefully that made sense.

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Is this what you are looking for?

 

 

class Window_MenuStatus < Window_Selectable

 alias :new_init_char :initialize unless $@

 def initialize
   new_init_char
   @pattern = 0
   @anime_count = 0
 end

 def refresh_actor_graphic
   for i in 0...$game_party.actors.size
     x = 24
     y = i * 116 + 80
     actor = $game_party.actors[i]
     bitmap = RPG::Cache.character( actor.character_name, actor.character_hue )
     cw = bitmap.width / 4
     ch = bitmap.height / 4
     # Get actor graphic coordinates:    
     x -= cw / 2
     y -= ch
     # Clear actor graphic
     self.contents.fill_rect( x, y, cw, ch, Color.new( 0,0,0,0 ) )
     src_rect = Rect.new( @pattern * cw , 0, cw, ch )
     # Redraw new frame
     self.contents.blt( x, y, bitmap, src_rect )
   end
 end

 def update
   super
   @anime_count += 1
   if @anime_count > 10
     @pattern = ( @pattern + 1 ) % 4
     @anime_count = 0
     refresh_actor_graphic
   end
 end   
end

 

 

If you want me to explain how I developed this solution, let me know :)

Share this post


Link to post
Share on other sites
  • 0

Thank you very much again kell :alright: . You can tell me how you did this, because the real reason I needed this script was I wanted to give my monster album more depth instead of a giant image in the back that looks really retarded.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...