[VXA] Stopped Actor Stepping Animation

0 Members and 1 Guest are viewing this topic.

*
Rep:
Level 97
2014 Best RPG Maker User - Engine2014 Most Unsung Member2013 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best RPG Maker User (Scripting)2011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best Use of Avatar and Signature Space2010 Favourite Staff Member2010 Most Mature Member
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


Code: [Select]
#==============================================================================
#    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.
« Last Edit: January 31, 2013, 09:48:27 PM by modern algebra »

****
Rep:
Level 69
It works perfect, thank you MA! ;8

**
Rep:
Level 64
Do the evolution baby
I was looking for this too. Thank you MA :D