with preferences.audio_when_unfocused False When the window is unfocused and restored, the music stops playing.

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
Li yuanlin
Regular
Posts: 93
Joined: Sat Aug 04, 2018 8:42 pm
Location: Hong Kong
Contact:

with preferences.audio_when_unfocused False When the window is unfocused and restored, the music stops playing.

#1 Post by Li yuanlin »

default preferences.audio_when_unfocused = False

play music ["<silence 5.0>","audio/bgm/baitoubei_full_ver.mp3"] noloop

all music with noloop will be stopped and no recover
stay hungry,stay foolish.

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: with preferences.audio_when_unfocused False When the window is unfocused and restored, the music stops playing.

#2 Post by PyTom »

That's what noloop means - once it's stopped, it won't be restarted.
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

Post Reply

Who is online

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