#============================================================================== # Balloon Icon Offset Script by Black Mage. # For: RPG Maker VX Ace # Version: 1.0 # # License: CC-BY 3.0 # https://burningwizard.wordpress.com/ #============================================================================== #============================================================================== # Changelog #============================================================================== # Version 1.0 # - Initial version. #============================================================================== #------------------------------------------------------------------------------ # * Beyond this is the sacred land of code. You need programming qualification # to delve deeper, or it'll cause many unnecessary problems. Proceed at your # own risk. #------------------------------------------------------------------------------ module BLACK # The variable that will be used as balloon icon X offset. BALLOON_X_OFFSET_VARIABLE = 32 # The variable that will be used as balloon icon Y offset. BALLOON_Y_OFFSET_VARIABLE = 33 end class Sprite_Character < Sprite_Base include BLACK def update_balloon if @balloon_duration > 0 @balloon_duration -= 1 if @balloon_duration > 0 @balloon_sprite.x = x + $game_variables[BALLOON_X_OFFSET_VARIABLE] @balloon_sprite.y = y - height + $game_variables[BALLOON_Y_OFFSET_VARIABLE] @balloon_sprite.z = z + 200 sx = balloon_frame_index * 32 sy = (@balloon_id - 1) * 32 @balloon_sprite.src_rect.set(sx, sy, 32, 32) else end_balloon end end end end