Battlers Flip Animation

● ARCHIVED · READ-ONLY
Started by MeowFace 2 posts View original ↗
  1. Made for a request here.

    This script simply animate the battlers by flipping their image.

    (As shown in the example below but with one difference, each battler has its own move timer, they will not be moving at the same time.)



    This is mainly for frontal battler's image only, those image facing left or right might turns up wacky or weird.

    I might find time to add more features to support non-flippable images if there are demands for it. But don't raise your hope too much. ;)



    Features:

    Animated Battlers via image flip

    How to Use:

    Plug and Play, Just paste this script below Material and Above Main

    The battler's image should automatically be animated in the battles.

    IMPORTANT NOTE:

    Not all battler's image are suitable for a flip animation.

    So please take your time to go through the RTP to find a suitable battler's image if you are not planning to make your own.

    For those who wish to make your own, try to have symmetry in mind and you should be fine.

    RTP Example:



    Compatibility:

    This script modifies and overwrite the way battler's sprite are handled.

    If you have other scripts that modifies battler's sprite, there's a high chance of conflict.

    Terms of Use:

    Free for both Commercial and Non-Commercial

    Script:

    Spoiler
    Code:
    #==============================================================================# ■ Meow Face Battler Flip Animation#------------------------------------------------------------------------------# Animate Battlers with Flip and stop when hit effect is running#==============================================================================# How to Use:# [1] Plug & Play#==============================================================================class Sprite_Battler < Sprite_Base  def initialize(viewport, battler = nil) #Overwrite    super(viewport)    @battler = battler    @battler_visible = false    @effect_type = nil    @effect_duration = 0    @stop_flip = false    @flip_counter = rand(30)    self.mirror = (rand(2) == 0)  end  def update_effect #Overwrite    if @effect_duration > 0      @effect_duration -= 1      @stop_flip = true      case @effect_type      when :whiten        update_whiten      when :blink        update_blink      when :appear        update_appear      when :disappear        update_disappear      when :collapse        update_collapse      when :boss_collapse        update_boss_collapse      when :instant_collapse        update_instant_collapse      end      @effect_type = nil if @effect_duration == 0      @stop_flip = false if @effect_duration == 0      @flip_counter = 30 if @effect_duration == 0    end  end  def flip_self #New    if self.mirror == true      self.mirror = false    else      self.mirror = true    end  end  alias meow_sb_update update  def update #Alias    if @flip_counter >= 0      @flip_counter -=1      flip_self if @flip_counter == 0 && !@stop_flip      @flip_counter = 15 if @flip_counter <= 0    end    meow_sb_update  endend
  2. The script in the top post is being messed up due to the recent V3 to V4 forum migration.


    Please use this alternative version until the web staff is able to find a way to fix the top post.

    Code:
    #==============================================================================
    # ■ Meow Face Battler Flip Animation
    #------------------------------------------------------------------------------
    # Animate Battlers with Flip and stop when hit effect is running
    #==============================================================================
    # How to Use:
    # [1] Plug & Play
    #==============================================================================
    class Sprite_Battler < Sprite_Base
      def initialize(viewport, battler = nil) #Overwrite
        super(viewport)
        @battler = battler
        @battler_visible = false
        @effect_type = nil
        @effect_duration = 0
        @stop_flip = false
        @flip_counter = rand(30)
        self.mirror = (rand(2) == 0)
      end
      def update_effect #Overwrite
        if @effect_duration > 0
          @effect_duration -= 1
          @stop_flip = true
          case @effect_type
          when :whiten
            update_whiten
          when :blink
            update_blink
          when :appear
            update_appear
          when :disappear
            update_disappear
          when :collapse
            update_collapse
          when :boss_collapse
            update_boss_collapse
          when :instant_collapse
            update_instant_collapse
          end
          @effect_type = nil if @effect_duration == 0
          @stop_flip = false if @effect_duration == 0
          @flip_counter = 30 if @effect_duration == 0
        end
      end
      def flip_self #New
        if self.mirror == true
          self.mirror = false
        else
          self.mirror = true
        end
      end
      alias meow_sb_update update
      def update #Alias
        if @flip_counter >= 0
          @flip_counter -=1
          flip_self if @flip_counter == 0 && !@stop_flip
          @flip_counter = 15 if @flip_counter <= 0
        end
        meow_sb_update
      end
    end