!!

Welcome to Save Point!

Formerly known as RMVXP, Save-Point is a game creational forum that aids users in creating games using software like RPG Maker or Game Maker. Support is also available today for members and members can also upload and download resources and scripts to use in their games. If you are new or experienced we welcome you to register.

Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[XP Script] Modify Battler Collapse Effect
PK8 Offline
I am the enemy. I am the antidote.

*****
Posts: 1,731
Joined: May 2009
View My Download Submissions
Thanks: 25
Given 8 thank(s) in 29 post(s)

Save Points: 8,947sp
Items: (View All Items)
Awards:

Gender: Undisclosed
Favorite Maker: RPG Maker XP
Post: #1
Modify Battler Collapse Effect

Modify Battler Collapse Effect
Version 1.1

Screenshots
[Image: 34nh4kg.png]
[Image: i6mjc0.png]

Demo
No demo yet.

Script
Code:
=begin
╔══════════════════════════════════════════════════════════════════════════════╗​
║ Modify Battler Collapse Effect 1.1 (formerly known as Battler Collapse Color)║
║ by PK8                                                                       ║
║ Created: 11/18/2009                                                          ║
║ Modified: 4/2/2012                                                           ║
╟──────────────────────────────────────────────────────────────────────────────╢​
║ ■ Table of Contents                                                          ║
║   ○ Author's Notes                - Line 15-17                               ║
║   ○ Introduction & Description    - Line 19-21                               ║
║   ○ Features                      - Line 23,24                               ║
║   ○ Methods Aliased               - Line 26,27                               ║
║   ○ Thanks                        - Line 29,30                               ║
║   ○ Changelog                     - Line 32-35                               ║
╟──────────────────────────────────────────────────────────────────────────────╢​
║ ■ Author's Note                                                              ║
║ When I first wrote the script a few years ago, it was moreorless me trying to║
║ see what else I could do in scripting. I was running out of ideas at the time║
╟──────────────────────────────────────────────────────────────────────────────╢​
║ ■ Introduction & Description                                                 ║
║ This script lets you modify the blend type, color, duration, and animation   ║
║ of the Collapse effect.                                                      ║
╟──────────────────────────────────────────────────────────────────────────────╢​
║ ■ Features                                                                   ║
║ Modify color, blend type, duration, and animation of the collapse effect.    ║
╟──────────────────────────────────────────────────────────────────────────────╢​
║ ■ Methods Aliased                                                            ║
║ ● collapse of Sprite < ::Sprite class in the RPG module.                     ║
╟──────────────────────────────────────────────────────────────────────────────╢​
║ ■ Thanks                                                                     ║
║ Yeyinde helped me fix the stacking error by telling me to use method_defined ║
╟──────────────────────────────────────────────────────────────────────────────╢​
║ ■ Changelog (MM/DD/YYYY)                                                     ║
║ v1.0.0 (11/18/2009) - Initial release.                                       ║
║ v1.0.1 (11/18/2009) - Fixed stacking error.                                  ║
║ v1.1 (4/2/2012) - Recoded settings, added Flag & Animation settings, new name║
╚══════════════════════════════════════════════════════════════════════════════╝​
=end

module PK8
  class Collapse
    Animation_Flag  = true  # Turn on Animation
    Animation       = 33    # Animation ID for the Collapse effect
    Blend_Flag      = true  # Turn New Blend Type on or off
    Blend           = 1     # Blend Type
    Color_Flag      = true  # Turn New Colors on or off
    Color_Red       = 255   # Amount of Red in the Collapse color
    Color_Green     = 0     # Amount of Green in the Collapse color
    Color_Blue      = 230   # Amount of Blue in the Collapse color
    Color_Alpha     = 255   # Amount of Opacity in the Collapse color
    Duration_Flag   = true  # Turn New Fade Duration on or off
    Duration        = 40    # Set new duration of fade
  end
end

