Black_Mage icon

Balloon Icon Offset Script

Black_Mage | PRO | 08/07/22 07:00:19 PM UTC (Edited) | 0 ⭐ | 8645 👁️ | Never ⏰ | []
Ruby |

1.7 KB

|

None

|

0 👍

/

0 👎

#==============================================================================
# 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

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