Jump to content


Photo

Icon Balloons


  • Please log in to reply
7 replies to this topic

#1 Tsukihime

Tsukihime

    Advanced Member

  • Member
  • 7120 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 03 September 2012 - 09:29 AM

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.

Attached Files


Edited by Tsukihime, 30 March 2016 - 10:24 AM.

All of my work can be found on my website:

banner200x40.png

You can follow me on any of these platforms:

logo_facebook40x40.pnglogo_twitter40x40.pnglogo_youtube40x40.pnglogo_patreon40x40.pnglogo_instagram40x40.png

Go here for Bugs and Requests.
 
Want to become a beta tester for my plugins before they are released to the public?

#2 Falcao

Falcao

    Advanced Member

  • Member
  • 340 posts
  • RM Skill - Musician

Posted 03 September 2012 - 10:44 AM

It look great

But why you didnt alias those harcode methods intead of overwrite them?

For my latest scripts updates go to

http://falcaorgss.wordpress.com/

You will find a lot of interesting things!

#3 Tsukihime

Tsukihime

    Advanced Member

  • Member
  • 7120 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 03 September 2012 - 10:56 AM

Couldn't figure out how to alias.
All of my work can be found on my website:

banner200x40.png

You can follow me on any of these platforms:

logo_facebook40x40.pnglogo_twitter40x40.pnglogo_youtube40x40.pnglogo_patreon40x40.pnglogo_instagram40x40.png

Go here for Bugs and Requests.
 
Want to become a beta tester for my plugins before they are released to the public?

#4 Victor Sant

Victor Sant

    Advanced Member

  • Member
  • 854 posts
  • RM Skill - Jack of All Trades

Awards Bar:

Users Awards

Posted 03 September 2012 - 11:45 AM

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, 03 September 2012 - 11:46 AM.

support-victor-engine1.png?w=300
 


#5 Tsukihime

Tsukihime

    Advanced Member

  • Member
  • 7120 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 03 September 2012 - 11:54 AM

Is there a difference between updating the balloon before or after the `setup_new_effect` call in `update`?
All of my work can be found on my website:

banner200x40.png

You can follow me on any of these platforms:

logo_facebook40x40.pnglogo_twitter40x40.pnglogo_youtube40x40.pnglogo_patreon40x40.pnglogo_instagram40x40.png

Go here for Bugs and Requests.
 
Want to become a beta tester for my plugins before they are released to the public?

#6 EvelynNoSpaces

EvelynNoSpaces

    Newbie

  • Member
  • 4 posts

Posted 03 September 2012 - 01:47 PM

Icons are sticking to the speech bubble and they start overlapping.

#7 Tsukihime

Tsukihime

    Advanced Member

  • Member
  • 7120 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 03 September 2012 - 05:03 PM

Screenshot? It doesn't seem different from before.
All of my work can be found on my website:

banner200x40.png

You can follow me on any of these platforms:

logo_facebook40x40.pnglogo_twitter40x40.pnglogo_youtube40x40.pnglogo_patreon40x40.pnglogo_instagram40x40.png

Go here for Bugs and Requests.
 
Want to become a beta tester for my plugins before they are released to the public?

#8 Gone away

Gone away

    Newbie

  • Validating
  • 2 posts
  • RM Skill - Jack of All Trades

Posted 20 November 2012 - 09:25 PM

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!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users