Please login or register.

Login with username, password and session length
Advanced search  

News:

For WME related articles and tutorials visit WME Resource Center.

Author Topic: A little problem with music  (Read 5291 times)

0 Members and 1 Guest are viewing this topic.

McCoy

  • The cocido eater
  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 365
  • Spurrrrrrring
    • View Profile
    • Spur Games
A little problem with music
« 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.
Logged

Click here to sign my sig!

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re:A little problem with music
« Reply #1 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.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

McCoy

  • The cocido eater
  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 365
  • Spurrrrrrring
    • View Profile
    • Spur Games
Re:A little problem with music
« Reply #2 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
Logged

Click here to sign my sig!

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re:A little problem with music
« Reply #3 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*.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave
 

Page created in 0.033 seconds with 18 queries.