Advertisement
Black_Mage

Mog Krosk Pic FX Compatibility

Apr 28th, 2020 (edited)
1,093
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.37 KB | None | 0 0
  1. #==============================================================================
  2. # We change how to call effect 7 from Mog Picture Effects script.
  3. # To call effect 7, use
  4. #
  5. # picture_effect_7(pic_id, 7, power, speed, frame_limit)
  6. #
  7. # the rest of the effect can be called as usual.
  8. #
  9. # The frame limit denotes the amount of frames that you'll use, and they're
  10. # numbered from 0 to n-1 if you plan to use n as the frame limit.
  11. #==============================================================================
  12.  
  13. class Game_Temp
  14.   attr_accessor :p_anim_fr_lim
  15.   alias b_fr_lim_init initialize
  16.   def initialize
  17.     @p_anim_fr_lim = true; b_fr_lim_init
  18.   end  
  19. end
  20. class Sprite_Picture < Sprite  
  21.   def create_picture_animation
  22.     dispose_pic_frames ; @pic_frames = [] ; @picture.anime_frames[0] = false    
  23.     for index in 0...($game_temp.p_anim_fr_lim.to_i - 1)
  24.       @pic_frames.push(Cache.picture(@picture.name + index.to_s)) rescue nil
  25.       break if @pic_frames[index] == nil
  26.     end
  27.     if @pic_frames.size <= 1
  28.       dispose_pic_frames ; @pic_frames = nil ; @picture.anime_frames.clear
  29.       @picture.effect_ex[7] = nil ; return
  30.     end
  31.     self.bitmap = @pic_frames[@picture.anime_frames[3]]
  32.     update_picture_animation
  33.   end
  34. end
  35. class Game_Interpreter
  36.   def picture_effect_7(a,b,c,d,e)
  37.     $game_temp.p_anim_fr_lim = e
  38.     picture_effect(a,b,c,d)
  39.   end
  40. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement