Hero_Claive

(Phoenix Ember)
Veteran
Joined
Jan 5, 2016
Messages
149
Reaction score
89
First Language
English
Primarily Uses
RMVXA
Balloon Sound Effect v1.0
By: Hero_Claive

Intro
I noticed every Ace script about this has either expired or been taken down, so I wrote a quick snippet as replacement. This script automatically plays a specified SE when a balloon event command is called. You can specify the SE, volume, and pitch for each individual balloon.

Features
  • Play a sound effect when calling a balloon event command
  • Specify the volume and pitch for each sound effect
  • Disables this feature with a switch, if desired
Screenshots
Not particularly relevant.

How to use
Place this script below Materials and above Main in the script editor. It's mostly plug-and-play, but you'll need to write in the name for each SE in the configuration section. The SE should be the same name as the one in the Audio/SE folder.

Note: If you want a balloon SE to be silent, simply leave the name as "".

Demo
Not particularly relevant.

Script
Code:
#==============================================================
# * Hero_Claive Balloon SE
# \\\\\\\\\\\\\\\\\\\\\\\\\\\
# * Free for commercial/non-commercial use, no credit required
#==============================================================

module Balloon_SFX
 
  BALLOON_SFXS = {  #Don't touch
 
  #----------------------------------------------------------------------
  # Balloon Row => ["File name", Volume, Pitch]
  #
  # ** Go to Resource Manager and click on System/Balloon to see each row
  #----------------------------------------------------------------------
 
  #Exclamation
  1 => ["", 100, 100],
  #Question
  2 => ["", 100, 100],
  #Note
  3 => ["Saint5", 100, 100],
  #Heart
  4 => ["", 100, 100],
  #Anger
  5 => ["", 100, 100],
  #Sweat
  6 => ["", 100, 100],
  #Cobweb
  7 => ["", 100, 100],
  #Silence
  8 => ["", 100, 100],
  #Light Bulb
  9 => ["", 100, 100],
  #zzz
  10 => ["", 100, 100]
 
  } #Don't touch
 
  #**Just in case you want to disable this feature, use the switch below:
 
  SWITCH_ID = 0
 
end
 
 
#============================================================================
# * Sprite_Character
#============================================================================
class Sprite_Character < Sprite_Base
 
  #--------------------------------------------------------------------------
  # * Overwrite: start_balloon
  #--------------------------------------------------------------------------
  def start_balloon
    dispose_balloon
    @balloon_duration = 8 * balloon_speed + balloon_wait
    @balloon_sprite = ::Sprite.new(viewport)
    @balloon_sprite.bitmap = Cache.system("Balloon")
    @balloon_sprite.ox = 16
    @balloon_sprite.oy = 32
    play_balloon_se
    update_balloon
  end

  #--------------------------------------------------------------------------
  # * New Method: play_balloon_se
  #--------------------------------------------------------------------------
  def play_balloon_se
    return if $game_switches[Balloon_SFX::SWITCH_ID] == true
    return if @balloon_id == 0
    return if Balloon_SFX::BALLOON_SFXS[@balloon_id] == nil
    name = Balloon_SFX::BALLOON_SFXS[@balloon_id][0]
    volume = Balloon_SFX::BALLOON_SFXS[@balloon_id][1]
    pitch = Balloon_SFX::BALLOON_SFXS[@balloon_id][2]
    unless name == ""
      Audio.se_play('Audio/SE/' + name, volume, pitch)
    end
  end

end

Credit
No credit required, usable in commercial or non-commercial projects. Took under five minutes to make so use away. Post any questions, errors, or requested features in this thread or shoot me a PM.
 
Last edited:

Latest Threads

Latest Profile Posts

I got the pause Icon to use 6 frames instead of 4, PLUS it goes: top 1-2-3, bottom 1-2-3. And everything just by playing around with the code & i think i've figured the important parts out now <3
eUuH09A.gif

ps. the animation isn't as "wonky" in RL, stupid recording -.-
Friendly reminder: Make a back up of your project! ;3 I just did one and recognized I would have lost a week worth of work.
Why is there undo but not a redo like every other software in existence? :blink:
Chili: Evolved to taste spicy so no animal would eat them.

Humans: "Jokes on you ..."

Forum statistics

Threads
113,714
Messages
1,076,869
Members
147,738
Latest member
TeraTremolo
Top