Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Animated Battlers! Maker XP and VX

Animated BattlersVersion: 1.0
By: Falcao

Introduction

Are you tire about that ESTATIC Battlers? here i bring you the best solution in an easy way.
This script allow you animate the battlers graphicts

Features
  • Breath effect in battlers

RPG Maker VX Script

Code:
 

#====================================================================#

#  #*****************#           Allow you animate battlers graphics #     

#  #*** By Falcao ***#           during the battle process           #          

#  #*****************#                                               #

#         RMVX                   Intrucciones: Copy and paste the    #

# makerpalace.onlinegoo.com      script to your project              #  

#====================================================================#

 

#--------------------------------------

# Animated Battlers 1.0 Falcao script

#-------------------------------------

 

class Game_Battler

  attr_accessor :zoom_x

  attr_accessor :zoom_y

  alias falcaoB_zoom_ini initialize

  def initialize

    falcaoB_zoom_ini

    @zoom_x = 1.0

    @zoom_y = 1.0

    @zoom_time = 0

  end

  def zoom(x,y)

    self.zoom_x = x

    self.zoom_y = y

  end

  def zoom_plus(x,y)

    self.zoom_x += x

    self.zoom_y += y

  end

  def zoom_less(x,y)

    self.zoom_x -= x

    self.zoom_y -= y

  end

 

  def breath

    @zoom_time += 1

    if @zoom_time <= 50

     zoom_plus(0.002,0.002)

    end

    if @zoom_time >= 50

      zoom_less(0.002,0.002)

      if self.zoom_x <= 1

        zoom(1,1); @zoom_time = 0

      end

    end

  end

 

  def breath_slow

    @zoom_time += 1

    if @zoom_time <= 50

     zoom_plus(0.001,0.001)

    end

    if @zoom_time >= 50

      zoom_less(0.001,0.001)

      if self.zoom_x <= 1

        zoom(1,1); @zoom_time = 0

      end

    end

  end

end

 

class Sprite_Battler < Sprite_Base

  alias falcaoBattler_zoom_update update

  def update

     falcaoBattler_zoom_update

     if @zoom_x != @battler.zoom_x or

       @zoom_y != @battler.zoom_y

       @zoom_x = @battler.zoom_x

       @zoom_y = @battler.zoom_y       

       self.zoom_x = @battler.zoom_x

       self.zoom_y = @battler.zoom_y

     end

  end

  alias falcaoBattler_update update_battler_bitmap

  def update_battler_bitmap

    falcaoBattler_update

    if @height <= 200

      @battler.breath

    elsif @height > 200

      @battler.breath_slow

    end

  end

end

 

 


RPG Maker XP Script

Code:
 

#====================================================================#

#  #*****************#           Allow you animate battlers graphics #     

#  #*** By Falcao ***#           during the battle process           #          

#  #*****************#                                               #

#         RMVX                   Intrucciones: Copy and paste the    #

# makerpalace.onlinegoo.com      script to your project              #  

#====================================================================#

 

 

module Falcao

 

# Animate actor battlers change true or false  

IncludeActors = false

  

end

 

class Game_Battler

  attr_accessor :zoom_x

  attr_accessor :zoom_y

  alias falcaoB_zoom_ini initialize

  def initialize 

    falcaoB_zoom_ini

    @zoom_x = 1.0

    @zoom_y = 1.0

    @zoom_time = 0

    @actor_breath = 0

  end

  def zoom(x,y)

    self.zoom_x = x

    self.zoom_y = y

  end

  

  def zoom_plus(x,y)

    self.zoom_x += x

    self.zoom_y += y

  end

  def zoom_less(x,y)

    self.zoom_x -= x

    self.zoom_y -= y

  end

  

  def breath

    @zoom_time += 1

    x = 0.002; y = 0.002

    if @zoom_time <= 50

     zoom_plus(x,y)

    end

    if @zoom_time >= 50

      zoom_less(x,y)

      if self.zoom_x <= 1

        zoom(1,1); @zoom_time = 0

      end

    end

  end

  

  def breath_slow

    @zoom_time += 1

    if @zoom_time <= 50

     zoom_plus(0.001,0.001)

    end

    if @zoom_time >= 50

      zoom_less(0.001,0.001)

      if self.zoom_x <= 1

        zoom(1,1); @zoom_time = 0

      end

    end

  end

  

  def breath_actors

    @actor_breath += 5

    if @actor_breath <= 30

     zoom_plus(0.004,0.004)

    end

    if @actor_breath >= 30 

      zoom_less(0.004,0.004)

      if self.zoom_x <= 1

        zoom(1,1); @actor_breath = 0

      end

    end

  end

end

 

class Sprite_Battler < RPG::Sprite

  alias falcaoBattler_zoom_update update

  def update 

     falcaoBattler_zoom_update

     if @zoom_x != @battler.zoom_x or

       @zoom_y != @battler.zoom_y

       @zoom_x = @battler.zoom_x

       @zoom_y = @battler.zoom_y       

       self.zoom_x = @battler.zoom_x

       self.zoom_y = @battler.zoom_y

     end 

     if @height <= 200

      @battler.breath

    elsif @height > 200

      @battler.breath_slow

    end

    if @battler.is_a?(Game_Actor)

      if Falcao::IncludeActors == true 

         @battler.breath_actors

       else

       @battler.zoom(1,1)

      end

    end

  end

end

 

Instructions

Copy and paste the script to your poject. Yeah! very easy

Compatibility

Sprite_Battler < Sprite_Base aliased

Credits and Thanks

By Falcao

Terms and Conditions

Can be used in comercial or non-comercial games
 
Is this plug 'n play for VX? Also, does this work with Takentai? Because I'm getting an error:

Script animated battlers 'line 67: NoMethodError occured
undefined method zoom_x for nil:NilClass
 
SuperMega":1g3r9rmv said:
Is this plug 'n play for VX? Also, does this work with Takentai? Because I'm getting an error:

Script animated battlers 'line 67: NoMethodError occured
undefined method zoom_x for nil:NilClass

You mean the tenkentai CBS from Atoa?

Thats for maker xp right?

Let me try this script in that scripts system
 
falcao":2750rygv said:
SuperMega":2750rygv said:
Is this plug 'n play for VX? Also, does this work with Takentai? Because I'm getting an error:

Script animated battlers 'line 67: NoMethodError occured
undefined method zoom_x for nil:NilClass

You mean the tenkentai CBS from Atoa?

Thats for maker xp right?

Let me try this script in that scripts system
Nope, I mean Takentai for RPG Maker VX. It's made by Enu.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top