Music starts randomly (?) 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.
Message
Author
User avatar
poorlyformed
Regular
Posts: 53
Joined: Mon Jan 22, 2018 11:43 am
Projects: Shadowburg
Tumblr: poorlyformed
itch: poorlyformed
Location: NYC
Contact:

Re: Music starts randomly (?) playing

#16 Post by poorlyformed »

ok, I just removed the music from that screen, and that seems to have stopped it from playing in that scene. soooo, I guess that's a fix, although I still want music to play there. Is there another way to add it?

oh, and I thought I'd shared the zip of the game folder but I posted the wrong one: https://drive.google.com/open?id=1PqjfO ... HzaA8HXMLX
Image

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3792
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: Music starts randomly (?) playing

#17 Post by Imperf3kt »

I think its because you use python to play the music.
Try replacing that with:

Code: Select all

    on Show:
        Play music "filename.mp3"
    on Hide:
        Stop music
Going by memory, so code is probably wrong.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

User avatar
poorlyformed
Regular
Posts: 53
Joined: Mon Jan 22, 2018 11:43 am
Projects: Shadowburg
Tumblr: poorlyformed
itch: poorlyformed
Location: NYC
Contact:

Re: Music starts randomly (?) playing

#18 Post by poorlyformed »

I'd tried that and another code I'd found in the documentation, but neither seemed to work. Thank you for your help, though. I'm just going to try something else with that screen, I think.
Image

Post Reply

Who is online

Users browsing this forum: decocloud