Advertisement
TheSixth

Zoom Fix for Falcao's ABS

Aug 12th, 2016
292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.31 KB | None | 0 0
  1. =begin
  2. Made by: Sixth
  3.  
  4. Fixes the zoom issues with Falcao's ABS (for custom graphics).
  5. Place this below ALL of the ABS scripts (including any addons)!
  6.  
  7. =end
  8.  
  9. class Sprite_Character < Sprite_Base
  10.  
  11.   # fix custom graphic zoom - part 1
  12.   alias check_bush7726 update_anime_object_pos
  13.   def update_anime_object_pos
  14.     check_bush7726
  15.     if @character.is_a?(Anime_Obj)
  16.       self.zoom_x = @character.user.zoomfx_x
  17.       self.zoom_y = @character.user.zoomfx_y
  18.       self.angle = @character.user.angle_fx
  19.       self.opacity = @character.user.opacity
  20.       self.blend_type = @character.user.blend_type
  21.     end
  22.   end
  23.  
  24. end
  25.  
  26. class Projectile < Game_Character
  27.  
  28.   # fix custom graphic zoom - part 2
  29.   alias zoom_size_dist6625 load_item_data
  30.   def load_item_data
  31.     @zoomfx_x = @user.zoomfx_x
  32.     @zoomfx_y = @user.zoomfx_y
  33.     zoom_size_dist6625
  34.     if @tool_size.is_a?(Array)
  35.       @tool_size[0] = @tool_size * @user.zoomfx_x
  36.       @tool_size[1] = @tool_size * @user.zoomfx_y
  37.       @tool_size[0] = 1 if @tool_size[0] < 1
  38.       @tool_size[1] = 1 if @tool_size[1] < 1
  39.     else
  40.       @tool_size = @tool_size * ((@user.zoomfx_x+@user.zoomfx_y)/2)
  41.       @tool_size = 1 if @tool_size < 1
  42.     end
  43.     @tool_distance = @tool_distance * @user.zoomfx_y
  44.     @tool_distance = 1 if @tool_distance < 1
  45.   end
  46.  
  47. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement