help with text bleeps and special effects!

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
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.
Post Reply
Message
Author
User avatar
electragurl
Regular
Posts: 37
Joined: Sat Jul 20, 2013 12:21 pm
Contact:

help with text bleeps and special effects!

#1 Post by electragurl »

Hello everyone! So right now, I've succeeded in implementing those bleeps you hear when text comes up in Ace Attorney and stuff like that, and so far it's working fine. But I also have a "shake effect"(also like in ace attorney) and I want to have a "shake effect sound"(also also like in ace attorney)to go with it.

My code for the text bleeps are:

Code: Select all

def everett(event, **kwargs):
        if event == "show":
            renpy.music.play("text.wav", channel="sound", loop=True)
        elif event == "slow_done" or event == "end":
            renpy.music.stop(channel="sound") 
There's also another one for females, but they really don't differ all too much.

As for my "shake effect sound" I just add "play sound "bam.wav"" the line above I write the character's dialogue. However, it's not playing the "shake effect sound", but instead just the regular text bleeps.

Additionally, I've tried the "shake effect sound" without the regular text bleeps, and it works perfectly. But when you add in the text bleeps, the "shake effect sound" doesn't play at all.

My preference is that both sounds play at once. What am I doing wrong?
"Yesiree, the future's looking very bright indeed!"

Asceai
Eileen-Class Veteran
Posts: 1258
Joined: Fri Sep 21, 2007 7:13 am
Projects: a battle engine
Contact:

Re: help with text bleeps and special effects!

#2 Post by Asceai »

Each channel can only play one thing at a time, so you need to make a new channel. I'd probably shove the bleeps on their own channel and use the sound channel for sound effects.

Code: Select all

init python:
    renpy.music.register_channel("bleeps", mixer="sfx", loop=False)
and change your beeping code to channel="bleeps"

User avatar
electragurl
Regular
Posts: 37
Joined: Sat Jul 20, 2013 12:21 pm
Contact:

Re: help with text bleeps and special effects!

#3 Post by electragurl »

Thank you Asceai! It works perfectly now!
"Yesiree, the future's looking very bright indeed!"

Post Reply

Who is online

Users browsing this forum: Bing [Bot]