I need some help with adding music

Started by Franke, Tue 20/10/2009 19:16:17

Previous topic - Next topic

Franke

Hi! I’m new to working with AGS, and I need some help with adding music to my game.
If I’ve understood it all right, all I should have to do is add “PlayMusic(number);” to the room script, but when I do this, the music doesn’t play. I have also tried to enter the music number at “PlayMusicOnRoomLoad” in the room settings, but this doesn’t work either. What am I doing wrong?

Thanks in advance. :)

monkey0506

Where do you have your music files located (i.e., in the game directory) and what is the exact filename (including file extension)?

Franke

The file is located in the game's "Music" map, and it's named music1.wav

Khris

Quote from: Franke on Tue 20/10/2009 19:28:14music1.WAV

Quote from: manualChanges the currently playing background music to MUSICx.OGG, MUSICx.MP3, MUSICx.MID, MUSICx.MOD or MUSICx.XM

Franke

Quote from: Khris on Tue 20/10/2009 19:29:53
Quote from: Franke on Tue 20/10/2009 19:28:14music1.WAV

Quote from: manualChanges the currently playing background music to MUSICx.OGG, MUSICx.MP3, MUSICx.MID, MUSICx.MOD or MUSICx.XM
Do you mean that .wav is not a supported file format? I accually tried a mp3-file as well, but this didn't work either.

Khris

Yes, you can use .WAVs, but only for sound effects.

Make sure the (mp3) file is called "music1.mp3" and is inside the Music folder inside the game folder.
Also check that it isn't called "music1.mp3.mp3" by any chance (windows might hide known file extensions as per the folder settings, switch that off if it's activated).

Then make sure the room event is linked properly, as in the PlayMusic command is inside a function named room_Load and that name is entered in the room's events pane next to "Enters room before fade-in".

Franke

I just noticed that the music was located in the music-map for another game than the one i tried to get it playing in. :P I really am a bit silly sometimes. Tanks a lot for all the help, though.

SMF spam blocked by CleanTalk