Eric206

Veteran
Veteran
Joined
May 29, 2016
Messages
39
Reaction score
3
First Language
English
Primarily Uses
Hi, I hope that this is the right area to post this in.


I'm trying to make a sidequest, and I really want to have a looping bubble with an exclamation mark animating above their heads. I'm using the "show balloon icon" script in the game. But it only shows up once then goes away as soon as I press the action button to talk to them. I want to be able to have the bubble continuously flashing above an event's head. Thanks!


Just to be clear, I have RPG Maker VX Ace.


-Eric


FYI - I tried doing the loop event, but I don't think I'm doing it correctly. The whole event screws up when I try looping it.
 

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,604
Reaction score
3,865
First Language
Java's Crypt
Primarily Uses
RMMZ
I made a script for that a long long time ago:


https://github.com/Hudell/scripts/blob/master/standalone/balloon/orange_balloon.rb


you can then show the balloon with a script call:


This will show the balloon at the current event

Code:
	OrangeBalloon.show_balloon(OrangeBalloon::EXCLAMATION)


If you want to show it on another event, you can use this:

Code:
	OrangeBalloon.show_balloon_at_event(15, OrangeBalloon::EXCLAMATION)


Where 15 is the number of the event.
 

Eric206

Veteran
Veteran
Joined
May 29, 2016
Messages
39
Reaction score
3
First Language
English
Primarily Uses
I made a script for that a long long time ago:


https://github.com/Hudell/scripts/blob/master/standalone/balloon/orange_balloon.rb


you can then show the balloon with a script call:


This will show the balloon at the current event

Code:
	OrangeBalloon.show_balloon(OrangeBalloon::EXCLAMATION)



If you want to show it on another event, you can use this:

Code:
	OrangeBalloon.show_balloon_at_event(15, OrangeBalloon::EXCLAMATION)



Where 15 is the number of the event.

Where do I put the script? Do I just make a new event, go to advanced>script, and paste it there?
 

Frogboy

I'm not weak to fire
Veteran
Joined
Apr 19, 2016
Messages
1,834
Reaction score
2,345
First Language
English
Primarily Uses
RMMZ
I have MV but there's a decent chance that it's the same. I got this working by setting an invisible event on top of the person event that you need to talk to. The invisible event uses a Parallel Trigger with just the Show Balloon Icon set to Wait for Completion. The person event that you need to talk to uses an Action Button trigger event that turns off the bubble event (which you can skip if you want it to keep playing).


Edit: Maybe it's not even close to the same.
 
Last edited by a moderator:

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,604
Reaction score
3,865
First Language
Java's Crypt
Primarily Uses
RMMZ
Open the script editor and scroll down the list on the left until you see an item that says "Insert here" or something like that. Click there and press Insert to add a new item to the list, then paste this code:


#------------------------------------------------------------
#------------------------------------------------------------
#--------------------- ORANGE BALLOON--- ------------------
#------------------------------------------------------------
#------------------------------------------------------------

module OrangeBalloon
EXCLAMATION = 1
QUESTION = 2
MUSIC = 3
HEART = 4
ANGER = 5
SWEAT = 6
COBWEB = 7
SILENCE = 8
BULB = 9
ZZZ = 10

def self.get_event(event_id)
if event_id > 0
event = $game_map.events[event_id]
else
event = $game_map.interpreter.get_character(event_id)
end
end

def self.show_balloon(balloon_id)
show_balloon_at_event(0, balloon_id)
end

def self.show_balloon_at_event(event_id, balloon_id, keep_showing = true)
event = get_event(event_id)
return if event.nil?
if keep_showing
event.loop_balloon = true
end
event.balloon_id = balloon_id
end

def self.hide_balloon(event_id = 0)
event = get_event(event_id)
return if event.nil?
event.loop_balloon = false
event.halt_balloon = true
end
end

class Game_CharacterBase
attr_accessor :loop_balloon
attr_accessor :halt_balloon
alias hudell_orange_balloon_init_public_members init_public_members
def init_public_members
hudell_orange_balloon_init_public_members
@loop_balloon = false
end
end

class Sprite_Character < Sprite_Base
def update_balloon
if @character.halt_balloon
@character.halt_balloon = false
@balloon_duration = 0
end_balloon
return
end

if @balloon_duration > 0
@balloon_duration -= 1
if @balloon_duration == 0 && !@character.loop_balloon.nil? && @character.loop_balloon
@balloon_duration = 8 * balloon_speed + balloon_wait
end

if @balloon_duration > 0 and !@balloon_sprite.nil?
@balloon_sprite.x = x
@balloon_sprite.y = y - height
@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


Then, when you want to show a balloon, you use the advanced->script button with the line I gave you earlier.
 
Last edited by a moderator:

Eric206

