Music not working

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
Nicolajsej123
Newbie
Posts: 8
Joined: Sun Jan 20, 2019 10:10 am
Contact:

Music not working

#1 Post by Nicolajsej123 »

Hey so im pretty new to this Renpy stuff, i have learned a bunch of stuff with the text and stuff, but im having problems with the music. When i try to add my music file it freezes for a bit, then it shows up as a text document, and in it is just a bunch of text and symbols. I dont know if im doing something wrong, or if im just stupid.
Ive added a picture to show you what i mean, i hope you can help!
Attachments
The text im getting from the sound file
The text im getting from the sound file

User avatar
Obscura
Eileen-Class Veteran
Posts: 1431
Joined: Fri Mar 09, 2012 6:58 pm
Projects: Coming Out On Top
Location: United States
Contact:

Re: Music not working

#2 Post by Obscura »

I might be wrong but your sound file will usually look like a garbled mess when you look at it through a text editor, which it looks like you're doing. So that's normal.

It only matters whether it will run in the game or not.

The files ending in .rpy, which contain your code, are usually the only files that you'd look at through the editor.
Coming Out On Top - An Adult Gay Dating Sim
website

User avatar
Potato0095
Regular
Posts: 84
Joined: Sun May 08, 2016 8:40 pm
Projects: LoveCraft
itch: potato95
Location: Brazil
Contact:

Re: Music not working

#3 Post by Potato0095 »

You don't need to open it as a text. Open your script (I assume script.rpy) and put this code:

Code: Select all

play music "your file.extension" # e.g. Music.mp3 / Music.ogg / etc
You'll need to write with the folder name if you have the files inside a folder. In your case, the code would be:

Code: Select all

play music "music/uden titel.wav"
"There are two types of lies: Lies that hurt, and lies that don't."

Nicolajsej123
Newbie
Posts: 8
Joined: Sun Jan 20, 2019 10:10 am
Contact:

Re: Music not working

#4 Post by Nicolajsej123 »

Aight i'll try it out thanks guys

Post Reply

Who is online

Users browsing this forum: Semrush [Bot]