Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest WME version: WME 1.9.1 (January 1st, 2010) - download

Author Topic: TalkAsync sound file does not work in compiled packages  (Read 514 times)

0 Members and 1 Guest are viewing this topic.

anarchist

  • Regular poster
  • ***
  • Karma: 5
  • Offline Offline
  • Gender: Male
  • Posts: 194
    • View Profile
TalkAsync sound file does not work in compiled packages
« on: September 04, 2016, 02:04:02 PM »

Hello everyone,

I use the command:

Code: WME Script
  1. actor.TalkAsync("", "fileName.ogg", 5000);
  2.  

to trigger the talk animation and play a speech sound. I show the dialogue text in a separate window, which is why I send an empty string.

When I run the game in debug mode, the speech sound plays fine. When I compile the game and run it from "packages" folder, the speech sound is not heard. I believe it is not an issue with sound effects volume, because other sound effects are heard fine.

Any ideas why this might happen?
Logged

anarchist

  • Regular poster
  • ***
  • Karma: 5
  • Offline Offline
  • Gender: Male
  • Posts: 194
    • View Profile
Re: TalkAsync sound file does not work in compiled packages
« Reply #1 on: September 04, 2016, 02:50:04 PM »

The problem was in the way I build the file name string:

Code: WME Script
  1. var fileName = "sound_effects\\" + actor.Name + ".ogg";
  2.  

I was mislead by SciTE that '\' character works as an escape character, so I used double slash ('\\'). In debug mode, this was not an issue. But when I compiled the packages this stopped working. So, only a single '\' is used to solve the issue.
Logged
 

Page created in 0.141 seconds with 17 queries.