Veteran
Veteran
Joined
May 29, 2016
Messages
39
Reaction score
3
First Language
English
Primarily Uses
I have MV but there's a decent chance that it's the same. I got this working by setting an invisible event on top of the person event that you need to talk to. The invisible event uses a Parallel Trigger with just the Show Balloon Icon set to Wait for Completion. The person event that you need to talk to uses an Action Button trigger event that turns off the bubble event (which you can skip if you want it to keep playing).


Edit: Maybe it's not even close to the same.

Yeah, maybe it's not. I tried your trick and it didn't work. I tried playing around with it a little more and I still couldn't get it to work.

Open the script editor and scroll down the list on the left until you see an item that says "Insert here" or something like that. Click there and press Insert to add a new item to the list, then paste this code:

Code:
#------------------------------------------------------------#------------------------------------------------------------#---------------------  ORANGE BALLOON  ---------------------#------------------------------------------------------------#------------------------------------------------------------module OrangeBalloon  EXCLAMATION = 1  QUESTION = 2  MUSIC = 3  HEART = 4  ANGER = 5  SWEAT = 6  COBWEB = 7  SILENCE = 8  BULB = 9  ZZZ = 10  def self.get_event(event_id)    if event_id &gt; 0      event = $game_map.events[event_id]    else      event = $game_map.interpreter.get_character(event_id)    end  end  def self.show_balloon(balloon_id)    show_balloon_at_event(0, balloon_id)  end  def self.show_balloon_at_event(event_id, balloon_id, keep_showing = true)    event = get_event(event_id)    return if event.nil?    if keep_showing      event.loop_balloon = true    end    event.balloon_id = balloon_id  end  def self.hide_balloon(event_id = 0)    event = get_event(event_id)    return if event.nil?    event.loop_balloon = false    event.halt_balloon = true  endendclass Game_CharacterBase  attr_accessor :loop_balloon  attr_accessor :halt_balloon  alias hudell_orange_balloon_init_public_members init_public_members  def init_public_members    hudell_orange_balloon_init_public_members    @loop_balloon = false  endendclass Sprite_Character &lt; Sprite_Base  def update_balloon    if @character.halt_balloon      @character.halt_balloon = false      @balloon_duration = 0      end_balloon      return    end    if @balloon_duration &gt; 0      @balloon_duration -= 1      if @balloon_duration == 0 &amp;&amp; !@character.loop_balloon.nil? &amp;&amp; @character.loop_balloon        @balloon_duration = 8 * balloon_speed + balloon_wait      end      if @balloon_duration &gt; 0 and !@balloon_sprite.nil?        @balloon_sprite.x = x        @balloon_sprite.y = y - height        @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  endend

Thank you for providing the script, but I'm not completely sure if it's working. I tried playing around with the coding a little more to see if I could get it to work myself, and I couldn't get it to work. Perhaps it's outdated? I'm not sure.


I also copied and pasted the coding you provided to your first reply on this post. I replaced it in the code and it didn't work. 


I guess I'm not too lucky with this right now. If any more info is available, let me know. I'll work really hard to try and get it to work. If I can't get it to work, I'll try to find another way around or not even have the side-quest symbols in the game.
 

Frogboy

I'm not weak to fire
Veteran
Joined
Apr 19, 2016
Messages
1,834
Reaction score
2,345
First Language
English
Primarily Uses
RMMZ
I just opened my project to take a closer look. The invisible parallel event is two lines.


1. Show Balloon Icon : [character that you want it to appear on], [icon] (Wait for Completion)


2. Wait 60 frames


Shouldn't matter where you put the invisible event as it places the balloon directly on the character event.
 

Eric206

Veteran
Veteran
Joined
May 29, 2016
Messages
39
Reaction score
3
First Language
English
Primarily Uses
I just opened my project to take a closer look. The invisible parallel event is two lines.


1. Show Balloon Icon : [character that you want it to appear on], [icon] (Wait for Completion)


2. Wait 60 frames


Shouldn't matter where you put the invisible event as it places the balloon directly on the character event.

Getting closer! It's definitely looping, and above the character. Now the challenge is getting rid of the exclamation mark when I talk to the NPC. I tried the break loop command, but it didn't work, it wouldn't even let me talk to the character.


Think that switches would work? And how would they work to get rid of the exclamation mark?
 

Uzuki

Kawaii on the streets, Senpai in the sheets
Veteran
Joined
Aug 18, 2012
Messages
1,942
Reaction score
1,332
First Language
English
Primarily Uses
RMMV
@Eric206 1. Open up the script editor, you can just press F11 for the shortcut, and scroll down to the Material section.


                 2. Copy Hudell's Ballon Script, the one in his second post, right underneath the Material section, but above Main Process.


                 3. Now in the NPC event you want the looping animation on use "OrangeBalloon.show_balloon(OrangeBalloon::EXCLAMATION)"


                     in a script call. It's in the event command box on the third tab underneath Advance. You can't miss it.
 

