Special Music While Skipping [SOLVED]

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
ThePurpleAnon
Newbie
Posts: 7
Joined: Sun Feb 18, 2018 9:02 pm
Projects: Sakura's Song and Dance Club!
Organization: ThePurpleAnon
Deviantart: ThePurpleAnon
Contact:

Special Music While Skipping [SOLVED]

#1 Post 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!
Last edited by ThePurpleAnon on Mon Feb 19, 2018 4:22 pm, edited 1 time in total.
In the words of my dear uncle:

"Why not? Why not try it out of a goat?"

irredeemable
Regular
Posts: 78
Joined: Thu Feb 08, 2018 7:57 am
Contact:

Re: Special Music While Skipping

#2 Post 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.

User avatar
ThePurpleAnon
Newbie
Posts: 7
Joined: Sun Feb 18, 2018 9:02 pm
Projects: Sakura's Song and Dance Club!
Organization: ThePurpleAnon
Deviantart: ThePurpleAnon
Contact:

Re: Special Music While Skipping

#3 Post 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)
In the words of my dear uncle:

"Why not? Why not try it out of a goat?"

User avatar
IrinaLazareva
Veteran
Posts: 399
Joined: Wed Jun 08, 2016 1:49 pm
Projects: Legacy
Organization: SunShI
Location: St.Petersburg, Russia
Contact:

Re: Special Music While Skipping

#4 Post 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...

User avatar
ThePurpleAnon
Newbie
Posts: 7
Joined: Sun Feb 18, 2018 9:02 pm
Projects: Sakura's Song and Dance Club!
Organization: ThePurpleAnon
Deviantart: ThePurpleAnon
Contact:

Re: Special Music While Skipping

#5 Post 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!
In the words of my dear uncle:

"Why not? Why not try it out of a goat?"

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]