Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: McCoy on May 06, 2003, 12:49:03 PM

Title: A little problem with music
Post by: McCoy on May 06, 2003, 12:49:03 PM
When I put some background music for a scene, it works in projectman perfectly, but when I build the game, it does not work in the stand-alone version. The music is in ogg format, but I tried wav, tried to use Game.PlaySound instead of Game.PlayMusic, both with ogg and wav format, and it never worked. Is strange, because I'm using some short sounds for the steps of the main character, and they work in the stand-alone version. This is a bug of some short or is only me? The sound file for the music is 5min long.
Title: Re:A little problem with music
Post by: Mnemonic on May 06, 2003, 01:19:20 PM
Hmm, it's probably some path related problem. How do you reference the soundfile in your script? It should be something like Game.PlayMusic("music\MyMusic.ogg"); (providing you have a "music" folder in your package). Note the extra handy "Copy filename" function in ProjectMan. It will copy the correct path to a file into clipboard, so that you can paste it into a script.
Title: Re:A little problem with music
Post by: McCoy on May 08, 2003, 12:35:51 PM
Oh, yeah, you were right, I was using Game.PlayMusic("\music\MyMusic.ogg");  instead of Game.PlayMusic("music\MyMusic.ogg"); . But the wrong way worked in projectman  ???.

thanx 4 all
Title: Re:A little problem with music
Post by: Mnemonic on May 08, 2003, 04:45:26 PM
But the wrong way worked in projectman  ???.

Yeah, because if you run the game from the ProjectMan, it tries to find the files directly on a disk, which is a bit more tolerant to mistakes. But when it's running from a package, the filename must match *exactly*.