The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Scripting => Topic started by: Forty on January 23, 2008, 12:07:19 AM

Title: Minor edit to script
Post by: Forty on January 23, 2008, 12:07:19 AM
What could I do to make the main character use stop animation instead of move animation?
Title: Re: Minor edit to script
Post by: kathis on February 09, 2008, 07:57:55 AM
Forgive me for asking, but what is it exactly that you want to do?
Title: Re: Minor edit to script
Post by: modern algebra on February 10, 2008, 03:31:56 AM
I take it he wants the character on map to be animated at all times, even when stationary.

There is probably a way to do it without scripts, but since I am unaware of it I wrote a quick script.


#==============================================================================
# ** Game_Player
#------------------------------------------------------------------------------
#  This class handles the player. Its functions include event starting
#  determinants and map scrolling. Refer to "$game_player" for the one
#  instance of this class.
#==============================================================================

class Game_Player
 
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  #  Place the IDs of the characters who should have stop animation active,
  #  like so:
  #
  #    STOP_ANIMATION_ACTORS = [1, 3]
  #
  #  That would make it so actors 1 and 3 have stop animation. By default,
  #  that would mean Aluxes and Cyrus would animate even when stopped
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
  STOP_ANIMATION_ACTORS = []
 
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Refresh
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias ma_player_stop_animation_refresh refresh
  def refresh
    ma_player_stop_animation_refresh
    @step_anime = STOP_ANIMATION_ACTORS.include? ($game_party.actors[0].id)
  end
end