Battlers Flip Animation

MeowFace

Meow
Veteran
Joined
Feb 22, 2015
Messages
1,034
Reaction score
184
First Language
Meowish
Primarily Uses
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:

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
 
Last edited by a moderator:

MeowFace

Meow
Veteran
Joined
Feb 22, 2015
Messages
1,034
Reaction score
184
First Language
Meowish
Primarily Uses
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
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c

Forum statistics

Threads
105,857
Messages
1,017,018
Members
137,563
Latest member
MinyakaAeon
Top