#===============================================================================​​
# * RPG Module, Sprite Class.
#===============================================================================​​
module RPG
  class Sprite < ::Sprite
    #---------------------------------------------------------------------------
    # * Alias Listings
    #---------------------------------------------------------------------------
    unless method_defined?(:pk8_newcollapse_collapse)
      alias_method(:pk8_newcollapse_collapse, :collapse)
    end
    #---------------------------------------------------------------------------
    # * Collapse
    #---------------------------------------------------------------------------
    def collapse
      pk8_newcollapse_collapse
      if PK8::Collapse::Animation_Flag == true
        self.animation($data_animations[PK8::Collapse::Animation], true)
      end
      if PK8::Collapse::Blend_Flag == true
        self.blend_type = PK8::Collapse::Blend
      end
      if PK8::Collapse::Color_Flag == true
        self.color.set(PK8::Collapse::Color_Red, PK8::Collapse::Color_Green,
          PK8::Collapse::Color_Blue, PK8::Collapse::Color_Alpha)
      end
      if PK8::Collapse::Duration_Flag == true  
        @_collapse_duration = PK8::Collapse::Duration
      end
    end
  end
end

Instructions
Configure it and put them to the test in Battle Test mode.

FAQ
Awaiting question

Changelog
v1.0.1 fixes the stacking error bug.
v1.1 adds new Flag settings which allows you to disable or enable new blend types, colors, durations, and animations. You also get to set a new animation onto the collapse effect. The code is slightly different from v1.0.x.

Compatibility
RMXP Only. Aliases collapse of Sprite < ::Sprite class in the RPG module.

Credits and Thanks
There was a stacking problem in the original version of the script (v1.0.0), Yeyinde helped me fix it. :P

Author's Notes
I felt like playing around with the RPG::Sprite class a little. Plus I was bored and I'm running out of ideas for scripts. :P

Terms and Conditions
Free for non-profit and commercial use. All I ask for in return is some mention of me within the credits of your project.

Formerly known as Punk.
He Used To Feel Invincible, But Now He Doesn't Feel At All...
11-18-2009 10:25 PM
Find all posts by this user Quote this message in a reply
PK8 Offline
I am the enemy. I am the antidote.

*****
Posts: 1,731
Joined: May 2009
View My Download Submissions
Thanks: 25
Given 8 thank(s) in 29 post(s)

Save Points: 8,947sp
Items: (View All Items)
Awards:

Gender: Undisclosed
Favorite Maker: RPG Maker XP
Post: #2
Battler Collapse Color

Update
After a bit of testing some time after I posted this script, I found a stacking error. Yeyinde helped me fix it. :) I've updated the script with a new version. This version fixes the stacking problem.

Formerly known as Punk.
He Used To Feel Invincible, But Now He Doesn't Feel At All...
11-19-2009 04:05 AM
Find all posts by this user Quote this message in a reply
PK8 Offline
I am the enemy. I am the antidote.

*****
Posts: 1,731
Joined: May 2009
View My Download Submissions
Thanks: 25
Given 8 thank(s) in 29 post(s)

Save Points: 8,947sp
Items: (View All Items)
Awards:

Gender: Undisclosed
Favorite Maker: RPG Maker XP
Post: #3
RE: Battler Collapse Color

After nearly 3 years, this system has been given a bit of an update! You get to set an animation onto the collapse effect this time around.

Formerly known as Punk.
He Used To Feel Invincible, But Now He Doesn't Feel At All...
04-03-2012 03:04 AM
Find all posts by this user Quote this message in a reply
Post Reply 


User(s) browsing this thread:
1 Guest(s)


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
   Victor Engine - Custom Slip Effect Victor Sant 0 322 08-03-2012 12:44 AM
Last Post: Victor Sant
   Victor Engine - Custom Collapse Victor Sant 1 563 03-18-2012 04:02 PM
Last Post: GLaDOS
   Battler State Graphics DerVVulfman 1 1,239 05-05-2010 08:16 AM
Last Post: zubin73
   XP Wave Effect zecomeia 4 1,984 04-04-2010 02:09 PM
Last Post: Ace
   Actor Battler Graphics DerVVulfman 2 2,157 10-03-2009 06:15 PM
Last Post: Yin
   Battler Sprite Addons Kain Nobel 0 777 09-17-2009 12:42 PM
Last Post: Kain Nobel



 Quick Theme: