RMRK is retiring.
Server is paid up for the rest of 2026, but the forum may go after that. See here for more information. Please archive or save anything you would like to keep before 2027.
Main Menu
  • Welcome to The RPG Maker Resource Kit.

[VX Snippet] Balloon SE

Started by worale, May 16, 2008, 05:17:59 AM

0 Members and 2 Guests are viewing this topic.

worale

Balloon SE
Version 1.0
by Woratana
Release Date: 15/05/2008


Introduction
This script will play SE when show balloon.
It's just small snippet I wrote in less than a min.  :P

Anyway, I feels like balloon with SE is better than silent balloon, so I scripted this~
I'll be using this in my Foxsuke Project.  ;)

Enjoy~! :)


Script
Place it above main
#==============================================================================
# [VX Snippet] ? Ballon SE ?
#-------------------------------------------------------------------------
# ? by Woratana [woratana@hotmail.com]
# ? Thaiware RPG Maker Community
# ? Released on: 15/04/2008
# ? Version: 1.0
#==============================================================================

class Sprite_Character < Sprite_Base
 
  Balloon_SE = 'Load' # SE (Sound Effect) file name, it must be in folder SE
  Balloon_SE_Volume = 80 # SE volume (0 - 100) Default: 80
  Balloon_SE_Pitch = 100 # SE pich (50 - 150) Default: 100
 
  alias wora_ballse_sprcha_strball start_balloon
  def start_balloon
    RPG::SE.new(Balloon_SE,Balloon_SE_Volume,Balloon_SE_Pitch).play
    wora_ballse_sprcha_strball
  end
end



Instruction
Just put script above main.  :lol:


Author's Notes
Free for use in your project if credit is included.

rendy1287

#1
Hey, woratana, i was made v1.1 from your script, its will play a SE for certain balloon
hope you glad it...


#==============================================================================
# [VX Snippet] - Ballon SE v1.1
#-------------------------------------------------------------------------
# Original scripts by Woratana [woratana@hotmail.com]
# Updated to v1.1 by rendy1287 a.k.a Keiyh Aruya
#
# Instruction
# Just put script above main. (if you have old script, replace it)
#
# ChangeLog:
# v1.1: Added balloon SE to certain of balloon ID (23 January 2009)
# v1.0: Woratana's first released (15 April 2008)
#
# Thaiware RPG Maker Community
# Released on: 23/01/2009
# Version: 1.1
#==============================================================================

class Sprite_Character < Sprite_Base

  Balloon_SE = Array.new
 
  # SE (Sound Effect) file name, it must be in folder SE
  # Global SE
  Balloon_SE[0]  = '' # use this if all of balloons have same of SE
                      # set this to '' to off global Balloon SE
 
  # SE for balloons, set this to '' if the balloon don't play a SE
  Balloon_SE[1]  = 'Jump2'       # Exclamation   !
  Balloon_SE[2]  = 'Miss'        # Question      ?
  Balloon_SE[3]  = 'Bell'        # MusicNote     ?
  Balloon_SE[4]  = 'Jump1'       # Heart         ?
  Balloon_SE[5]  = 'Confuse'     # Anger         (anger, like #)
  Balloon_SE[6]  = 'Load'        # Sweat         '
  Balloon_SE[7]  = 'Paralyze1'   # Cobweb        (cobweb)
  Balloon_SE[8]  = ''  # no se   # Silence       ...
  Balloon_SE[9]  = 'Flash1'      # LightBulb     (lamp)
  Balloon_SE[10] = 'Horse'       # Zzz           Zzz
 
  Balloon_SE_Volume = 80 # SE volume (0 - 100) Default: 80
  Balloon_SE_Pitch = 100 # SE pich (50 - 150) Default: 100

  alias wora_ballse_sprcha_strball start_balloon
  def start_balloon
    @ball_se = Balloon_SE[0]

    if @ball_se == '' # if NOT global SE
      @ball_se = Balloon_SE[@character.balloon_id]
    end

    RPG::SE.new(@ball_se,Balloon_SE_Volume,Balloon_SE_Pitch).play
    wora_ballse_sprcha_strball
  end
end
haallloooo...