Author Topic: Character.SayAt Not Playing Sound  (Read 126 times)

Character.SayAt Not Playing Sound
« on: 22 Dec 2018, 20:41 »
Hey, there!  Like my last post, this also seems like one where the solution must be really simple... but I've scoured manual and forums and tried everything I can think of, and no dice.

I have a character (cPieCir) that has some lines of dialogue being called up with SayAt, like so:

Code: Adventure Game Studio
  1.     cPieCir.SayAt(440, 300, 400, "&2 Well, well, well... what do we have here?");
  2.     cCharacter.SayAt(440, 300, 400, "&354 Hi, I'm...");
  3.     cPieCir.SayAt(440, 300, 400, "&3 Oh, we know who you are...");

But no matter what I do, he stubbornly refuses to actually play the speech file for his lines.  His dialogue box appears with his speech view portrait so the SayAt command is going through, and the cCharacter in the conversation with him says her lines normally, but he remains silent.  I have 29 speaking characters in the game, and they all seem to be talking just fine except for him!

I have already run through all of the following:

1) Checked to make sure the files for his lines were in the Speech folder in the correct game directory (they are);
2) Played them outside of AGS and also imported them into AGS as sound effects to play via a Play command to verify they're working (they are, no problems);
3) Tried converting them to other filetypes in case for some reason AGS didn't like them as MP3s (did not work; WAV and OGG also did not play, and all other characters are using MP3 fine);
4) Tried changing the character's scripting name from cPieCir to cCircus, renaming the files and testing the code that way in case there was some weird bug (no change);
5) Tried both speaking to other characters first and not in case one of them was somehow overriding the other (no change);
6) Confirmed that audio settings should allow unlimited sound effects (Music is set to 1 channel to accommodate background music; Sound and AmbientSound are both set to 0 [unlimited]);
7) Cried.

Does anyone have any suggestions about what I'm missing here?

Re: Character.SayAt Not Playing Sound
« Reply #1 on: 22 Dec 2018, 20:51 »
How are your voice files named exactly?

Re: Character.SayAt Not Playing Sound
« Reply #2 on: 22 Dec 2018, 21:02 »
c[CharScriptName]1, 2, 3, and so on.

In this case:

I've used the same naming convention from the manual for all of them - other characters' files are playing, just not this conversation with this one.

Re: Character.SayAt Not Playing Sound
« Reply #3 on: 22 Dec 2018, 21:19 »
Only first 4 letters from the character name should be used, e.g. PIEC1, PIEC2 and so on.

From the manual:
The file name has format XXXXY.EXT, where XXXX is made of up to first four letters of the character's script name (except the leading 'c'), the Y is the speech file number (with no leading or trailing zeroes or padding of any kind), and EXT is the file extension.
« Last Edit: 22 Dec 2018, 21:23 by Crimson Wizard »

Re: Character.SayAt Not Playing Sound
« Reply #4 on: 22 Dec 2018, 21:36 »
Oh, lord, no wonder.  I must have missed that.  Thank you so much!