Sign in to follow this  
Followers 0
Tsukihime

Icon Balloons

8 posts in this topic

Icon balloons

-Tsukihime

 

This script displays a balloon above your character. It is the same idea as the default balloons, except it draws an icon.

 

The icons are still-images though.

 

Usage

 

Place the "Icon-Balloon.png" file inside Graphics/System

 

Script call:

 

show_icon_balloon(char_id, icon_index, wait?)
where

 

`char_id` is the character on the map (-1 = player, 0 = this event, 1+ is specific event ID)

`icon_index` is the index of the icon

`wait` is a boolean representing whether the game should wait until the balloon disappears

 

Download

 

Script: Download here

 

Notes

 

There are three hardcoded methods in Sprite_Character

 

-initialize

-dispose

-update

 

Each of them adds a new line to handle the icon balloon. If it is not compatible with your scripts because you are using animation scripts as well, just delete these three methods and modify your script to handle the icon balloon.

post-6060-0-77580600-1346686077_thumb.jpg

post-6060-0-67686600-1346686088_thumb.jpg

Edited by Tsukihime
oriceles likes this

Share this post


Link to post
Share on other sites

You forgot to add the superclass of Sprite_Character

 

class Sprite_Character < Sprite_Base

 alias :th_icon_balloon_initialize :initialize
 def (viewport, character = nil)
   @icon_balloon_duration = 0
th_icon_balloon_initialize(viewport, character)
 end

 alias :th_icon_balloon_dispose :dispose
 def dispose
   th_icon_balloon_dispose
   end_icon_balloon
 end

 alias :th_icon_balloon_update :update
 def update
th_icon_balloon_update
update_icon_balloon
 end
end

Edited by Victor Sant

Share this post


Link to post
Share on other sites

Second - icons are just overlapping. Each time a different icon is shown, it shows ON TOP of the previous icon displayed. You not disposing them correctly? This script is pretty essential to my game, but I'm not able to use it 'cause of this bug so please look into it!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.