HexMozart88

The Master of Random Garbage
Veteran
Joined
May 15, 2016
Messages
2,164
Reaction score
4,086
First Language
English
Primarily Uses
RMVXA
No need for a script, to be honest. This worked fine in my game. 

Screenshot (27).png

You don't really need to erase the event afterwards. I just used that for my purpose. 
 
Last edited by a moderator:

Eric206

Veteran
Veteran
Joined
May 29, 2016
Messages
39
Reaction score
3
First Language
English
Primarily Uses
@Eric206 1. Open up the script editor, you can just press F11 for the shortcut, and scroll down to the Material section.


                 2. Copy Hudell's Ballon Script, the one in his second post, right underneath the Material section, but above Main Process.


                 3. Now in the NPC event you want the looping animation on use "OrangeBalloon.show_balloon(OrangeBalloon::EXCLAMATION)"


                     in a script call. It's in the event command box on the third tab underneath Advance. You can't miss it.

Thanks, Uzuki, you summed it up really nicely. I am SO CLOSE to getting it complete. When I go to talk to the NPC, the bubble disappears. After the dialogue, it comes back. I thought that it was something with the "self-switch" event I had. I put it in the "if self switch = A" portion of the event, and then it stopped disappearing. It's coming back again, but it's still looping.


If anyone is able to figure this out, that would be very much appreciated.
 

Uzuki

Kawaii on the streets, Senpai in the sheets
Veteran
Joined
Aug 18, 2012
Messages
1,942
Reaction score
1,332
First Language
English
Primarily Uses
RMMV
@Eric206 Did you remove the summon ballon icon command? With the script you won't need it anymore. And you want bubble to loop while the dialogue continues? You might want to ask @Hudell about that. 
 

Eric206

Veteran
Veteran
Joined
May 29, 2016
Messages
39
Reaction score
3
First Language
English
Primarily Uses
@Eric206 Did you remove the summon ballon icon command? With the script you won't need it anymore. And you want bubble to loop while the dialogue continues? You might want to ask @Hudell about that. 

I didn't remove the summon balloon icon command. I kept the script and I removed the summon balloon code. It caused it to not be there anymore. I didn't want the bubble to loop while the dialogue was continuing. It was mainly just to get the player's attention while continuing through the game.  :)


It's all on you, @Hudell!
 

Frogboy

I'm not weak to fire
Veteran
Joined
Apr 19, 2016
Messages
1,834
Reaction score
2,345
First Language
English
Primarily Uses
RMMZ
Getting closer! It's definitely looping, and above the character. Now the challenge is getting rid of the exclamation mark when I talk to the NPC. I tried the break loop command, but it didn't work, it wouldn't even let me talk to the character.


Think that switches would work? And how would they work to get rid of the exclamation mark?



Yes, a switch will work. Create a second page on the invisible parallel event that does nothing. Have this second page activate when the switch is turned on. Turn the switch on when you talk to the character event. That should do it.


I'm using a plot variable but the switch should function just the same.
 

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,604
Reaction score
3,865
First Language
Java's Crypt
Primarily Uses
RMMZ
If you're using a parallel process, you can remove the script from the script editor.
 

Eric206

Veteran
Veteran
Joined
May 29, 2016
Messages
39
Reaction score
3
First Language
English
Primarily Uses
I might be done tinkering around with this.


I have it to the point where WHENEVER I talk to the NPC, the mark disappears.


I'm going probably going to mark the best answer to Hudell. Others are most likely able to figure this out already, but I just might be having a goofy, human-error in my situation right now. Thank you all for your help!
 

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,502
Reaction score
413
First Language
German
Primarily Uses
RMMV
I know why its not working:


1Event which you can talk to.


1other event on Paralell which shows the bubble. That is what you probably doing.


The bubble disapears cause as long the textbox is open the eventpage of the paralell event will not restart.


Here is the Solution:


Use the Eventcommand Loop inside the paralell Event and put the bubble command in there.


Than it works fine even if i talk to the other npc, the bubble continous to get shown. I tested it.
 
Last edited by a moderator:

Latest Threads

Latest Posts

Latest Profile Posts

I'm seeing my god daughter's school play next week. Being the mild agoraphobe I am this makes me nervous. Thus I had a dream that it was actually a plot by my best friend to take me clubbing at an establishment where it is customary to throw a harpoon at staff members to reward good service.
Praise be to the game make!
I need help on what I should add to this fighter game.
Should I add:
Rain
Sleet
Snow
Leaves
Wind
If you can come up with anything else let me know.
Final day of the kickstarter campaign and my team and I decide to cap it off by doing ... musical numbers online.

These are clearly definitely My People.
6 hours and 35 minutes until it is December first here :3

Forum statistics

Threads
117,086
Messages
1,104,446
Members
153,079
Latest member
Lnaunboq
Top