Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #===============================================================================
- # * [ACE] Direction Based Animations for Falcao's Pearl ABS Liquid v3
- #===============================================================================
- # * Made by: Sixth (www.rpgmakervxace.net, www.forums.rpgmakerweb.com)
- # * Version: 1.1
- # * Updated: 02/09/2015
- # * Requires: Falcao's Pearl ABS Liquid v3
- #-------------------------------------------------------------------------------
- # * < Change Log >
- #-------------------------------------------------------------------------------
- # * Version 1.0 (09/08/2015)
- # - Initial release.
- # * Version 1.1 (02/09/2015)
- # - Added zoom options (separate width and height zoom levels).
- # - Added fully direction based animations. Now you can play an entirely
- # different animation depending on the direction of the tools.
- #-------------------------------------------------------------------------------
- # * < Description >
- #-------------------------------------------------------------------------------
- # * Falcao surely provided many ways of making your tool animations.
- # One of the options is to use the animated iconset version.
- # But that one will not really work with non-symmetric icons, such as axes
- # or scythes. Also some weapons should use a thrusting animation and not a
- # swing animation, such as spears, for example.
- # With this script, you can make thrust animations, or animations for
- # non-symmetric weapons too. And you can even make a separate icon animation
- # for each of your tools if you want.
- # All of this is done without any graphic editing program! The only thing you
- # need to do is to make your custom animation frames in the setting and
- # tag your tools with the provided (already built-in) note-tag!
- # * The sample settings include the default icon animation (if you would simply
- # tag the tool as "User Iconset = animated", this icon animation would be
- # played) which is perfectly suitable for symmetric weapons, a setup for
- # non-symmetric weapons, and a thrusting icon animation.
- # * All of the old note-tags will still work!
- # * Another bummer is that non-symmetric animations (real ones from the database)
- # can not be used in this ABS. It simply looks bad if a sword leaves the same
- # slash after-effects when it is swung from the left to right, and when it is
- # swung from right to left, right?
- # Well, in case you wanted to add cool effects for your weapons, you can now
- # do it! A flaming sword which really burns opponents and shows real flame
- # effects upon usage in a way that is visually appealing! How about that? :P
- # In short, you can now make direction based animations too! Yay!
- # * From v1.1 you can use an entirely different animation for each directions!
- #-------------------------------------------------------------------------------
- # * < Note-tags >
- #-------------------------------------------------------------------------------
- # * To use your custom icon animations, you can use the following note-tag:
- #
- # User Iconset = animation_key *or* Projectile Iconset = animation_key
- #
- # Yeah, the same note-tag as Falcao provided, but from now on, you can use
- # your custom animation keys with it, so you got a more flexible version.
- # Simply replace the 'animation_key' with one of your custom animation setup's
- # key from the module settings.
- #
- # Examples: User Iconset = sword / User Iconset = axe / User Iconset = spear
- #
- # You can use this note-tag on all of your tools.
- #- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- # * To set a tool's animation based on it's direction, use this note-tag:
- #
- # <dir anim: DOWN, LEFT, RIGHT, UP>
- #
- # Replace the directions above with the ID of the animation to be played when
- # the tool is in those directions.
- # The tool's direction is based on the user's direction at the time of using
- # the tool in most cases. The exceptions are the "autotarget", "random" and
- # "common event ID" note-tagged tools, these can move freely on the map.
- # This feature only supports 4 directions (no diagonals)!
- #
- # Examples:
- #
- # <dir anim: 12, 46, 28, 17>
- #
- # The tool will use the following animations:
- # When it's direction is down, it uses the 12th animation from the database,
- # when it's direction is left, it uses the 46th animation, when it's
- # direction is right, it uses the 28th animation, and when it's direction is
- # up, it uses the 17th animation from the database.
- #-------------------------------------------------------------------------------
- # * < Installation >
- #-------------------------------------------------------------------------------
- # * Place this script below all of Falcao's ABS scripts but above Main!
- #-------------------------------------------------------------------------------
- # * < Compatibility Info >
- #-------------------------------------------------------------------------------
- # * No known incompatibilities.
- #-------------------------------------------------------------------------------
- # * < Known Issues >
- #-------------------------------------------------------------------------------
- # * No known issues.
- #-------------------------------------------------------------------------------
- # * < Terms of Use >
- #-------------------------------------------------------------------------------
- # * Free to use for whatever purposes you want.
- # * Credit me (Sixth) in your game, pretty please! :P
- # * Posting modified versions of this script is allowed as long as you notice me
- # about it with a link to it!
- #===============================================================================
- $imported = {} if $imported.nil?
- $imported["SixthABSAnimEX"] = true
- #===============================================================================
- # Settings:
- #===============================================================================
- module ABSAnimEX
- #-----------------------------------------------------------------------------
- # Custom Icon Animation Settings
- #-----------------------------------------------------------------------------
- # This is the place where you can make your own icon animations.
- # It might be confusing at first (it was confusing for me, at least :P), but
- # if you examine the sample settings in the game and read the explanation
- # here, you should have no problem making your own icon animations.
- #
- # Format:
- #
- # "animation_key" => {
- # direction => {
- # 0 => { :x => val, :y => val, :a => val, :z => val, :m => true/false, :zx => val, :zy => val },
- # 1 => { :x => val, :y => val, :a => val, :z => val, :m => true/false, :zx => val, :zy => val },
- # 2 => { :x => val, :y => val, :a => val, :z => val, :m => true/false, :zx => val, :zy => val },
- # },
- # # 3 more hashes go here with the same format, but different direction!
- # },
- #
- # So, what do we have here?
- #
- # "animation_key" = This is the identifier/key of the animation setting.
- # You use this in your note-tags! Must be a string!
- #
- # direction = The direction of the user. You must set up all 4 directions!
- # 2 = Down, 4 = Left, 6 = Right, 8 = Up.
- # When the user is facing up, the setting with the direction of 8
- # will be used on tool usage, when the user is facing left, the
- # direction of 4 will be used from the settings, and so on!
- #
- # Each direction setting got 3 frames! These are numbered 0, 1 and 2!
- # Each direction setting must have a setup for each frames!
- # These frames will be shown in order when the tool is used.
- # That will be the actual iconset animation, just 3 simple frame settings.
- # Let's see each of the settings for the frames:
- #
- # :x = The X offset for the icon graphic. Positive numbers move the icon right
- # on the screen, while negative ones will move it left.
- # It is relative to the user's X position on the screen!
- # Measured in pixels!
- # :y = The Y offset for the icon graphic. Positive numbers move the icon down
- # on the screen, while negative ones will move it up.
- # It is relative to the user's Y position on the screen!
- # Measured in pixels!
- # :a = The angle of the icon graphic. Use this to rotate the icon.
- # Use positive numbers to rotate the icon counterclockwise, or use
- # negative numbers to rotate the icon clockwise.
- # :z = The Z value to be added for the icon graphic. The default value is
- # always the user's Z value. The value you set up here will be added
- # on that one! -1 makes the icon be behind the user.
- # Note that each frame will reset the Z value to the default, so if you
- # want all of your frames to be displayed behind the user, for example,
- # you must set this to -1 for all of your frames!
- # :m = The mirror flag of the icon graphic. If you set this to true, the
- # icon will be flipped horizontally. If it is false, it will not be
- # flipped. This is the only way to design a working icon animation for
- # non-symmetric icons, such as axes, scythes, or curved swords, etc.
- # :zx = The zoom level on the X axis for the icon. 1.0 is the default value.
- # Higher numbers will make the icon bigger in width, while lower values
- # will make it smaller in width. You can omit this setting if you don't
- # need it.
- # :zy = Same as :zx, but this one is on the Y axis and manipulates the icon's
- # height. You can omit this one too if you don't need it.
- #
- # Now that you know what these settings mean, you can start to make your own
- # icon animations!
- # The sample settings are made for icons which are positioned this way on the
- # iconset:
- #
- # \\ Excuse the crappy ASCI drawing, it's meant to be a sword! :P
- # \\ So, they are placed between the top-left corner and bottom-right
- # \\ corner, rotated ~45 degrees.
- # \\ If you have some icons placed differently on the iconset, you
- # ------ will need to make new animation settings for them!
- # \\
- #-----------------------------------------------------------------------------
- IconAnims = {
- "sword" => { # The default, same as Falcao's "animated" icon animation
- 2 => { # User facing down
- 0 => { :x => 10, :y => -12, :a => -166, :z => 0, :m => false }, # 1st frame
- 1 => { :x => 8, :y => -5, :a => -210, :z => 0, :m => false }, # 2nd frame
- 2 => { :x => 0, :y => 0, :a => -266, :z => 0, :m => false }, # 3rd frame
- },
- 4 => { # User facing left
- 0 => { :x => -8, :y => -26, :a => -46, :z => -1, :m => false },
- 1 => { :x => -20, :y => -10, :a => 12, :z => -1, :m => false },
- 2 => { :x => -10, :y => 2, :a => 52, :z => -1, :m => false },
- },
- 6 => { # User facing right
- 0 => { :x => -8, :y => -26, :a => -46, :z => -1, :m => false },
- 1 => { :x => 7, :y => -20, :a => -78, :z => -1, :m => false },
- 2 => { :x => 8, :y => -15, :a => -126, :z => -1, :m => false },
- },
- 8 => { # User facing up
- 0 => { :x => -22, :y => -10, :a => 0, :z => 0, :m => false },
- 1 => { :x => -8, :y => -26, :a => -46, :z => -1, :m => false },
- 2 => { :x => 10, :y => -16, :a => -100, :z => -1, :m => false },
- },
- },
- "spear" => { # Spear thrust
- 2 => { # User facing down
- 0 => { :x => 4, :y => -6, :a => 142, :z => 0, :m => false }, # 1st frame
- 1 => { :x => 4, :y => -3, :a => 142, :z => 0, :m => false }, # 2nd frame
- 2 => { :x => 4, :y => 0, :a => 142, :z => 0, :m => false }, # 3rd frame
- },
- 4 => { # User facing left
- 0 => { :x => -6, :y => 0, :a => 44, :z => 0, :m => false },
- 1 => { :x => -6, :y => 0, :a => 44, :z => 0, :m => false },
- 2 => { :x => -12, :y => 0, :a => 44, :z => 0, :m => false },
- },
- 6 => { # User facing right
- 0 => { :x => -2, :y => -16, :a => -130, :z => 0, :m => false },
- 1 => { :x => 4, :y => -16, :a => -130, :z => 0, :m => false },
- 2 => { :x => 10, :y => -16, :a => -130, :z => 0, :m => false },
- },
- 8 => { # User facing up
- 0 => { :x => -4, :y => -26, :a => -40, :z => -1, :m => false },
- 1 => { :x => -4, :y => -29, :a => -40, :z => -1, :m => false },
- 2 => { :x => -4, :y => -32, :a => -40, :z => -1, :m => false },
- },
- },
- "axe" => { # Non-symmetric weapons
- 2 => { # User facing down
- 0 => { :x => 7, :y => 4, :a => -76, :z => 0, :m => true }, # 1st frame
- 1 => { :x => -10, :y => 1, :a => -130, :z => 0, :m => true }, # 2nd frame
- 2 => { :x => -20, :y => -9, :a => -176, :z => 1, :m => true }, # 3rd frame
- },
- 4 => { # User facing left
- 0 => { :x => -8, :y => -26, :a => -46, :z => -1, :m => false },
- 1 => { :x => -20, :y => -10, :a => 12, :z => 0, :m => false },
- 2 => { :x => -10, :y => 2, :a => 52, :z => 0, :m => false },
- },
- 6 => { # User facing right
- 0 => { :x => 9, :y => -26, :a => 46, :z => -1, :m => true },
- 1 => { :x => 19, :y => -10, :a => -13, :z => 0, :m => true },
- 2 => { :x => 9, :y => 3, :a => -56, :z => 0, :m => true },
- },
- 8 => { # User facing up
- 0 => { :x => -6, :y => -24, :a => 90, :z => 0, :m => true },
- 1 => { :x => 6, :y => -26, :a => 44, :z => -1, :m => true },
- 2 => { :x => 19, :y => -13, :a => 0, :z => 0, :m => true },
- },
- },
- "bow" => { # Bows
- 2 => { # User facing down
- 0 => { :x => 8, :y => -14, :a => 135, :z => 1, :m => false, :zx => 0.8 }, # 1st frame
- 1 => { :x => 8, :y => -14, :a => 135, :z => 1, :m => false, :zx => 0.9 }, # 2nd frame
- 2 => { :x => 8, :y => -14, :a => 135, :z => 1, :m => false, :zx => 1.0 }, # 3rd frame
- },
- 4 => { # User facing left
- 0 => { :x => -0, :y => -6, :a => 45, :z => -1, :m => false, :zy => 0.8 },
- 1 => { :x => -0, :y => -6, :a => 45, :z => -1, :m => false, :zy => 0.9 },
- 2 => { :x => -0, :y => -6, :a => 45, :z => -1, :m => false, :zy => 1.0 },
- },
- 6 => { # User facing right
- 0 => { :x => -1, :y => -24, :a => -135, :z => -1, :m => false, :zy => 0.8 },
- 1 => { :x => -1, :y => -24, :a => -135, :z => -1, :m => false, :zy => 0.9 },
- 2 => { :x => -1, :y => -24, :a => -135, :z => -1, :m => false, :zy => 1.0 },
- },
- 8 => { # User facing up
- 0 => { :x => -8, :y => -20, :a => -45, :z => -1, :m => false, :zx => 0.8 },
- 1 => { :x => -8, :y => -20, :a => -45, :z => -1, :m => false, :zx => 0.9 },
- 2 => { :x => -8, :y => -20, :a => -45, :z => -1, :m => false, :zx => 1.0 },
- },
- },
- # Add more icon animation settings here!
- }
- #-----------------------------------------------------------------------------
- # Animation Rate Settings
- #-----------------------------------------------------------------------------
- # Here you can set up custom animation rates for each of your animations from
- # the database. The iconset animations are not affected by this in any way!
- # In theory, you can set up any integer numbers here.
- #
- # The animation rate will be calculated this way:
- # ani_rate = 60 / ani_setting
- # So, if you set up 4 for an animation, the actual animation rate will be
- # 60/4 = 15. This is the engine's default animation rate, in case you wonder.
- #
- # That final number (the 15) means that the animation frames which you set up
- # in the database itself, will change after each 15 frames.
- # 60 frames = 1 second, in case you want some comparison.
- #
- # Effectively, the lower the real animation rate (the 60/x value) the quicker
- # your image frames will change, allowing you to make really smooth animations.
- # But (and this is a warning!) the quicker they are, the more image frames
- # are needed to make the animation actually visible for longer than a few
- # frames!
- # Also, the more image frames you use, the longer it will take to load
- # the animation. To overcome this issue, I recommend you to use Moghunter's
- # "Anti-Animation Lag" script (NOT the regular anti-lag one for events!).
- # That script really makes wonders with animation buffering!
- #
- # Anyway, here are some good values you can set here for your animations:
- #
- # Setting Real
- # value Speed
- # 4 --- 15 fps
- # 3 --- 20 fps
- # 2 --- 30 fps
- # 1 --- 60 fps
- #
- # You can see a setting named :default below, that one must be present all the
- # time! If you don't set up a custom setting for an animation, that default
- # value will be used instead.
- # To setup your custom rates, you just have to add a new setting for it, where
- # the ID of the animation will be the key, and the value will be the animation
- # rate setting.
- # Format: animation_id => ani_rate,
- #
- # Example: 12 => 4, 148 => 2, 84 => 3, etc.
- #-----------------------------------------------------------------------------
- Rates = {
- :default => 1, # <-- The default rate setting, do NOT remove!
- 169 => 3,
- 174 => 3,
- 175 => 3,
- 177 => 3,
- 176 => 2,
- # Add more custom animation rate settings here!
- }
- #-----------------------------------------------------------------------------
- # Direction Based Animation Settings
- #-----------------------------------------------------------------------------
- # Well, yeah... Just like with the icon animations, if an animation you made
- # is not symmetric, it can't really be used in this ABS.
- #
- # Take the "Hit 2" type of animations from the default database, for example.
- # You can't really use those for anithing here, even though those are perfect
- # animations for a swinging weapon (I actually use them that way now), and
- # you even got some element types set up for them right from the start, which
- # saves hell of a lot time (or maybe it's just me not really being fond of
- # making 10 thousand new animations :P).
- #
- # Anyway, you can set up position offsets, angle changes, mirror flag changes
- # and Z value changes for your animations here for each directions separately.
- # This will surely help to upgrade your game's visuals, like it did for mine.
- # Let loose those fire element weapons, add real flames for them with
- # animations, or strike the thunder above on a hit from a thunder based weapon!
- # It is all doable now, and I can assure you, it makes your skills/weapons
- # way more attractive and visually appealing! :)
- #
- # Here is how you use this cool thing:
- # First, set up your animations. Adjust their zoom level (you will need to do
- # this for a lot of animations if you use the default sized characters/weapons)
- # and position all of them to be at the middle. You will adjust their position
- # based on the directions here, so it is best to set them at the middle in the
- # database. This means that the original X and Y position will be the position
- # of the center of the tool (yes, the tool itself, NOT the user!). The X and Y
- # values you set up here will be added to those values, so all of them means
- # an offset value, and not a direct position!
- # For the angle settings in the database, you can set it to any value, it
- # doesn't really matter, since you will most probably need to adjust them here
- # anyway. Same for the mirror settings.
- #
- # Okay, so, after the database settings, you come here.
- # Here is the format of the settings:
- #
- # animation_id => {
- # direction => {
- # :x => val, :y => val, :a => val, :z => val, :m => true/false, :zx => val, :zy => val,
- # },
- # # 3 more hashes go here with the same format, but different direction!
- # },
- #
- # Yeah, if it seems similar from somewhere, it is because it is the exact same
- # format as for the icon animation settings, but this time, there are no frame
- # settings (so only one setup for each direction).
- # All of these settings do the same as there.
- # A bit of a difference is the default Z value of the animations. The makers
- # of VX Ace surely made sure that thee animation is displayed above any
- # character... The default Z value is the user's Z value plus 300! Yeah, a
- # whopping +300 is added. o.o
- # So, in case you want to display an animation below the player, you will need
- # to set the :z setting here to at least -301, but in case you use multiple
- # images in a frame of the animation, you need to set even lower values.
- # You should not need to adjust the Z value many times, but it is still good
- # to know the defaults before trying to edit it, right?
- #
- # Of course, you don't need to setup a setting here for all of your animations.
- # If an animation got no setting here, it will be played the default,
- # non-direction based way.
- #
- # In case you are using the default battle system alongside this ABS (no idea,
- # maybe someone really does o.O), you don't need to worry about the direction
- # based changes. The animations played on the default battle scene (or on any
- # other battle scene which uses battlers and not map characters) will be
- # played the default way.
- #
- # The sample setting uses "Hit 2 Ice" from the default database. I modified
- # it's zoom value to be 34% (much smaller than the original) and centered it
- # in the database after. I used the animation on an "axe" based iconset type
- # user animation tool, and the result was an icy axe which shows it's icon
- # from the database in a slashing motion, and upon a slash, a cool ice effect
- # is added. Everything is direction based, so perfect for this ABS!
- #-----------------------------------------------------------------------------
- AnimEX = {
- 181 => { # Ice Slash (3 lines)
- 2 => { # User facing down.
- :x => 0, :y => -6, :a => 230, :z => 0, :m => true,
- },
- 4 => { # User facing left.
- :x => 20, :y => 0, :a => 13, :z => 0, :m => false,
- },
- 6 => { # User facing right.
- :x => -10, :y => 0, :a => -13, :z => 0, :m => true,
- },
- 8 => { # User facing up.
- :x => 0, :y => 16, :a => 40, :z => 0, :m => true,
- },
- },
- # Add more direction based animation settings here!
- }
- end
- #===============================================================================
- # End of Settings! Editing anything below may lead to... you know it, right?
- #===============================================================================
- module PearlKernel
- def self.check_iconset(item, tag, object)
- data = item.tool_data(tag, false)
- return if data.nil?
- v = [item.icon_index, data.to_sym] if data == "animated" ||
- data == "static" || data == "shielding" || ABSAnimEX::IconAnims.include?(data)
- object.is_a?(Projectile) ? object.pro_iconset = v : object.user_iconset = v
- end
- end
- class Sprite_Base < Sprite
- def set_animation_rate
- if ABSAnimEX::Rates.include?(@animation.id)
- @ani_rate = ABSAnimEX::Rates[@animation.id]
- else
- @ani_rate = ABSAnimEX::Rates[:default]
- end
- end
- end
- class Sprite_Character < Sprite_Base
- def set_angle_changes(type)
- ani= @character.user.anime_speed.to_f/@character.original_speed.to_f * 100.0
- case ani
- when 80..100
- perform_animated(0) if type == :animated
- perform_custom_icon_anim(type,0) if ABSAnimEX::IconAnims.include?(type.to_s)
- when 60..80
- perform_animated(1) if type == :animated
- perform_custom_icon_anim(type,1) if ABSAnimEX::IconAnims.include?(type.to_s)
- when 0..60
- perform_animated(2) if type == :animated
- perform_custom_icon_anim(type,2) if ABSAnimEX::IconAnims.include?(type.to_s)
- end
- if type != :animated && !ABSAnimEX::IconAnims.include?(type.to_s)
- perform_static if type == :static
- perform_shielding if type == :shielding
- end
- end
- def perform_custom_icon_anim(key,pattern)
- xo = ABSAnimEX::IconAnims[key.to_s][@character.user.direction][pattern][:x]
- yo = ABSAnimEX::IconAnims[key.to_s][@character.user.direction][pattern][:y]
- zxo = ABSAnimEX::IconAnims[key.to_s][@character.user.direction][pattern][:zx]
- zyo = ABSAnimEX::IconAnims[key.to_s][@character.user.direction][pattern][:zy]
- ao = ABSAnimEX::IconAnims[key.to_s][@character.user.direction][pattern][:a]
- zo = ABSAnimEX::IconAnims[key.to_s][@character.user.direction][pattern][:z]
- mo = ABSAnimEX::IconAnims[key.to_s][@character.user.direction][pattern][:m]
- apply_angle_pattern(xo, yo, ao)
- self.z = @character.user.screen_z + zo
- self.mirror = mo
- self.zoom_x = zxo if !zxo.nil?
- self.zoom_y = zyo if !zyo.nil?
- end
- def animation_set_sprites(frame)
- cell_data = frame.cell_data
- @ani_sprites.each_with_index do |sprite, i|
- next unless sprite
- pattern = cell_data[i, 0]
- if !pattern || pattern < 0
- sprite.visible = false
- next
- end
- sprite.bitmap = pattern < 100 ? @ani_bitmap1 : @ani_bitmap2
- sprite.visible = true
- sprite.src_rect.set(pattern % 5 * 192,
- pattern % 100 / 5 * 192, 192, 192)
- if @ani_mirror
- sprite.x = @ani_ox - cell_data[i, 1]
- sprite.y = @ani_oy + cell_data[i, 2]
- sprite.angle = (360 - cell_data[i, 4])
- sprite.mirror = (cell_data[i, 5] == 0)
- else
- sprite.x = @ani_ox + cell_data[i, 1]
- sprite.y = @ani_oy + cell_data[i, 2]
- sprite.angle = cell_data[i, 4]
- sprite.mirror = (cell_data[i, 5] == 1)
- end
- sprite.z = self.z + 300 + i
- sprite.ox = 96
- sprite.oy = 96
- sprite.zoom_x = cell_data[i, 3] / 100.0
- sprite.zoom_y = cell_data[i, 3] / 100.0
- if ABSAnimEX::AnimEX.include?(@animation.id)
- sprite.x += ABSAnimEX::AnimEX[@animation.id][@character.direction][:x] if can_change_value?(:x)
- sprite.y += ABSAnimEX::AnimEX[@animation.id][@character.direction][:y] if can_change_value?(:y)
- sprite.angle += ABSAnimEX::AnimEX[@animation.id][@character.direction][:a] if can_change_value?(:a)
- sprite.z += ABSAnimEX::AnimEX[@animation.id][@character.direction][:z] if can_change_value?(:z)
- sprite.mirror = ABSAnimEX::AnimEX[@animation.id][@character.direction][:m] if can_change_value?(:m)
- sprite.zoom_x += ABSAnimEX::AnimEX[@animation.id][@character.direction][:zx] if can_change_value?(:zx)
- sprite.zoom_y += ABSAnimEX::AnimEX[@animation.id][@character.direction][:zy] if can_change_value?(:zy)
- end
- sprite.opacity = cell_data[i, 6] * self.opacity / 255.0
- sprite.blend_type = cell_data[i, 7]
- end
- end
- def can_change_value?(type)
- return !ABSAnimEX::AnimEX[@animation.id][@character.direction][type].nil?
- end
- end
- class RPG::BaseItem
- def dir_anim
- dir_anims = {}
- if @note =~ /<dir anim: (\d+(?:\s*,\s*\d+)*)>/i
- ind = 2
- $1.scan(/\d+/).each { |id|
- dir_anims[ind] = id.to_i
- ind += 2
- }
- end
- return dir_anims
- end
- end
- class Projectile < Game_Character
- alias add_dir_anims9966 animation
- def animation
- if !@item.dir_anim[@direction].nil?
- return @item.dir_anim[@direction]
- else
- add_dir_anims9966
- end
- end
- end
- #==============================================================================
- # !!END OF SCRIPT - OHH, NOES!!
- #==============================================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement