Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Gribbler on Fri 23/01/2009 22:29:55

Title: problem with playing mp3files
Post by: Gribbler on Fri 23/01/2009 22:29:55
Hi

I want to play a short mp3 file during the game. Exemplary code:

function hHotspot1_Look()
{
player.FaceLocation(130, 100);
player.Say("Home sweet home.");
PlayMP3File("thebest_64kbs");
}

the background music (midi) stops but nothing happens. I tried to place that mp3 file (thebest_64kbs.mp3) both within music folder of the game and main folder. What am I doing wrong?

And one more thing. After the mp3 file stops playing will the background music turn back on? Because I want that mp3 file to be short, just a few seconds.

Title: Re: problem with playing mp3files
Post by: Pumaman on Fri 23/01/2009 22:50:37
You need to include the ".mp3" in the file name.

Though is there any reason why you're using PlayMP3File, which is quite a specialized command, rather than just using a PlaySound or PlayMusic to play it?
Title: Re: problem with playing mp3files
Post by: Gribbler on Fri 23/01/2009 22:58:42
whoa I didn't know such commands are available:-) just typed "play..." and when I saw MP3file I thought that's it. Thanks!