Main Menu
  • Welcome to The RPG Maker Resource Kit.

[VXA] Stopped Actor Stepping Animation

Started by modern algebra, April 26, 2012, 05:09:33 PM

0 Members and 1 Guest are viewing this topic.

modern algebra

Stopped Actor Stepping Animation
Version: 1.0
Author: modern algebra
Date: April 26, 2012

Version History




  • <Version 1.0> 2012.04.26 - Original Release

Description



This script allows you to set actors who will have a stepping animation when controlled as the player or on the map as a follower. It is useful for characters like flying actors who need to have a stepping animation even when stopped.

Features


  • Allows you to specify actors that will have a stepping animation even when stopped.
  • Works both for the player character and followers.

Instructions

Paste this script into its own slot in the Script Editor, above Main but below Materials.

All that you need to do is specify which actors should have a stepping animation by placing the following code in an actor's notebox:

      \Step

Script




#==============================================================================
#    Stopped Actor Stepping Animation
#    Version: 1.0
#    Author: modern algebra (rmrk.net)
#    Date: April 26, 2012
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Description:
#   
#    This script allows you to set actors who will have a stepping animation
#   when controlled as the player or on the map as a follower. It is useful for
#   characters like flying actors who need to have a stepping animation even
#   when stopped.
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Instructions:
#   
#    Paste this script into its own slot in the Script Editor, above Main but
#   below Materials.
#
#    All that you need to do is specify which actors should have a stepping
#   animation by placing the following code in an actor's notebox:
#
#        \Step
#==============================================================================

$imported ||= {}
$imported[:"MA_ActorStepping_1.0"] = true

#==============================================================================
# ** Game_Actor
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    new attr_writer - maas_step_anime=
#    new method - maas_step_anime
#==============================================================================

class Game_Actor
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Public Instance Variables
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  attr_writer :maas_step_anime
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Step Animation?
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def maas_step_anime
    @maas_step_anime = !actor.note[/\\STEP/i].nil? if !@maas_step_anime
    @maas_step_anime
  end
end

#==============================================================================
# ** Game_Player
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    aliased method - refresh
#==============================================================================

class Game_Player
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Refresh
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias maas_refresh_3jv8 refresh
  def refresh(*args, &block)
    maas_refresh_3jv8(*args, &block) # Call Original Method
    @step_anime = actor ? actor.maas_step_anime : false
  end
end

#==============================================================================
# ** Game_Follower
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    aliased method - update_anime_count
#==============================================================================

class Game_Follower
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Update Animation Count
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias maas_updatanimcnt_4vx9 update_anime_count
  def update_anime_count(*args, &block)
    @step_anime = actor ? actor.maas_step_anime : false
    maas_updatanimcnt_4vx9(*args, &block) # Call Original Method
  end
end


Credit




  • modern algebra

Thanks


  • Scalinger2, for the request

Support



Please post in this thread at RMRK if you have any questions or encounter any errors. Please do not PM me or start a new topic for support, no matter how old is this thread. The reason for that is that any question or problem you have is likely shared by others, and I would like whatever answer I can give to benefit as many people as possible by being both public and conveniently accessed.

Known Compatibility Issues

I am so far unaware of any compatibility issues.

Terms of Use



I adopt the Terms of Use for RMVXA Scripts Database.

Mushu


oriceles

I was looking for this too. Thank you MA :D