The RPG Maker Resource Kit

RMRK RPG Maker Creation => VX => VX Scripts Database => Topic started by: modern algebra on February 20, 2008, 05:34:19 AM

Title: Stop Animation Actors
Post by: modern algebra on February 20, 2008, 05:34:19 AM
Stop Animation Actors
Version: 1.0
Author: modern algebra
Date: February 20th, 2008


Description


Requested by Forcystus, this script allows you to set certain actors to have stop animation when they are the leader (thus on the map screen). Stop animation can be useful for flying units for instance, as it doesn't make any sense for them not to be flapping their wings at any time. It only effects the party member who is the leader. It has no influence on Caterpillar scripts.

Features


Instructions

Just paste this code above main. Then, set up the actors in the STOP_ANIMATION_ACTORS array by placing the IDs of the actors who you want to have stop animation.

Script


Code: [Select]
#======================================================================
#  Stop Animation Actors
#  Author: modern algebra (rmrk.net)
#  Date: February 20, 2008
#======================================================================
# ** Game_Player
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  Summary of Changes:
#     aliased method - refresh
#======================================================================

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 actors 1 and 3 would have 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.members[0].id)
  end
end

Credit


No credit is necessary for such a simple script, but it was written by me

Support


Please post your questions here if you run into problems

Author's Notes


This, when I made it for RMXP, was just released as a scriptlet. But, I figure I will test releasing them independently to see what happens. Once the VX database gets more scripts I will probably merge them all back into the Useful Scriptlets topic. It really is the exact same as the XP version


Creative Commons License
This script by modern algebra is licensed under a Creative Commons Attribution-Non-Commercial-Share Alike 2.5 Canada License.