activate sound gets override by hover sound

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
Flince
Regular
Posts: 30
Joined: Fri Oct 08, 2010 9:48 am
Contact:

activate sound gets override by hover sound

#1 Post by Flince »

I've been building a menu in my game and have a "Next" button to turn the pages and I set the button an activate sound and a hover sound. However when I click the button the activate sound play only for a fraction and the hover sound play instead.

I figure that maybe the activate and hover sound are played on the same channel so when I click the first button it play the activate sound, the button of the second page replace the first button and the hover sound of the second button override the activate sound. Is there anyway around this? I'm using Renpy 6.11 but I didn't use the screen language (still messing around with it to see how it works). Thanks in advance :o

User avatar
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: activate sound gets override by hover sound

#2 Post by PyTom »

I'll be looking into this.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
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: activate sound gets override by hover sound

#3 Post by PyTom »

I was unable to repeat the problem, using the code:

Code: Select all

screen test:
    textbutton "Test":
        action ui.returns(None)
        hover_sound "blah.ogg"
        activate_sound "punch.wav"

label start:
    call screen test
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Flince
Regular
Posts: 30
Joined: Fri Oct 08, 2010 9:48 am
Contact:

Re: activate sound gets override by hover sound

#4 Post by Flince »

Here's a quick main menu i scrambled to help illustrate the problem. Hope this is of some use :o

The left 'Extra' button have the problem while the right one doesn't.
Attachments
Test1-win32.zip
(10.47 MiB) Downloaded 41 times
Test1.rar
(161.99 KiB) Downloaded 38 times

User avatar
Alex
Lemma-Class Veteran
Posts: 3094
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: activate sound gets override by hover sound

#5 Post by Alex »

Well, in general everything is works fine... but
When you klick left "Extra" button, game jumps to another label and "Return" button appears. So, at that moment, mouse pointer is over this new button, and hover sound for that button sounds. Just move "Return" button to another position.
(Note: it was hard to use menu without background, if it was at least "scene black"...)

Flince
Regular
Posts: 30
Joined: Fri Oct 08, 2010 9:48 am
Contact:

Re: activate sound gets override by hover sound

#6 Post by Flince »

Thanks for the advice! Though i would like to avoid that if it's possible because it would be awfully inconvenient to move every button that is on the same position >_>

User avatar
Alex
Lemma-Class Veteran
Posts: 3094
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: activate sound gets override by hover sound

#7 Post by Alex »

Hmm... try to add 0.5 sec pause before "Return" button appear - it should be enough to hear activate sound.

Flince
Regular
Posts: 30
Joined: Fri Oct 08, 2010 9:48 am
Contact:

Re: activate sound gets override by hover sound

#8 Post by Flince »

Adding pause before certainly allow the sound to finish. The transition is choppy but I have an idea about that. Don't know why the idea of adding time gap for the sound didn't cross my mind though, it seems really simple - -. Anyway thanks for your help, now my menu works as I want. So um should I put [solved] at the topic title?

Post Reply

Who is online

Users browsing this forum: Google [Bot], Semrush [Bot], voluorem