Don't want to loop music on the title screen

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
wtfman
Regular
Posts: 37
Joined: Sat Mar 30, 2013 7:26 pm
Contact:

Don't want to loop music on the title screen

#1 Post by wtfman »

The title music can be set in options.rpy, like-

config.main_menu_music = "TITLE.MUSIC"

But this always seems to repeat. I want to use short music in about 30 seconds as a title, and don't want to loop. How should I do?

User avatar
gas
Miko-Class Veteran
Posts: 842
Joined: Mon Jan 26, 2009 7:21 pm
Contact:

Re: Don't want to loop music on the title screen

#2 Post by gas »

Instead of using that variable, add this at the beginning of your script.

Code: Select all

label before_main_menu:
    play music "TITLE.MUSIC" noloop
    return
If you want to debate on a reply I gave to your posts, please QUOTE ME or i'll not be notified about. << now red so probably you'll see it.

10 ? "RENPY"
20 GOTO 10

RUN

wtfman
Regular
Posts: 37
Joined: Sat Mar 30, 2013 7:26 pm
Contact:

Re: Don't want to loop music on the title screen

#3 Post by wtfman »

Solved.
Thank you, it works perfectly.

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot]