Please login or register.

Login with username, password and session length
Advanced search  

News:

IRC channel - server: waelisch.de  channel: #wme (read more)

Author Topic: Game.PlaySound doesn't work in compiled game  (Read 5212 times)

0 Members and 1 Guest are viewing this topic.

Mac

  • Supporter
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 136
    • View Profile
    • Homepage
Game.PlaySound doesn't work in compiled game
« on: May 31, 2007, 03:42:58 PM »

Hi,

I just found out that Game.PlaySound() doesn't work in our compiled game. When I run the game from Project Manager everything works fine, but not if compiled. Normally these things turned out to be directory problems in the package files but this time a simple
Code: [Select]
Game.PlaySound("schnakenfalle.ogg");with the file in the root folder of our SoundFX package isn't even working.

Any ideas?

Thanks in advance
Mac
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Game.PlaySound doesn't work in compiled game
« Reply #1 on: May 31, 2007, 03:54:57 PM »

If you enable error logging for the compiled game, do you get any errors?
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Mac

  • Supporter
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 136
    • View Profile
    • Homepage
Re: Game.PlaySound doesn't work in compiled game
« Reply #2 on: May 31, 2007, 04:49:48 PM »

No. There are no errors in the log.
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Game.PlaySound doesn't work in compiled game
« Reply #3 on: May 31, 2007, 05:13:02 PM »

I'm not able to replicate it :( It seems to work ok if I make a new package with a sound in the root.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Mac

  • Supporter
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 136
    • View Profile
    • Homepage
Re: Game.PlaySound doesn't work in compiled game
« Reply #4 on: May 31, 2007, 05:50:03 PM »

I could upload a scene with a save game for you to test, where sound should be played but isn't. I got the size of the archive down to 75mb but it still would take some time to upload.
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Game.PlaySound doesn't work in compiled game
« Reply #5 on: May 31, 2007, 06:04:01 PM »

That would be helpful, thanks. It will take even more time to download, because my connection is reduced to 128/128 until tomorrow.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Mac

  • Supporter
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 136
    • View Profile
    • Homepage
Re: Game.PlaySound doesn't work in compiled game
« Reply #6 on: June 02, 2007, 02:14:04 AM »

Thanks again for your help. I found the bug. I did a sound fade to zero in a script and never set the volume back to 100%. By the way: I use "actor.StickToRegion()" in one scene. After visiting this scene my actor walks in front of everything. Is actor.StickToRegion() still active after I left the scene where I use it? And if so, how can I avoid it? actor.StickToRegion(null) or something?

Mac
Logged

Mac

  • Supporter
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 136
    • View Profile
    • Homepage
Re: Game.PlaySound doesn't work in compiled game
« Reply #7 on: June 02, 2007, 03:23:34 AM »

I just found out that I have to use "actor.StickToRegion(null)" when leaving the scene. Now it works perfectly.
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Game.PlaySound doesn't work in compiled game
« Reply #8 on: June 02, 2007, 02:55:05 PM »

It shouldn't be happening, though. I fixed it, thanks for pointing that out.
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.038 seconds with 19 queries.