How to make a beeping noise while text is being spelled out
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
How to make a beeping noise while text is being spelled out
Like the title says. Is it possible to have little beeps as the text is being written out on the screen? You know what I mean. Like in Pokemon (I believe) or Ace Attorney. It always felt...empty...without them. I hope you guys understand what I'm talking about. Alternately, I've heard it as typewriter noises while the text is being spelled out.
Wow, I probably sounded stupid when I just said that. But I'm not sure how else to describe it.
Wow, I probably sounded stupid when I just said that. But I'm not sure how else to describe it.
-
- Newbie
- Posts: 14
- Joined: Tue May 26, 2009 3:10 pm
- Projects: Unnamed Project
- Contact:
Re: How to make a beeping noise while text is being spelled out
Couldn't you just use something like
before said dialogue, and then
after it is complete, I don't imagine you want it to be playing constantly, however if that is the case maybe looping a 3 second clip throughout the entire script would suffice... to be honest it sounds quite annoying, either way, though.
Code: Select all
play sound "file.ogg"
Code: Select all
stop sound
- PyTom
- Ren'Py Creator
- Posts: 16096
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
Re: How to make a beeping noise while text is being spelled out
Something like:
Code: Select all
init python:
def callback(event, **kwargs):
if event == "show":
renpy.music.play("godawful-beeping-noise.ogg", channel="sound")
elif event == "slow_done" or event == "end":
renpy.music.stop(channel="sound")
pw = Character("Generic Lawyer Guy", callback=callback)
label start:
pw "Why do people always wind up dead in these games?"
pw "Maybe it's because these beeps are driving people insane!"
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
- rinrin
- Veteran
- Posts: 211
- Joined: Thu Apr 16, 2009 9:18 am
- Completed: Several.
- Projects: Several.
- Contact:
Re: How to make a beeping noise while text is being spelled out
I was super happy to see this thread since implementing text sounds is something I wanted to ask about anyway... but for some reason, the code PyTom kindly posted here doesn't work for me
I just:
1. copied the code into a New Project,
2. placed the sound file in the game directory and changed godawful-beeping-noise.ogg to reflect the actual filename
3. changed the config.default_text_cps in options.rpy to 30 (since at 0, it just displays text without "printing it out")
and it doesn't work (I don't hear any sound while the text is being written).
Did I miss something / is there anything else I should have done?
I just:
1. copied the code into a New Project,
2. placed the sound file in the game directory and changed godawful-beeping-noise.ogg to reflect the actual filename
3. changed the config.default_text_cps in options.rpy to 30 (since at 0, it just displays text without "printing it out")
and it doesn't work (I don't hear any sound while the text is being written).
Did I miss something / is there anything else I should have done?
-
- Eileen-Class Veteran
- Posts: 1265
- Joined: Fri Aug 31, 2007 7:02 am
- Projects: 0 completed game. Still haven't made any meaningfully completed games...
- Contact:
Re: How to make a beeping noise while text is being spelled out
The channel="sound" is a relatively new feature. If you're not using the latest(?) Renpy then it won't work. You can try using a number like so:rinrin wrote:Did I miss something / is there anything else I should have done?
Code: Select all
def callback(event, **kwargs):
if event == "show":
renpy.music.play("godawful-beeping-noise.ogg", channel=7)
elif event == "slow_done" or event == "end":
renpy.music.stop(channel="sound")
I suspect somebody is stealing my internet identity so don't believe everything I tell you via messages. I don't post or send messages anymore so don't believe anything I tell you via messages or posts.
- rinrin
- Veteran
- Posts: 211
- Joined: Thu Apr 16, 2009 9:18 am
- Completed: Several.
- Projects: Several.
- Contact:
Re: How to make a beeping noise while text is being spelled out
I changed channel="sound" to channel=7 and can actually hear the sound now, but the problem is, it doesn't stop when the text does. It just keeps beeping on and on, until the game ends.
So I suppose I should upgrade to the latest Renpy?
(I'm a bit worried whether my 1/3 finished game will still work with the new version? I'm currently using 6.8.1a)
So I suppose I should upgrade to the latest Renpy?
(I'm a bit worried whether my 1/3 finished game will still work with the new version? I'm currently using 6.8.1a)
-
- Eileen-Class Veteran
- Posts: 1265
- Joined: Fri Aug 31, 2007 7:02 am
- Projects: 0 completed game. Still haven't made any meaningfully completed games...
- Contact:
Re: How to make a beeping noise while text is being spelled out
Oh, I forgot the code to stop music also uses channel=="sound". So you have to change that to 7 as well like so:rinrin wrote:I changed channel="sound" to channel=7 and can actually hear the sound now, but the problem is, it doesn't stop when the text does. It just keeps beeping on and on, until the game ends.
Code: Select all
def callback(event, **kwargs):
if event == "show":
renpy.music.play("godawful-beeping-noise.ogg", channel=7)
elif event == "slow_done" or event == "end":
renpy.music.stop(channel=7)
I think it'll work.rinrin wrote:So I suppose I should upgrade to the latest Renpy?(I'm a bit worried whether my 1/3 finished game will still work with the new version? I'm currently using 6.8.1a)
I suspect somebody is stealing my internet identity so don't believe everything I tell you via messages. I don't post or send messages anymore so don't believe anything I tell you via messages or posts.
- rinrin
- Veteran
- Posts: 211
- Joined: Thu Apr 16, 2009 9:18 am
- Completed: Several.
- Projects: Several.
- Contact:
Re: How to make a beeping noise while text is being spelled out
It works now!
Thank you!!
Thank you!!
Re: How to make a beeping noise while text is being spelled out
Thank you for your help, guys. I've been a little too busy for the last couple of days to come check on this thread, so sorry! I'll try your solutions. Again, thanks for taking time out to do this and what not. *touched*
-
- Veteran
- Posts: 398
- Joined: Sat Jul 12, 2008 1:31 pm
- Projects: Kassiopeia [iVN]
- Location: Deutschland
- Contact:
Re: How to make a beeping noise while text is being spelled out
I tried this out with a very short looped SFX. It works, but has some side effects. Pressing "H" during beeping will suspend "end" event. i.e. the beeping will continue. Same might happen if jumping into game menu by pressing ESC, or going backwards (rollback).PyTom wrote:Code: Select all
init python: def callback(event, **kwargs): if event == "show": renpy.music.play("godawful-beeping-noise.ogg", channel="sound") elif event == "slow_done" or event == "end": renpy.music.stop(channel="sound") pw = Character("Generic Lawyer Guy", callback=callback) label start: pw "Why do people always wind up dead in these games?"
Skipping, or the unpredictable lenth of a line might cause a 'click', or crack(le) at the end of a line as the beep sound is just cut off. Haven't tried a short fade out, yet.
Audio Plays: [original] The White Feathers Directive - [Star Wars] Through Flame and Shadow
Ren'Py: Kassiopeia [very interactive VN] work in progress - looking for proof reader english
Ren'Py: Kassiopeia [very interactive VN] work in progress - looking for proof reader english
Who is online
Users browsing this forum: Ahrefs [Bot]