#=============================================================================== # State Icon Animation # By Jet10985 (Jet) # Inspired By: Ziifee #=============================================================================== # This script will have state icons cycle displaying, instead of display all # the icons in a row. # This script has: 1 customization option. #=============================================================================== # Overwritten Methods: # Window_Base: draw_actor_icons #------------------------------------------------------------------------------- # Aliased methods: # None #=============================================================================== module Jet module StateIconAnimation # This is how long in frames it takes to cycle to the next state icon. # 60 frames = 1 second FRAME_TIME = 60 end end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== ($imported ||= {})[:jet] ||= {} $imported[:jet][:StateIconAnimation] = true class Window_Base def draw_actor_icons(actor, x, y, width = 96) (@jet_state_icons ||= {})[[x, y]] = [0, 0, actor] update end alias jet3745_update update def update(*args, &block) jet3745_update(*args, &block) update_jet_states end def update_jet_states @jet_state_icons ||= {} @jet_state_icons.each {|coords, others| if (others[1] = [others[1] - 1, 0].max) == 0 icons = (others[2].state_icons + others[2].buff_icons) next if icons.empty? others[0] = 0 if others[0] >= icons.size self.contents.clear_rect(coords[0], coords[1], 24, 24) draw_icon(icons[others[0]], coords[0], coords[1]) others[0] += 1 others[1] = Jet::StateIconAnimation::FRAME_TIME end } end end