Zerbu

Text Sound Effect [UPDATED]

22 posts in this topic

Text Sound Effect

http://pastebin.com/vik8HBmH


Introduction

This script plays sounds when text is appearing in the text box. You've probably seen this in VX, well now it's available for Ace too.


Change Log

The script now has the option to turn off sound effects using a switch.


Preview
Sorry, screenshots can't have sounds!

Instructions

Download at: http://pastebin.com/vik8HBmH

Install the script, then edit the options at the top if you want to customize it:
 

#--------------------------------------------------------------------------
# Options
#--------------------------------------------------------------------------
# The sound effect to play
MESSAGE_SOUND = RPG::SE.new("Knock", 70, 80)

# The number of characters to display before each time the sound plays
# The default is 3, it's recommended you keep it as this unless you
# know what you're doing
MESSAGE_SOUND_FRAMES = 3

Edited by Zerbu

Share this post


Link to post
Share on other sites

Idk if you're still active, but can you make the SE not play during battle_scenes (and I mean any battle_scene). Unless it is an event one, because fighting monsters with a BGM and hearing the SE go off is annoying.

Share this post


Link to post
Share on other sites

This is amazing, just what I was looking for thanks!

 

How difficult would it be to set the pitch for the sound effect on a 'per text box' basis?? I'd love to give girls a high pitched sound and the guys lower pitched etc?

Share this post


Link to post
Share on other sites
Idk if you're still active, but can you make the SE not play during battle_scenes (and I mean any battle_scene). Unless it is an event one, because fighting monsters with a BGM and hearing the SE go off is annoying.

 

I got this problem too. If you (Zerbu) or anyone else could fix it would be great :)

Share this post


Link to post
Share on other sites

His current setup has this effect in Window_Base. Anything which inherits properties from Window_Base will have this effect, which is practically every window. 

 

Perhaps if you change the line:  

class Window_Base < Window

 

to:

 

class Window_Message < Window_Base

It might only affect message windows?  Maybe not, I only half know what I'm doing.  Try it anyway!

Nybras likes this

Share this post


Link to post
Share on other sites
His current setup has this effect in Window_Base. Anything which inherits properties from Window_Base will have this effect, which is practically every window. 

 

Perhaps if you change the line:  

class Window_Base < Window

 

to:

 

class Window_Message < Window_Base

It might only affect message windows?  Maybe not, I only half know what I'm doing.  Try it anyway!

 

 

Thanks ekomega, it seems to work just fine! :)

Share this post


Link to post
Share on other sites

Sorry for never updating this or responding, I haven't been making games or being active here for over a year, but since people are still using this, I've updated the script with one that only effects the message window.

 

 

 

This is amazing, just what I was looking for thanks!

How difficult would it be to set the pitch for the sound effect on a 'per text box' basis?? I'd love to give girls a high pitched sound and the guys lower pitched etc?

 

If I go back into scripting, I might consider that for a future version of the script.

Share this post


Link to post
Share on other sites

Hello there. :)

 

I'm really sorry for beeing such a noob, but I don't get it with the switch command.

# Switch to disable sound effect

      # If you need to turn off the sound effect for any part of the game,

      # turn this switch on

      # Set to nil to disable this feature

      MESSAGE_SOUND_DISABLE = nil

How do I actually set up the switch correctly. I spend like over an hour to figure it out. :(

I would really appreciate if anyone could explain it to me. :)

Share this post


Link to post
Share on other sites

No such thing as a stupid question. You'd be surprised how many scripts out there have instructions that assume the user has pre-existing RGSS3 knowledge.

Pupa likes this

Share this post


Link to post
Share on other sites

This is amazing, just what I was looking for thanks!

 

How difficult would it be to set the pitch for the sound effect on a 'per text box' basis?? I'd love to give girls a high pitched sound and the guys lower pitched etc?

I'm not currently at home to try this, but theoretically you could install two instances of the script and use switches to control whether the 'male' or 'female' version of the script is running. This may not work depending on how the script is coded but it might be worth a shot.

 

(I've never coded for Ace myself so this may not even work due to the program itself)

Edited by Macatlas

Share this post


Link to post
Share on other sites

Hi, Zerbu, I've made some modifications to your script, and now it randomly varies when the message sound is played.

It's been two years since you've posted anything, and I can't find any contact information, so I'm going to go ahead and distribute the edit. This post serves as a notification of sorts.

 

If you want me to stop, send a message here ^.^

Thank you~

Edited by innovation

Share this post


Link to post
Share on other sites

Hey, um, i'm having a problem with your script. Whenever a text box is about to open it says:
Script 'Game_Switches' line 19: TypeError occurred. can't convert true into integer.

I changed: "MESSAGE_SOUND_DISABLE = nil" to true because I couldn't figure out how to make

the switch thing work. I put in the number of the switch I wanted to use but nothing happened.

it still doesn't make sounds when people are talking.

Share this post


Link to post
Share on other sites
MESSAGE_SOUND_DISABLE = nil

You need to put a switch ID there and when that switch will be ON, then the sound will not play.

Share this post


Link to post
Share on other sites

Does putting for example ~

MESSAGE_SOUND_DISABLE = 6

~ not work?

 

I just tested that and when I've turned the Switch #6 ON then the text sound was muted.

Share this post


Link to post
Share on other sites

Does putting for example ~

MESSAGE_SOUND_DISABLE = 6

~ not work?

 

I just tested that and when I've turned the Switch #6 ON then the text sound was muted.

 

Yes, because sound effect is already on, that switch is to turn OFF the sound effect.

 

Switch #6 = off (sound effect is ON)

Switch #6 = on (sound effect is OFF)

Edited by HisaoShou

Share this post


Link to post
Share on other sites

Hey I modified this script so that you can change between genders (or whatever you wanna call it, depending of the story, setting of your game or any other reason), and I wonder if I post it here or I create a new topic... What do I do?!

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

  • Recently Browsing   0 members

    No registered users viewing this page.