Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: anarchist on September 04, 2016, 02:04:02 PM

Title: TalkAsync sound file does not work in compiled packages
Post by: anarchist 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?
Title: Re: TalkAsync sound file does not work in compiled packages
Post by: anarchist 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.