Page 1 of 1

Special Music While Skipping [SOLVED]

Posted: Sun Feb 18, 2018 9:07 pm
by ThePurpleAnon
I am making a visual novel, and no matter how much I look, I can't figure out how to play special skipping music. I feel that it would be a nice touch if, while you were skipping through dialogue, all sounds were silenced, and special sped up music played instead. How would I accomplish this? Thanks in advance!

Re: Special Music While Skipping

Posted: Sun Feb 18, 2018 10:33 pm
by irredeemable
Don't have an easy way to test it at the moment, but try modifying the skip_indicator screen in screens.rpy. Something like:

Code: Select all

screen skip_indicator():
    on 'show' action Play('music', 'faster.mp3')
    on 'hide' action Play('music', 'normal.mp3')
AFAIK there is no way to speed up playback in renpy natively so you'd have to have 2 different files and swap between them, which will cause a noticeable break unless your music is a short loop.

Re: Special Music While Skipping

Posted: Mon Feb 19, 2018 1:30 pm
by ThePurpleAnon
Thank you so much! Not exactly what I wanted, but I was able to reverse engineer something closer to what I wanted (Since my game does have an entire soundtrack). But how do I add more than one action in a line of code? Should I type another block of code, or is there an easier solution? (I want the music to be muted, then on the sfx channel have the fast forward music play in substitute of in-game music, starting from a random point in the song).

Code: Select all

screen skip_indicator():
    on 'show' action SetMute('music', True)
    on 'hide' action SetMute('music', False)

Re: Special Music While Skipping

Posted: Mon Feb 19, 2018 2:00 pm
by IrinaLazareva
ThePurpleAnon wrote: Mon Feb 19, 2018 1:30 pm But how do I add more than one action in a line of code?
You can set several functions on one action

Code: Select all

    on 'show' action SetMute('music', True), Play('music', 'melody.mp3'), Show('blabla') #etc...

Re: Special Music While Skipping

Posted: Mon Feb 19, 2018 3:12 pm
by ThePurpleAnon
Thank you very much! I love adding tiny little details in games, especially when they involve music, and this is just the little touch my game needed!